Skip to content

Use i2pd socks proxy for i2p domainsΒ #311

@RangerMauve

Description

@RangerMauve

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 fetch by default
  • Create a proxy-agent dispatcher pointing to the local i2pd proxy
  • Test loading a site
  • Add i2p config 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-protocolAdding a protocol we don't yet support

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions