EinMByte / salti

∫alti is a Firefox extension for I2P.
Other
4 stars 0 forks source link

Implementation Discussion #4

Open anonimal opened 7 years ago

anonimal commented 7 years ago

Continuing from #3 and https://github.com/EinMByte/salti/issues/3#issuecomment-270820074.

bigreddmachine commented 7 years ago

Documenting discussion from IRC on 6 Jan 2017:

anonimal bigreddmachine: so, basically, the equivalent would be like going to Advanced -> Network -> Settings -> Manual proxy configuration, setting http/ssl/ftp proxy addresses and ports <-- but only for .i2p and .b32.i2p addresses

anonimal All other traffic would be routed normally or like in tor browser, would be routed through their own setting (socks 127.0.0.1:9150)

anonimal So, we only want to route i2p traffic through given port(s) while leaving the rest as-is. What I don't know is if this would conflict with current network settings (like in TBB)

anonimal TBB = Tor Browser Bundle

bigreddmachine anonimal: yep. so, there is a library called 'chrome.proxy' that looks like it can do this. it allows setting a default proxy with exceptions. i have to look into it more, but I think the solution would be to make the default be to not proxy (or use tor or whatever) but set up an exception for .i2p (which would include .b32.i2p I believe) to use a proxy.

bigreddmachine the problem is that this library is not compatible with Firefox yet, though I did find where someone in the mozilla developer community is actively developing it.

anonimal Oh cool, that sounds promising.

anonimal By 'making the default be to not proxy', would that mean touching or not touching TBB's default settings?

bigreddmachine I am trying to determine if there is a way to accomplish the say thing using webRequest by intercepting/redirecting

anonimal Hmm, that sounds interesting. Does that require JS?

bigreddmachine yeah, so that's where I'm stuck (re: 'making the default...'). I want to make it so it only uses a special proxy for *.i2p, but it looks like the exceptions works the other way - you have to specify the default and then say "but not for this stuff". I'm working on wrapping my head around it.

anonimal I wonder if that could still be applied to TBB though: unset the default, then set 2 different proxies?

bigreddmachine

Hmm, that sounds interesting. Does that require JS? < webRequest is a js library, yeah. js is pretty much where all firefox and chrome extensions are going... but I think they can still be used with js disabled on sites. I haven't tested that though.

anonimal Ok. As long as it works with noscript then I think we'll be ok. As for extensions, I haven't had a problem using many different extensions with TBB over the years.

bigreddmachine There is also the possibility somewhere in the future that kovri itself could be wrapped into an extension using Native Client, which lets you run compiled C/C++ in an extension sandbox. what that would mean is you install the extension and boom, you have kovri installed in-browser. it would be awesome imo, but i have 0 experience with Native Client

anonimal bigreddmachine: do you mean Native Messaging? I brought that Native Messaging at one of the meetings but Native Client sounds more interesting

anonimal s/that/up/

anonimal (is that a chrome thing too? I can't find firefox links)

bigreddmachine Native Client looks like it's Chrome/Chromium only :-/

bigreddmachine I could see maybe using an extension like what I described in Chromium, but I'd be very leery of using it in Chrome for obvious reasons

bigreddmachine Also looks like Mozilla isn't interested in implementing it since they want to promote open web tools

bigreddmachine so nevermind.

anonimal Oh good, then that's convenient.

bigreddmachine So i think the answer for now is going to be chrome.proxy if it gets implemented on firefox as I expect, or else i think you can mimic a proxy using webRequest, but it might be involved.

bigreddmachine I'm going to copy this convo to the issue you opened and also add in some links that i've been reading.

anonimal Is there a thread/ETA/info on if/when chrome.proxy will be implemented?

bigreddmachine i'll include what i've found

anonimal Awesome, thanks.

bigreddmachine but the update i saw was maybe September or October 2016?

bigreddmachine I'll look that up and include it too.

bigreddmachine commented 7 years ago

Things I'm looking into:

bigreddmachine commented 7 years ago

I've found an alternative method for hooking Tor Browser or Firefox up to i2p until Salti is implemented.

Using FoxyProxy, you can set up rules to redirect *.i2p to your i2p router.