A Python port of the Invisible Internet Project (I2P)
1"""Generic TCP server tunnel — accepts I2P connections, forwards to local service.
2
3Ported from net.i2p.i2ptunnel.I2PTunnelServer.
4"""
5
6from __future__ import annotations
7
8import logging
9
10from i2p_apps.i2ptunnel.tasks import ServerTunnelTask
11
12logger = logging.getLogger(__name__)
13
14
15class GenericServerTask(ServerTunnelTask):
16 """Generic TCP server tunnel.
17
18 Accepts incoming I2P connections via SAM STREAM ACCEPT and forwards
19 each to the configured local target_host:target_port.
20
21 The base class (ServerTunnelTask) already implements the full
22 accept-loop and bridge pattern. This concrete class exists for
23 type dispatch in the controller.
24 """
25 pass