Open GonzRon opened 4 years ago
Would anyone know if the error i get is also related as I have ipv6 disabled as well ;
$ sudo protonvpn c -r 130 _
Traceback (most recent call last):
File "/usr/local/bin/protonvpn", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/protonvpn_cli/cli.py", line 73, in main
cli()
File "/usr/local/lib/python3.8/dist-packages/protonvpn_cli/cli.py", line 114, in cli
connection.random_c(protocol)
File "/usr/local/lib/python3.8/dist-packages/protonvpn_cli/connection.py", line 139, in random_c
openvpn_connect(servername, protocol)
File "/usr/local/lib/python3.8/dist-packages/protonvpn_cli/connection.py", line 456, in openvpn_connect
disconnect(passed=True)
File "/usr/local/lib/python3.8/dist-packages/protonvpn_cli/connection.py", line 344, in disconnect
manage_dns("restore")
File "/usr/local/lib/python3.8/dist-packages/protonvpn_cli/connection.py", line 610, in manage_dns
oldhash = get_config_value("metadata", "resolvconf_hash")
File "/usr/local/lib/python3.8/dist-packages/protonvpn_cli/utils.py", line 123, in get_config_value
return config[group][key]
File "/usr/lib/python3.8/configparser.py", line 1254, in __getitem__
raise KeyError(key)
KeyError: 'resolvconf_hash'
@longwuyuan your issue is not related to this issue or ipv6.
Thanks
Hi,
With Ipv6 kernel module disabled on the host, I believe this is happening because you are calling manage_ipv6 function in connection.py without first checking if ipv6 is available.
in this case running the same command manually reproduces the error warning:
you could simply do the following to absorb stdout and stderr from ipv6 if you don't care about whether your commands are working or not (or if you are not checking for the return status from the command anyways) :
subprocess.run(['ls', '-l'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
Here's the full output