Troubleshooting Tor under OpenWrt

First of all, if you search the Web for (rather than directly visit) the OpenWRT Tor setup doc URL:

https://openwrt.org/docs/guide-user/services/tor/client?s[]=qeew61811&s[]=1

...you'll find that this is a link from somewhere on openwrt.org. (Sorry I forgot which page but probably in the Wiki.)

You'll also notice several anomalies. First of all, you have this s[] thing which is set to 2 different values; I assume your firewall knows how to make sense of this. What matters is the s[]=1. That will do something which causes the correct page:

https://openwrt.org/docs/guide-user/services/tor/client

to generate corrupt HTML such that left square brackets (ASCII 91 hex) get broken by an injected "span class" in the HTML page source:

#9<span class="search_hit">1</span>;

resulting in a missing left bracket. And then there's this line:

fib daddr type != &#123; local, broadcast &#125; ${TOR_RULE}

in which 123 and 125 are trying to be "{" and "}", respectively. But if you have the foresight to delete all the s[] parameters, then all is well. It's like I'm seeing 2 versions of the doc, perhaps because the corrupted version is hardlinked from somewhere in your Wiki. But the corruption is weird indeed so I recommend scanning all the doc pages in order to verify that this isn't some broader problem.

Now my actual problem: even after (I think) successfully correcting the above errors, the router doesn't connect to anything, let alone Tor.

But otherwise, I can get plain vanilla OpenWRT working just fine on the very same router.

So, before I waste everyone's time asking me for all the various parameters, have any of you actually managed to follow these instructions as written and got it to work, or even connect to the internet but not to Tor?

S parameters come from spiders, not wiki.
It is a documentation issue?

1 Like

Thanks, in this case, it's weird because, at least if I believe the search engine, the link is embedded with "s" parameters in the Wiki itself. Maybe that's actually illusory but in any event it shouldn't be possible for me to cause it to display improperly just by appending those parameters (and why left square brackets, of all things?). In this sense, yes it's a documentation issue. But how did the stale link get into the Wiki in the first place, assuming it's really there? And are there similar embeddings elsewhere?

That much is a documentation issue. As for the fact that the code empirically doesn't work, that might be documentation or something else.

You fail to identify a single tagged link in wiki though.
Formatting gets bad from spiders brute-forcing search box.

I think you're right that it was just an illusion created by the search engine.

So that just leaves the question of why it doesn't work. (Probably it does but there's some other step which is missing from the documentation.)