Clarify Tun2socks runtime constants

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2026-08-12 12:20:17 +08:00
parent 96d02cbf28
commit 883e2c3ec7
3 changed files with 43 additions and 34 deletions
+3 -1
View File
@@ -690,7 +690,9 @@ class SystemRoutingTable:
"""Delete relations."""
if PLATFORM == 'Windows':
if len(SystemRoutingTable.Relations):
SystemRoutingTable.delete('0.0.0.0', APPLICATION_TUN_GATEWAY_ADDRESS)
SystemRoutingTable.delete(
'0.0.0.0', APPLICATION_TUN2SOCKS_GATEWAY_ADDRESS
)
for sourceIP, destinationIP in SystemRoutingTable.Relations[::-1]:
SystemRoutingTable.delete(sourceIP, destinationIP)