Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim spaces from each CSV element for filter values #2230

Open
backcountrymountains opened this issue Apr 18, 2024 · 3 comments
Open

Trim spaces from each CSV element for filter values #2230

backcountrymountains opened this issue Apr 18, 2024 · 3 comments
Labels
Category: Foolproof settings 👼 Category: Motivated! 🙌 Your pumpness makes me pumped! The issue or PR shows great motivation! Status: 🗯️ Waiting for feedback

Comments

@backcountrymountains
Copy link

Is this urgent?

No

Host OS

Debian buster

CPU arch

x86_64

VPN service provider

NordVPN

What are you using to run the container

Portainer

What is the version of Gluetun

Running version v3.38.0 built on 2024-03-25T15:53:33.983Z (commit b3ceece)

What's the problem 🤔

EDIT: I think the issue might actually be the space between United States and Canada. Using united states,canada doesn't throw an error. Perchance this is and issue with spaces, not cases!

Using NordVPN: SERVER_COUNTRIES with United States, Canada fails
the country specified is not valid: value is not one of the possible choices: value canada, choices available are
...
Cambodia, Canada, Cayman Islands, Chile,
...
I'm using Portainer with the Environment variables section and the following does not work:
image
but
image
does work.

Could this be a Portainer-specific issue?

Anyway, the quick fix for me is to note that the comma separated list must not contain spaces between items. Perhaps this could be added to the wiki?

Everything else is great!

Share your logs (at least 10 lines)

Running version v3.38.0 built on 2024-03-25T15:53:33.983Z (commit b3ceece)
2024-04-18T11:20:45-06:00 ERROR VPN settings: provider settings: server selection: for VPN service provider nordvpn: the country specified is not valid: value is not one of the possible choices: value  canada, choices available are Albania, Algeria, Andorra, Argentina, Armenia, Australia, Austria, Azerbaijan, Bahamas, Bangladesh, Belgium, Belize, Bermuda, Bhutan, Bolivia, Bosnia and Herzegovina, Brazil, Brunei Darussalam, Bulgaria, Cambodia, Canada, Cayman Islands, Chile, Colombia, Costa Rica, Croatia, Cyprus, Czech Republic, Denmark, Dominican Republic, Ecuador, Egypt, El Salvador, Estonia, Finland, France, Georgia, Germany, Ghana, Greece, Greenland, Guam, Guatemala, Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Ireland, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Kazakhstan, Kenya, Lao People's Democratic Republic, Latvia, Lebanon, Liechtenstein, Lithuania, Luxembourg, Malaysia, Malta, Mexico, Moldova, Monaco, Mongolia, Montenegro, Morocco, Myanmar, Nepal, Netherlands, New Zealand, Nigeria, North Macedonia, Norway, Pakistan, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Poland, Portugal, Puerto Rico, Romania, Serbia, Singapore, Slovakia, Slovenia, South Africa, South Korea, Spain, Sri Lanka, Sweden, Switzerland, Taiwan, Thailand, Trinidad and Tobago, Turkey, Ukraine, United Arab Emirates, United Kingdom, United States, Uruguay, Uzbekistan, Venezuela, Vietnam
2024-04-18T11:20:45-06:00 INFO Shutdown successful

Share your configuration

gluetun:
    image: qmcgaw/gluetun:v3.38
    container_name: gluetun
    restart: always
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - "8888:8888/tcp"                         # Gluetun Local Network HTTP proxy
      - "8388:8388/tcp"                         # Gluetun Local Network Shadowsocks
      - "8388:8388/udp"                         # Gluetun Local Network Shadowsocks
      - "8000:8000/tcp"                         #HTTP Status /v1/publicip/ip  /v1/openvpn/status  /v1/dns/status /v1/updater/status

      - "${WEBUI_PORT_LIDARR:?err}:8686"        # WebUI Portal: Lidarr
      - "${WEBUI_PORT_PROWLARR:?err}:9696"      # WebUI Portal: Prowlarr
      - "${WEBUI_PORT_RADARR:?err}:7878"        # WebUI Portal: Radarr
      - "${WEBUI_PORT_SONARR:?err}:8989"        # WebUI Portal: Sonarr
      - "${WEBUI_PORT_QBITTORRENT:?err}:${WEBUI_PORT_QBITTORRENT:?err}"   # WebUI Portal: qBittorrent

      - "${QBIT_PORT_TCP:?err}:6881/tcp"        # Transmission Torrent Port TCP
      - "${QBIT_PORT_UDP:?err}:6881/udp"        # Transmission Torrent Port UDP
      - "${FLARESOLVERR_PORT:?err}:8191"        # Service Port: FlareSolverr

    volumes:
      - ${FOLDER_FOR_CONFIGS:?err}/gluetun:/gluetun
    environment:
      - PUID=${PUID:?err}
      - PGID=${PGID:?err}
      - TZ=${TIMEZONE:?err}
      - VPN_SERVICE_PROVIDER=${VPN_SERVICE_PROVIDER:?err}
      - OPENVPN_USER=${OPENVPN_USER:?err}
      - OPENVPN_PASSWORD=${OPENVPN_PASSWORD:?err}
      - SERVER_COUNTRIES=${SERVER_COUNTRIES:?err}
      - FIREWALL_OUTBOUND_SUBNETS=${LOCAL_SUBNET:?err}
      - HTTPPROXY=on
      - SHADOWSOCKS=on
    networks:
      - media-network
Copy link
Contributor

@qdm12 is more or less the only maintainer of this project and works on it in his free time.
Please:

@qdm12
Copy link
Owner

qdm12 commented Apr 27, 2024

Thanks for the detailed issue report, I'm traveling right now so I cannot test much really, but can you try to see if the latest image (docker pull qmcgaw/gluetun) has the bug still? Settings parsing was changed, and spaces may be trimmed. Otherwise, I'll code it up to trim prefix and suffix spaces for all filter values. Better codify it than documenting it 😉

@qdm12 qdm12 changed the title NordVPN "country specified is not valid: value is not one of the possible choices" uppercase/lowercase or comma separated list issue? Trim spaces from each CSV element for filter values Apr 27, 2024
@qdm12 qdm12 added Status: 🗯️ Waiting for feedback Category: Motivated! 🙌 Your pumpness makes me pumped! The issue or PR shows great motivation! Category: Foolproof settings 👼 labels Apr 28, 2024
@backcountrymountains
Copy link
Author

I was also traveling.

Running version latest built on 2024-05-02T16:57:20.083Z (commit fb145d6)

========================================
========================================
=============== gluetun ================
========================================
=========== Made with ❤️ by ============
======= https://github.com/qdm12 =======
========================================
========================================
Running version latest built on 2024-05-02T16:57:20.083Z (commit fb145d6)
🔧 Need help? https://github.com/qdm12/gluetun/discussions/new
🐛 Bug? https://github.com/qdm12/gluetun/issues/new
✨ New feature? https://github.com/qdm12/gluetun/issues/new
☕ Discussion? https://github.com/qdm12/gluetun/discussions/new
💻 Email? [email protected]
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2024-05-02T15:34:06-06:00 INFO [routing] default route found: interface eth0, gateway 172.28.10.1, assigned IP 172.28.10.2 and family v4
2024-05-02T15:34:06-06:00 INFO [routing] local ethernet link found: eth0
2024-05-02T15:34:06-06:00 INFO [routing] local ipnet found: 172.28.10.0/24
2024-05-02T15:34:06-06:00 INFO [firewall] enabling...
2024-05-02T15:34:06-06:00 INFO [firewall] enabled successfully
2024-05-02T15:34:07-06:00 INFO [storage] merging by most recent 19425 hardcoded servers and 19425 servers read from /gluetun/servers.json
2024-05-02T15:34:07-06:00 ERROR VPN settings: provider settings: server selection: for VPN service provider nordvpn: the country specified is not valid: value is not one of the possible choices: value  Mexico, choices available are Albania, Algeria, Andorra, Argentina, Armenia, Australia, Austria, Azerbaijan, Bahamas, Bangladesh, Belgium, Belize, Bermuda, Bhutan, Bolivia, Bosnia and Herzegovina, Brazil, Brunei Darussalam, Bulgaria, Cambodia, Canada, Cayman Islands, Chile, Colombia, Costa Rica, Croatia, Cyprus, Czech Republic, Denmark, Dominican Republic, Ecuador, Egypt, El Salvador, Estonia, Finland, France, Georgia, Germany, Ghana, Greece, Greenland, Guam, Guatemala, Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Ireland, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Kazakhstan, Kenya, Lao People's Democratic Republic, Latvia, Lebanon, Liechtenstein, Lithuania, Luxembourg, Malaysia, Malta, Mexico, Moldova, Monaco, Mongolia, Montenegro, Morocco, Myanmar, Nepal, Netherlands, New Zealand, Nigeria, North Macedonia, Norway, Pakistan, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Poland, Portugal, Puerto Rico, Romania, Serbia, Singapore, Slovakia, Slovenia, South Africa, South Korea, Spain, Sri Lanka, Sweden, Switzerland, Taiwan, Thailand, Trinidad and Tobago, Turkey, Ukraine, United Arab Emirates, United Kingdom, United States, Uruguay, Uzbekistan, Venezuela, Vietnam
2024-05-02T15:34:07-06:00 INFO Shutdown successful

I think it's the same:
Canada, Mexico, Germany Doesn't work but
Canada,Mexico,Germany does work

Thanks for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Foolproof settings 👼 Category: Motivated! 🙌 Your pumpness makes me pumped! The issue or PR shows great motivation! Status: 🗯️ Waiting for feedback
Projects
None yet
Development

No branches or pull requests

2 participants