linux-cli-community icon indicating copy to clipboard operation
linux-cli-community copied to clipboard

[BUG] is_valid_ip checks an IPv4 format, IPv6 fails

Open Utopiah opened this issue 4 years ago • 0 comments

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
    1. Split Tunneling
  2. Enable split tunneling? [y/N]: y
  3. try to add ::1
  4. 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):

  • OS: Ubuntu 20.04.2 LTS
  • Python Version: 3.8.5
  • ProtonVPN-CLI Version: v2.2.6

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

Utopiah avatar Feb 14 '21 18:02 Utopiah