mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-13 01:38:33 +03:00
Update TUN connect on Windows platform
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -1037,13 +1037,20 @@ class ConnectAction(Action):
|
||||
|
||||
break
|
||||
|
||||
eventLoopWait(100)
|
||||
if not self.coreRunning:
|
||||
foundDevice = False
|
||||
|
||||
break
|
||||
else:
|
||||
eventLoopWait(100)
|
||||
|
||||
if not foundDevice:
|
||||
logger.error(
|
||||
f'find TUN device \'{APPLICATION_TUN_DEVICE_NAME}\' failed'
|
||||
)
|
||||
|
||||
return
|
||||
|
||||
RoutingTable.addRelations()
|
||||
RoutingTable.setDeviceGatewayAddress(
|
||||
APPLICATION_TUN_DEVICE_NAME,
|
||||
@@ -1071,6 +1078,8 @@ class ConnectAction(Action):
|
||||
if error:
|
||||
self.coreRunning = False
|
||||
self.disconnectReason = _('DNS resolution failed') + f': {coreAddr}'
|
||||
|
||||
RoutingTable.Relations.clear()
|
||||
else:
|
||||
for address in resolved:
|
||||
RoutingTable.Relations.append([address, defaultGateway[0]])
|
||||
|
||||
Reference in New Issue
Block a user