docker-transmission-openvpn/docs/provider-specific.md
edgd1er b65dedd01e
Add feature to NORDVPN: connect directly to a known server. (#2142)
* Add feature NORDVPN_SERVER, to download directly server's config.

* define vars as empty to avoid unbound variables

* restore shebang, define default values for NORDVPN_*
2022-01-29 15:35:11 +09:00

4.5 KiB

COMING SOON

NOTE: This page is just moved from it's previous location. A re-write is coming. I'm on it (#1558)

NORDVPN

The update script is based on the NordVPN API. The API sends back the best recommended OpenVPN configuration file based on the filters given.

Available ENV variables in the container to define via the NordVPN API the file to use are:

Variable Function Example
NORDVPN_COUNTRY Two character country code. See /servers/countries for full list. NORDVPN_COUNTRY=US
NORDVPN_CATEGORY Server type (P2P, Standard, etc). See /servers/groups for full list. Use either title or identifier from the list. NORDVPN_CATEGORY=legacy_p2p
NORDVPN_PROTOCOL Either tcp or udp. (values identifier more available at https://api.nordvpn.com/v1/technologies, may need script adaptation) NORDVPN_PROTOCOL=tcp
NORDVPN_SERVER Set VPN server FQDN to use, bypasses API recommendations and downloads server's config file. NORDVPN_SERVER= sg460.nordvpn.com

The file is then downloaded using the API to find the best server according to the variables, here an albanian, using tcp:

One optional ENV var NORDVPN_TESTS can take value from 1 to 4. Expected generic results are written to logs.

NORDVPN_TESTS Comment
1 Test when nothing is set: All NORDVPN_{COUNTRY, PROTOCOL, CATEGORY} are not set
2 Test when category is not set: NORDVPN_{COUNTRY, PROTOCOL} are set, NORDVPN_CATEGORY is not set
3 Test when api returns no result, send a warning with current parameters.
4 Test when NORDVPN_SERVER is set, config file should be downloaded.

get list of servers and load: curl --silent https://api.nordvpn.com/server/stats | jq '. | to_entries|sort_by(.value.percent) | "\(.[].key): \(.[].value.percent)"'

get load of a specific server: curl --silent https://api.nordvpn.com/server/stats/ca1509.nordvpn.com | jq '.percent'

get list of available servers: curl --silent https://api.nordvpn.com/server/stats | jq '. |to_entries | .[].key')

MULLVAD

According to (#1355) ipv6 needs to be enabled for mullvad vpn this is an example for docker compose

# ipv6 must be enabled for Mullvad to work
        sysctls:
            - "net.ipv6.conf.all.disable_ipv6=0"

or add following line to docker run

--sysctl net.ipv6.conf.all.disable_ipv6=0

NJAL.LA

Njal.la provides .ovpn configuration file. User needs to specify to enable ipv6.

Here is a full example of docker-compose.yml file, assuming configuration file named Njalla-VPN.ovpn is under local config subdirectory.

version: '3.3'
services:
    transmission-openvpn:
      cap_add:
        - NET_ADMIN
      volumes:
        - ./config/Njalla-VPN.ovpn:/etc/openvpn/custom/default.ovpn:rw
        - ./data:/data:rw
      dns:
        - 1.1.1.1
      devices:
        - /dev/net/tun
      sysctls:
        # must enable ipv6 to have njal.la work
        - net.ipv6.conf.all.disable_ipv6=0
      environment:
        - OPENVPN_PROVIDER=CUSTOM
        - OPENVPN_USERNAME=user
        - OPENVPN_PASSWORD=pass
        - LOCAL_NETWORK=192.168.1.0/24
        - HEALTH_CHECK_HOST=google.com
      ports:
         - '9091:9091'
      logging:
        driver: json-file
        options:
          max-size: 10m
      image: haugene/transmission-openvpn:latest