GithubHelp home page GithubHelp logo

wgnord's Introduction

wgnord

This script lets you connect to NordVPN servers through WireGuard using their "NordLynx" protocol.

Usage: wgnord [ l(ogin) | c(onnect) | d(isconnect) | a(ccount) ]

login:
    wgnord l "your_token"
    You can generate a (permament) token in the NordVPN dashboard
connect:
    wgnord c france
    -f            Refresh cached longitude/latitude
    -n            Don't connect
    -o out.conf   Write config to different file
disconnect:
    wgnord d
account:
    wgnord a
    Prints information about the currently logged in account

wgnord's files are in /var/lib/wgnord, edit template.conf to change Wireguard options

Installation

Dependencies:

  • jq
  • curl
  • wg-quick (wireguard-tools)
  • openresolv (for dns)

To install them on Arch:

sudo pacman -S --needed jq curl wireguard-tools openresolv

Manual installation:

git clone https://github.com/phirecc/wgnord
cd wgnord
install -Dm644 template.conf /var/lib/wgnord/template.conf
install -Dm644 countries.txt /var/lib/wgnord/countries.txt
install -Dm644 countries_iso31662.txt /var/lib/wgnord/countries_iso31662.txt
sudo install -Dm755 wgnord /usr/bin/wgnord

wgnord can also be installed through the AUR like so:

paru -S wgnord

Usage

Login (you only need to do this once):

sudo wgnord l "your_token"

You can generate a (permament) token in the NordVPN dashboard under Access token > Generate new token

Now you can connect to a server:

sudo wgnord c France

Note: country names are case-insensitive and grepped for, so sudo wgnord c fra would work aswell. See countries.txt for a list of available countries.

To disconnect:

sudo wgnord d

If you want to change WireGuard config parameters (MTU, DNS, etc.), simply modify /var/lib/wgnord/template.conf.

Extra

This script includes a "kill-switch" because of the way wg-quick works. Connections will typically stay alive for multiple days, but if it dies you can reconnect by running another connect command.

Note

This third-party project is in no way affiliated with NordVPN.

wgnord's People

Contributors

phirecc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wgnord's Issues

Server connections impossible

Hi,

as of today, I can no longer connect to an NordVpn server.

Finding best server...
jq: parse error: Invalid numeric literal at line 1, column 20
jq: parse error: Invalid numeric literal at line 1, column 20
jq: parse error: Invalid numeric literal at line 1, column 20
jq: parse error: Invalid numeric literal at line 1, column 20
Connecting to  ()...
[#] ip link add wgnord type wireguard
[#] wg setconf wgnord /dev/fd/63
Line unrecognized: `PublicKey='
Configuration parsing error
[#] ip link delete dev wgnord

Regards.

add a license

currently, despite this code being publicly available, it is still "all rights reserved", and thus not able to be linked against or built upon. I am assuming this was an oversight, would you mind picking a license?

Support: Manually enable ipv6

I would imagine I need to specify an address, and search domain for enabling ipv6 via NordVPN, is that correct? If so what should they be set to to get ipv6 working? If not what is the correct process?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.