# Package net.i2p.i2ptunnel

Implementation of preconfigured tunnels for both clients and servers, with a comprehensive UI for tunnel management and configuration.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  I2PTunnel.ConnectionEventListener | Callback routine to find out
  I2PTunnelRunner.FailCallback | For use in new constructor
  I2PTunnelRunner.SuccessCallback | Callback interface for successful tunnel operation completion.
  Logging | Unified logging interface for I2PTunnel components.

- Class Summary
  Class | Description
  --- | ---
  BlacklistBean | Simple blacklist checker for HTTP proxy.
  BlocklistManager | Manages HTTP blocklists for request filtering.
  ConnThrottler | Connection rate limiter providing basic DoS protection.
  HttpHeaderFormatter | Utility class for formatting HTTP headers.
  HTTPResponseOutputStream | HTTP response stream with transparent gzip decompression (client side).
  I2Ping | I2P ping utility for CLI use.
  I2PTunnel | Manages I2PTunnelTasks and I2PSessions.
  I2PTunnelClient | Standard I2P tunnel client for connecting to I2P destinations
  I2PTunnelClientBase | Abstract base class for I2P client tunnels with common functionality.
  I2PTunnelConnectClient | SSL tunnel through HTTP proxy using CONNECT method.
  I2PTunnelHTTPBidirProxy | HTTP proxy reusing server's I2PSocketManager without outproxy capability.
  I2PTunnelHTTPBidirServer | Bidirectional HTTP server tunnel combining server and client functionality.
  I2PTunnelHTTPClient | HTTP proxy that tunnels requests through I2P.
  I2PTunnelHTTPClientBase | Common things for HTTPClient and ConnectClient Retrofit over them in 0.8.2
  I2PTunnelHTTPClientRunner | HTTP client runner that filters response headers to enforce the "Connection: close" header, ensuring browsers treat the connection as non-persistent, even if the server doesn't comply.
  I2PTunnelHTTPServer | HTTP server tunnel that filters headers and provides compression.
  I2PTunnelIRCClient | IRC client tunnel with DCC support and filtering.
  I2PTunnelIRCServer | IRC server tunnel that filters registration to pass client destination hash as hostname.
  I2PTunnelOutproxyRunner | I2PTunnelOutproxyRunner forwards data bidirectionally between two connected sockets: one representing an external socket connection and the other an I2P socket connection.
  I2PTunnelRunner | Thread that forwards traffic between an I2PSocket and a TCP Socket.
  I2PTunnelServer | Base I2P tunnel server for handling incoming connections.
  I2PTunnelTask | Base class for I2P tunnel servers and clients.
  InternalSocketRunner | Listens for in-JVM connections on internal socket.
  MimeTypeDetector | Utility class for MIME type detection based on URL file extensions.
  RequestValidator | Validates HTTP requests for security and policy compliance.
  RequestValidator.ValidationResult | Encapsulates the result of hostname validation.
  SecurityHeaderBuilder | Builds and manages HTTP security headers for server responses.
  SSLClientUtil | SSL server socket utilities for I2PTunnel clients.
  TunnelController | Coordinate the runtime operation and configuration of a single I2PTunnel.
  TunnelControllerGroup | Coordinates tunnel groups within the JVM, managing configuration persistence.
  TunnelControllerGroup.CustomThreadPoolExecutor | Thread pool executor for I2P tunnel client handlers with custom configuration

- Enum Summary
  Enum | Description
  --- | ---
  I2PTunnelHTTPClientBase.AuthResult | Authentication result status for HTTP client connections
  TunnelController.TunnelState |

## Package net.i2p.i2ptunnel Description

Implementation of preconfigured tunnels for both clients and servers, with a comprehensive UI for tunnel management and configuration. Includes special-purpose tunnels for IRC, SOCKS, HTTP, and standard client/server tunnels.

This package provides the core tunneling infrastructure that allows external applications to communicate through the I2P network. It supports various tunnel types including:

- Client Tunnels: Allow external applications to connect to I2P destinations
- Server Tunnels: Expose local services to the I2P network
- HTTP Tunnels: Web proxy and server tunneling for browsers
- SOCKS Tunnels: Generic SOCKS proxy for TCP applications
- IRC Tunnels: Specialized tunneling for IRC clients
- Streamr Tunnels: Bidirectional streaming tunnels

The entry point is TunnelControllerGroup, which is started from clients.config. Individual tunnel configuration is stored in i2ptunnel.config. The primary API consists of TunnelControllerGroup and TunnelController. Other classes may not be maintained as a stable API.

Key Components:

- TunnelControllerGroup - Manages collections of tunnels
- TunnelController - Controls individual tunnel lifecycle
- TunnelManager - Handles tunnel creation and configuration
- Various tunnel implementations for different protocols