Rafficer / linux-cli-community

Linux command-line client for ProtonVPN. Written in Python.
https://protonvpn.com
GNU General Public License v3.0
1.31k stars 198 forks source link

[BUG] is_valid_ip checks an IPv4 format, IPv6 fails #286

Open Utopiah opened 3 years ago

Utopiah commented 3 years ago

Describe the bug While trying to add an IPv6 address in split tunneling it rejects it as invalid.

To Reproduce Steps to reproduce the behavior:

  1. sudo protonvpn configure
  2. 6) Split Tunneling
  3. Enable split tunneling? [y/N]: y
  4. try to add ::1
  5. invalid IP

Expected behavior Accept IPv6 addresses. If not, clarify that only IPv4 is supported for now.

Error Messages/Program Output/Log Messages (~/.pvpn-cli/pvpn-cli.log)

[!] Invalid IP

Please enter an IP or CIDR to exclude from VPN.

Desktop (please complete the following information):

Additional context If IPv6 is supported seems like is_valid_ip in utils.py should also match IPv6 address format with another regex.