Esta página fue actualizada por última vez el 2023-10 y es precisa con la versión 0.9.59 del router I2P.

Vista general

I2PTunnel es una herramienta para intermediar con, y proveer servicios a I2P. El destino de un I2PTunnel puede ser definido usando un nombre de servidor Base32, o una clave de destino completa de 516-bytes. Un I2PTunnel establecido estará disponible sobre su máquina cliente en localhost:puerto Si desea proporcionar un servicio sobre la red I2P, simplemente cree un I2PTunnel hasta la dirección IP:puerto apropiada. Se generarará una clave de destino de 516-bytes correspondiente para el servicio, y se hará disponible a través de I2P. Una interfaz web para la administración del I2PTunnel está disponible en localhost:7657/i2ptunnel/.

Servicios predeterminados

Túneles de servidor

  • Servidor web I2P - Un túnel apuntando a un servidor web Jetty se ejecuta en localhost:7658 para un hospedaje conveniente y rápido en I2P.
    El documento raíz es:
    Unix - $HOME/.i2p/eepsite/docroot
    Windows - %LOCALAPPDATA%\I2P\I2P Site\docroot, which expands to: C:\Users\**username**\AppData\Local\I2P\I2P Site\docroot

Túneles de cliente

  • I2P HTTP Proxy - localhost:4444 - Un proxy HTTP usado para navegar por I2P y la Internet regular de forma anónima a través de I2P. La navegación por Internet a través de I2P usa un proxy aleatorio especificado por la opción "Outproxies:" (proxys de salida).
  • Irc2P - localhost:6668 - Un túnel IRC hasta la red IRC anónima por defecto, Irc2P.
  • gitssh.idk.i2p - localhost:7670 - SSH access to the project Git repository
  • smtp.postman.i2p - localhost:7659 - Un servicio SMTP proporcionado por postman en hq.postman.i2p.xyz
  • pop3.postman.i2p - localhost:7660 - El servicio POP acompañante de postman en hq.postman.i2p.xyz

Configuración

Configuración de I2PTunnel

Modos de cliente

Estándar

Abre un puerto TCP local que conecta con un servicio (como HTTP, FTP o SMTP) en un destino dentro de I2P. El túnel es dirigido a un servidor aleatorio desde la lista de destinos separados por comas (", ").

HTTP

Un túnel de cliente-HTTP. El túnel conecta con el destino especificado por la URL en una petición HTTP. Soporta proxificación en Internet si se proporciona un proxy externo (`outproxy`). Desnuda las conexiones HTTP de las siguientes cabeceras:

  • Accept*: (not including "Accept" and "Accept-Encoding") as they vary greatly between browsers and can be used as an identifier.
  • Referer:
  • Via:
  • From:

The HTTP client proxy provides a number of services to protect the user and to provide a better user experience.

  • Request header processing:
    • Strip privacy-problematic headers
    • Routing to local or remote outproxy
    • Outproxy selection, caching, and reachability tracking
    • Hostname to destination lookups
    • Host header replacement to b32
    • Add header to indicate support for transparent decompression
    • Force connection: close
    • RFC-compliant proxy support
    • RFC-compliant hop-by-hop header processing and stripping
    • Optional digest and basic username/password authentication
    • Optional outproxy digest and basic username/password authentication
    • Buffering of all headers before passing through for efficiency
    • Jump server links
    • Jump response processing and forms (address helper)
    • Blinded b32 processing and credential forms
    • Supports standard HTTP and HTTPS (CONNECT) requests
  • Response header processing:
    • Check for whether to decompress response
    • Force connection: close
    • RFC-compliant hop-by-hop header processing and stripping
    • Buffering of all headers before passing through for efficiency
  • HTTP error responses:
    • For many common and not-so-common errors, so the user knows what happened
    • Over 20 unique translated, styled, and formatted error pages for various errors
    • Internal web server to serve forms, CSS, images, and errors

Transparent Response Compression

The i2ptunnel response compression is requested with the HTTP header:

  • X-Accept-Encoding: x-i2p-gzip;q=1.0, identity;q=0.5, deflate;q=0, gzip;q=0, *;q=0

The server side strips this hop-by-hop header before sending the request to the web server. The elaborate header with all the q values is not necessary; servers should just look for "x-i2p-gzip" anywhere in the header.

The server side determines whether to compress the response based on the headers received from the webserver, including Content-Type, Content-Length, and Content-Encoding, to assess if the response is compressible and is worth the additional CPU required. If the server side compresses the response, it adds the following HTTP header:

  • Content-Encoding: x-i2p-gzip

If this header is present in the response, the HTTP client proxy transparently decompresses it. The client side strips this header and gunzips before sending the response to the browser. Note that we still have the underlying gzip compression at the I2CP layer, which is still effective if the response is not compressed at the HTTP layer.

This design and the current implementation violate RFC 2616 in several ways:

  • X-Accept-Encoding is not a standard header
  • Does not dechunk/chunk per-hop; it passes through chunking end-to-end
  • Passes Transfer-Encoding header through end-to-end
  • Uses Content-Encoding, not Transfer-Encoding, to specify the per-hop encoding
  • Prohibits x-i2p gzipping when Content-Encoding is set (but we probably don't want to do that anyway)
  • The server side gzips the server-sent chunking, rather than doing dechunk-gzip-rechunk and dechunk-gunzip-rechunk
  • The gzipped content is not chunked afterwards. RFC 2616 requires that all Transfer-Encoding other than "identity" is chunked.
  • Because there is no chunking outside (after) the gzip, it is more difficult to find the end of the data, making any implementation of keepalive harder.
  • RFC 2616 says Content-Length must not be sent if Transfer-Encoding is present, but we do. The spec says ignore Content-Length if Transfer-Encoding is present, which the browsers do, so it works for us.

Changes to implement a standards-compliant hop-by-hop compression in a backward-compatible manner are a topic for further study. Any change to dechunk-gzip-rechunk would require a new encoding type, perhaps x-i2p-gzchunked. This would be identical to Transfer-Encoding: gzip, but would have to be signalled differently for compatibility reasons. Any change would require a formal proposal.

Transparent Request Compression

Not supported, although POST would benefit. Note that we still have the underlying gzip compression at the I2CP layer.

Persistence

The client and server proxies do not currently support RFC 2616 HTTP persistent sockets on any of the three hops (browser socket, I2P socket, server socket). Connection: close headers are injected at every hop. Changes to implement a persistence are under investigation. These changes should be standards-complaint and backwards-compatible, and would not require a formal proposal.

Pipelining

The client and server proxies do not currently support RFC 2616 HTTP pipelining and there are no plans to do so. Modern browswers do not support pipelining through proxies because most proxies cannot implement it correctly.

Compatibility

Proxy implementations must work correctly with other implementations on the other side. Client proxies should work without a HTTP-aware server proxy (i.e. a standard tunnel) on the server side. Not all implementations support x-i2p-gzip.

User Agent

Dependiendo de si el túnel está usando un proxy externo (`outproxy`) o no, adherirá el siguiente Agente de Usuario (`User-Agent`):

  • Proxy de salida: User-Agent: Uses the user agent from a recent Firefox release on Windows
  • Uso interno de I2P: User-Agent: MYOB/6.66 (AN/ON)

IRC Client

Crea una conexión a un servidor IRC aleatorio especificado por una lista de destinos separados por coma (", "). Sólo un subconjunto de comandos IRC de la lista blanca están permitidos debido a cuestiones de anonimato. The following allow list is for commands inbound from the IRC server to the IRC client.
Allow list:

  • AUTHENTICATE
  • CAP
  • ERROR
  • H
  • JOIN
  • KICK
  • MODE
  • NICK
  • PART
  • PING
  • PROTOCTL
  • QUIT
  • TOPIC
  • WALLOPS

There is also an allow list is for commands outbound from the IRC client to the IRC server. It is quite large due to the number of IRC administrative commands. See the IRCFilter.java source for details. The outbound filter also modifies the following commands to strip identifying information:

  • NOTICE
  • PART
  • PING
  • PRIVMSG
  • QUIT
  • USER

SOCKS 4/4a/5

Habilita el uso del router I2P como un proxy SOCKS.

SOCKS IRC

Habilita el uso de un router I2P como un proxy SOCKS con la lista blanca de comandos especificada por el modo cliente del IRC.

CONNECT

Crea un túnel HTTP y usa el método de petición HTTP "CONNECT" para construir un túnel TCP que normalmente se usa para SSL y HTTPS.

Streamr

Crea un servidor-UDP adosado a un I2PTunnel de cliente `Streamr`. El túnel del cliente streamr se suscribirá a un túnel de servidor streamr.


Modos de servidor

Estándar

Crea un destino hacia una dirección IP:puerto local con un puerto TCP abierto.

HTTP

Crea un destino a un servidor HTTP local IP:puerto Soporta gzip para las peticiones con `Accept-encoding: x-i2p-gzip`, responde con `Content-encoding: x-i2p-gzip` a tal petición.

The HTTP server proxy provides a number of services to make hosting a website easier and more secure, and to provide a better user experience on the client side.

  • Request header processing:
    • Header validation
    • Header spoof protection
    • Header size checks
    • Optional inproxy and user-agent rejection
    • Add X-I2P headers so the webserver knows where the request came from
    • Host header replacement to make webserver vhosts easier
    • Force connection: close
    • RFC-compliant hop-by-hop header processing and stripping
    • Buffering of all headers before passing through for efficiency
  • DDoS protection:
    • POST throttling
    • Timeouts and slowloris protection
    • Additional throttling happens in streaming for all tunnel types
  • Response header processing:
    • Stripping of some privacy-problematic headers
    • Mime type and other headers check for whether to compress response
    • Force connection: close
    • RFC-compliant hop-by-hop header processing and stripping
    • Buffering of all headers before passing through for efficiency
  • HTTP error responses:
    • For many common and not-so-common errors and on throttling, so the client-side user knows what happened
  • Transparent response compression:
    • The web server and/or the I2CP layer may compress, but the web server often does not, and it's most efficient to compress at a high layer, even if I2CP also compresses. The HTTP server proxy works cooperatively with the client-side proxy to transparently compress responses.

HTTP Bidirectional

Deprecated

Functions as both a I2PTunnel HTTP Server, and a I2PTunnel HTTP client with no outproxying capabilities. An example application would be a web application that does client-type requests, or loopback-testing an I2P Site as a diagnostic tool.

IRC Server

Crea un destino que filtra la secuencia de registro de un cliente y pasa la clave de destino de los clientes como un nombre de servidor al servidor-IRC.

Streamr

Se crea un cliente-UDP que conecta a los servidores de medios. El cliente-UDP está emparejado con el I2PTunnel de servidor Streamr.