A Python port of the Invisible Internet Project (I2P)
1"""Tunnel hop configuration dataclass.
2
3Ported from net.i2p.router.tunnel.HopConfig.
4"""
5
6from dataclasses import dataclass, field
7
8
9@dataclass
10class TunnelHopConfig:
11 """Configuration for one hop in a tunnel build."""
12
13 peer_hash: bytes # 32 bytes — router identity hash
14 receive_tunnel_id: int # random uint32 tunnel ID
15 layer_key: bytes # 32 bytes — AES key for tunnel layer encryption
16 iv_key: bytes # 32 bytes — IV key for tunnel layer
17 reply_key: bytes # 32 bytes — for build reply
18 reply_iv: bytes # 16 bytes — for build reply
19 is_gateway: bool = False
20 is_endpoint: bool = False