mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-09-30 19:08:03 +03:00
Fix WIN32 set interface DNS bug
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -156,19 +156,20 @@ class SystemRoutingTable:
|
||||
try:
|
||||
if dhcp:
|
||||
result = runExternalCommand(
|
||||
'netsh interface ip set dns'.split() + [f'name=\"{name}\"', 'dhcp'],
|
||||
f'netsh interface ip set dns name=\"{name}\" dhcp',
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
shell=True,
|
||||
check=True,
|
||||
)
|
||||
else:
|
||||
assert address is not None
|
||||
|
||||
result = runExternalCommand(
|
||||
'netsh interface ip set dns'.split()
|
||||
+ [f'name=\"{name}\"', 'static', f'{address}'],
|
||||
f'netsh interface ip set dns name=\"{name}\" static {address}',
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
shell=True,
|
||||
check=True,
|
||||
)
|
||||
except subprocess.CalledProcessError as err:
|
||||
|
||||
Reference in New Issue
Block a user