Skip to content

Commit

Permalink
Update TUN connect on Windows platform
Browse files Browse the repository at this point in the history
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
  • Loading branch information
LorenEteval committed Nov 6, 2023
1 parent 4817a13 commit 2274520
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Furious/Action/Connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,13 +1037,20 @@ def start():

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,
Expand Down Expand Up @@ -1071,6 +1078,8 @@ def start():
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]])
Expand Down

0 comments on commit 2274520

Please sign in to comment.