-
Notifications
You must be signed in to change notification settings - Fork 82
Description
i2p has an ecosystem of http websites which work similarly to how ToR works.
Basically, browsers can be set to use a local HTTP proxy which will then detect http://*.i2p and route the connection to servers running on peers behind those tunnels. They also have a gateway at http://reg.i2p which provides domain names for addresses.
I think we can add this to Agregore by hooking into the HTTP protocol handler and dynamically routing to i2pd when we detect the .ipd TLD in the hostname.
- Register a new HTTP handler which passes requests through to
fetchby default - Create a proxy-agent dispatcher pointing to the local i2pd proxy
- Test loading a site
- Add
i2pconfig options so you can customize the socks proxy - Mess with the response headers to prevent loading resources from other domains and disable JavaScript via CSP headers and CORS headers
- Check if i2pd is running, and open a window (once) pointing to a guide for setting it up if we can't detect it
Then later we can work on exposing a way to automatically configure i2pd to have a local webserver for files so we can make it easier to create new sites with something like PUT http://localhost.i2p/index.html so it's similar to other protocols.
This could also be the foundation for how we treat ToR sites in Agregore.