A Python port of the Invisible Internet Project (I2P)
1"""IRC client tunnel — connects local IRC client to I2P IRC servers.
2
3Extends GenericClientTask with IRC protocol filtering to strip
4CTCP/DCC messages that could leak identity information.
5
6Ported from net.i2p.i2ptunnel.I2PTunnelIRCClient.
7"""
8
9from __future__ import annotations
10
11import logging
12
13from i2p_apps.i2ptunnel.config import TunnelDefinition, TunnelType
14from i2p_apps.i2ptunnel.client_task import GenericClientTask
15
16logger = logging.getLogger(__name__)
17
18
19class IRCClientTask(GenericClientTask):
20 """IRC client tunnel with protocol filtering.
21
22 Like GenericClientTask but applies IRC-specific filtering
23 to strip CTCP/DCC messages that could reveal user identity.
24 Supports multiple comma-separated IRC server destinations.
25 """
26
27 def __init__(self, config: TunnelDefinition, session) -> None:
28 super().__init__(config, session)
29 self._uses_irc_filter = True