Renew and recover UPnP router mappings

This commit is contained in:
hhqyb
2026-07-26 11:08:00 +08:00
parent 1a18532db0
commit 7a1f20bd3f
2 changed files with 92 additions and 16 deletions

View File

@@ -12,7 +12,7 @@
- TCP 使用同源端口保活连接和 STUN TCP 探测;UDP 持续保活并周期性探测。
- Lucky 内置转发模式:TCP/UDP 流量转发到 `目标地址:目标端口`。
- bind 直转模式:只建立 NAT 映射;由路由器端口转发直接指向目标设备,可保留真实访问者 IP。
- NAT-PMP 与 UPnP IGD 自动上级路由映射。
- NAT-PMP 与 UPnP IGD 自动上级路由映射。UPnP 请求永久租约并每分钟校验;路由器仅支持有限租约时,系统会在到期前续租并在规则丢失后重建。
- Linux `iptables` 自动放行通道端口(每条规则可选)。
- 每条规则保存动态公网地址、端口、IP4P 地址、本地端口、运行状态和日志。
- 支持将状态文件用于 DDNS:`data/state/<规则 ID>.json`。