edgd1er/nordvpn-proxy

By edgd1er

Updated about 1 year ago

SOCKS5 proxy that connects to the recommended NordVPN servers with openVPN

Image
Networking
1

50K+

edgd1er/nordvpn-proxy repository overview

Project in maintenance mode

Only major problems will be fixed. Please prefer nordlynx-proxy project, it has wireguard and openvpn technology and x10 traffic rate.

nordvpn-proxy

This is a NordVPN client docker container that use the recommended NordVPN servers, and opens a SOCKS5 proxy.

Added docker image version for raspberry.

Whenever the connection is lost the unbound and sock daemon are killed, disconnecting all active connections.

Please note that a wireguard proxy would have much higher rates. see nordlynx_proxy for more information.

What is this?

This image is largely based on jeroenslot/nordvpn-proxy with dante free socks server added. you can then expose port 1080 from the container to access the VPN connection via the SOCKS5 proxy.

In short, this container:

  • Opens the best connection to NordVPN using openvpn and the conf downloaded using NordVpn API according to your criteria.
  • Start a dns server for container resolution
  • Starts a SOCKS5 proxy that routes eth0 to tun0 with dante-server.
  • start an http proxy (tinyproxy).

The main advantage is that you get the best recommendation for each selection.

Usage

Script for OpenVpn config download is base on the one developed for haugene 's docker transmission openvpn https://haugene.github.io/docker-transmission-openvpn/provider-specific/

The container is expecting three informations to select the vpn server:

NOTE: This container works best using the p2p technology.

NOTE: At the moment, this container has no kill switch... meaning that when the VPN connection is down, the connection will be rerouted through your provider.

  • DNS to uses external DNS, if none given: "1.1.1.1@853#cloudflare-dns.com 1.0.0.1@853#cloudflare-dns.com"
  • NORDVPN_LOGIN=email
  • NORDVPN_PASS=pass
docker run -it --rm --cap-add NET_ADMIN -p 1080:1080 -e NORDVPN_LOGIN=<email> -e NORDVPN_PASS='<pass>' -e NORDVPN_COUNTRY=Poland
 -e NORDVPN_PROTOCOL=udp -e NORDVPN_CATEGORY=p2p edgd1er/nordvpn-proxy
services:
  proxy:
    image: edgd1er/nordvpn-proxy:latest
    build:
      context: .
      dockerfile: Dockerfile
    restart: unless-stopped
    ports:
      - "1081:1080"
    devices:
      - /dev/net/tun
    sysctls:
      - net.ipv4.conf.all.rp_filter=2
    cap_add:
      - SYS_MODULE
      - NET_ADMIN
    environment:
      - TZ=Europe/Paris
      - DNS=1.1.1.1@853#cloudflare-dns.com 1.0.0.1@853#cloudflare-dns.com
      #- NORDVPN_COUNTRY=germany #Optional, by default, servers in user's coyntry.
      - NORDVPN_SERVER=de10.nordvpn.com #Optional, get config file base on server's name.bypass the api's recommendations. has precedence over NORDVPN_COUNTRY and NORDVPN_CATEGORY.
      - NORDVPN_PROTOCOL=udp #Optional, udp by default, udp or tcp
      - NORDVPN_CATEGORY=p2p #Optional, Africa_The_Middle_East_And_India, Asia_Pacific, Europe, Onion_Over_VPN, P2P, Standard_VPN_Servers, The_Americas
      - NORDVPN_LOGIN=<email> #Not required if using secrets
      - NORDVPN_PASS=<pass> #Not required if using secrets
      - OPENVPN_PARAMETERS= #optional, empty by default, overrides openvpn config file with parameters
      - OPENVPN_LOGLEVEL= #Optional, define openvpn verbose level 0-9
      - EXIT_WHEN_IP_NOTASEXPECTED=0 # when detected ip is not belonging to remote vpn network
      - WRITE_OVPN_STATUS=1 # 0/1 write openvpn status (CONNECTED/NOTCONNECTED) to /var/tmp/ovpn_status_file
      - LOCAL_NETWORK=192.168.0.0/24
      - TINYPORT=8888 #define tinyport inside the container, optional, 8888 by default,
      - TINYLOGLEVEL=Error #Critical (least verbose), Error, Warning, Notice, Connect (to log connections without Info's noise), Info
      - DANTE_LOGLEVEL="error" #Optional, error by default, available values: connect disconnect error data
      - DANTE_ERRORLOG=/dev/stdout #Optional, /dev/null by default
      - DEBUG=0 #(0/1) activate debug mode for scripts, dante, nginx, tinproxy
    secrets:
      - NORDVPN_LOGIN
      - NORDVPN_PASS


secrets:
  NORDVPN_LOGIN:
    file: ./nordvpn_login
  NORDVPN_PASS:
    file: ./nordvpn_pwd

Tag summary

Content type

Image

Digest

sha256:9d766c11d

Size

42.1 MB

Last updated

about 1 year ago

docker pull edgd1er/nordvpn-proxy