-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat(nordvpn): new API endpoint and wireguard support #1380
Conversation
this should help to resolve #134 i think i can get wireguard working for nordvpn |
also can help with #719 |
d5fa92e
to
25d8abf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there, thanks for the contribution. And sorry for the huge delay, I was afk for a good few weeks.
I wasn't aware NordVPN had this much more advanced API endpoint, which simplifies a lot the Wireguard implementation as you've done, good job 👍
However, there are a few problems to resolve:
- First, let's split away the generics refactoring to another PR since it has little to do with Nordvpn+Wireguard.
- Even further, we could split your work in 1 PR for using the newer NordVPN API, and one for adding Wireguard support for Nordvpn. Not super compulsory, but it would be nice.
- Can NordVPN servers have 0 location? Or more than 1 location? Why?
- Move back the structure to how it was (api package -> updater package) so it matches all other providers. The changes still match the older interface and so on so there is no need to divert from it.
- A bunch of small comments here and there.
Let me know if you can do it, otherwise I can finish it up if you moved on to something else 😉
yeah i can address those issues, i would like to start a few conversation in regards the interfaces and the files/models and so on,, but again i would do so in separate threads |
I'm working on this branch;
EDIT: never mind found the public key in the metadata! Other question... is it the same private key and interface address ( |
79570cd
to
4c7589f
Compare
@bubuntux I rebased/reworked the entire PR, it's now made of 3 commits which will get rebased and merged on the master branch, doing the following:
Not the right time, but I'll keep this in mind. I need to finish up using a newer DNS in Gluetun and reworking the entire 'loop' start/stop logic, to be able to do (optional) API calls to i.e. the nordvpn API to get a recommended server. |
hey @qdm12 thanks for looking into this branch i haven't had the chance to comeback to this, regarding
|
@bubuntux thanks for getting back! You can already try the image from this PR (well duplicate #1598), see #134 (comment)
|
@qdm12 i was unable to test using
i'm sure is something silly, but i didn't have the time to troubleshoot tbh, may be able to look at it later. i'm confident the WIREGUARD_ADDRESS is fix to 10.5.0.2/32 similar to how is done here https://github.com/bubuntux/nordlynx/blob/4bd50d58911eaf4c31b2d2f4c393fc698b118e13/root/etc/services.d/wireguard/run#LL26C1-L26C34 (i though i set that on my initial changes) and the private key is gonna work with all the servers for sure. |
The image was tagged Anyway trying it with:
Works fine (well obviously the connection doesn't work, I don't have a nordvpn account 😉) Maybe have a go with
No worry, please don't I have some free time finally so I can look into it.
Are you sure the address is not BY USER??? I guess I can override it for Nordvpn wireguard so users don't have to specify it, but that looks a bit strange 🤔 |
|
Alright then, it should now default by itself the addresses to |
- Add `country` field (previous `region` value) - `region` field is now the continental region - Add `city` field
@qdm12 i just did a test of the branch and seems to be working as expected
noticed that is using 1.1.1.1 dns (nordvpn defaults are 103.86.96.100, 103.86.99.100) , i verified that the public ip address was the new zeland one ( using wget -qO- ipconfig.io ) I was able to select an specific server based on region, hostname, city and such using env variables |
I tried it out as well and can confirm that everything works just fine got my wg-key via
then i was able to veryfy that the container's network is routed via the connected vpn |
- Updater changed to parse Wireguard servers - Wireguard servers data added - NordVPN added as native Wireguard provider - Default port set to 51820
@bubuntux would you have an idea how to extract your private key using Docker? Just drafted: docker run -it --rm debian
apt-get update -y
apt-get install -y curl
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
nordvpn login but this needs |
@qdm12 i have that already using |
the code is on this repo https://github.com/bubuntux/nordvpn/tree/get_private_key |
Awesome thanks, I documented it there: https://github.com/qdm12/gluetun/wiki/NordVPN |
@qdm12 i would also add the SERVER_CITIES env variable in the documentation now that is supported with the new api |
Done in qdm12/gluetun-wiki@c46180d |
(EDIT by qdm12):
Try it with: