Commit bf4556c9 authored by Tails developers's avatar Tails developers
Browse files

The foxyproxy patterns/regexps were fixed and simplified.

parent fa92930d
......@@ -73,7 +73,6 @@ These both need an anchor ^ at the beginning, and the ending `.*` seems pointles
`^https?://`
Finally, there's: `http://[a-zA-Z0-9\.]*\.i2p(/.*)?`
That's better than the last .i2p regexp, but you don't need to escape a dot if it's in a group; domain names can include dashes, too; you need to deal with alternative port numbers; and you need beginning and ending anchors. So the version listed earlier is probably a better choice:
......@@ -101,3 +100,14 @@ Many apologies if my English is unclear: please feel free to ask for clarificati
>> to fix the pages here to show the regexes actually used.
>>> I think I've done most of it already.
>>>> Unfortunately, the result of all these recent changes is a set of
>>>> broken (as in never matching) regexps => FoxyProxy always selects
>>>> the Tor socks proxy. After reading the foxyproxy source, it
>>>> appears the regexps are automatically enclosed between `^` and
>>>> `$` when `isMultiLine="false"`, which is the default and what our
>>>> regexps have been using forever, so I'm going to revert the
>>>> addition of these special chars. Also, I've migrated every regexp
>>>> that could be to a wildcard pattern (commits 9ea7b1 and f73cc7d
>>>> in devel branch) for simplicity's sake; seems to both fix the
>>>> issues you were raising, and... actually work :)
......@@ -88,17 +88,21 @@ Below are the patterns that each url handeled by iceweasel will be
matched against. These patterns will be tried in order, from top to
bottom, until the first match is found:
1. The I2P router console: urls matching
`^http://(127\.0\.0\.1|localhost):7657(/.*)?$` will get a direct
connection to the local host so the I2P router console can be
reached.
2. I2P eepsites: urls matching
`^https?://[-a-zA-Z0-9.]+\.i2p(:[0-9]{1,5})?(/.*)?$` will be proxied through
the local eepsite HTTP proxy run by the I2P client.
3. Tor HTTP(s): urls matching `^https?://` will be proxied through
polipo (and then its parent proxy, Tor).
1. The I2P router console: urls matching one of the
`http://127.0.0.1:7657/*` and `http://localhost:7657/*` wildcard
patterns will get a direct connection to the local host so the I2P
router console can be reached.
2. I2P eepsites: urls matching the
`^https?://[-a-zA-Z0-9.]+\.i2p(:[0-9]{1,5})?(/.*)?$` regexp will be
proxied through the local eepsite HTTP proxy run by the I2P client.
Implementation note: FoxyProxy encloses the regexps between `^` and
`$` itself since `isMultiLine="false"`, that's why the regexp in
`foxyproxy.xml` lacks these chars.
3. Tor HTTP(s): urls matching one of the `https://*` and `http://*`
wildcard patterns will be proxied through polipo (and then its
parent proxy, Tor).
4. The rest: all remaining urls will be SOCKS5-proxied through Tor.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment