What's new

Manage NordVPN recommended servers through addons API page

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

h0me5k1n

Occasional Visitor
I've been running a script on my AC68U for a while now that runs automatically to check for the recommended VPN server from NordVPN twice a week during the night and switches to it.

With the introduction of the addons API capability I think the wider use of this could be made much easier! If I had a new page in the "VPN" section where I could select which VPN client connection (1-5) was using NordVPN, a webui could be used to choose the preferred settings (country, server type and protocol) and manually switch to a recommended server... or even configure a schedule.

I have a couple of questions...

Does the API have access to all existing nvram settings? not just the custom/new ones?

I know very little about building webpages!
Can I feed results from a script that runs run back to the page to show results?
Can I use an iframe?
 
Here's the script. It can switch to the recommended NordVPN server (hardcoded to udp at the moment) and can set up a cron/cru job for scheduled updates...

... still stuck on the web UI part of the addon. I'd like to be able to switch and configure scheduled checks using an asp page :(

https://github.com/h0me5k1n/asusmerlin-nvpnmgr
 
Looks good! I'm not sure what SCRIPTSECTION is for? I'd also recommend looking into using jq - it may be simpler to use to parse the JSON
 
The SCRIPTSECTION is just for logging/debugging... So I know where it failed if it does!

I didn't use jq as I didn't want it dependent on anything outside of the script. I think jq is installed through entware.

Also... Never used github/git before so I'm learning this too ;)
 
The SCRIPTSECTION is just for logging/debugging... So I know where it failed if it does!

I didn't use jq as I didn't want it dependent on anything outside of the script. I think jq is installed through entware.
It is, but you rely on a JSON parsing script that's hosted on another user's Github ;-)
 
I'll be installing this shortly, I'm a NordVPN user myself. Any plans for a CLI menu too? :)
 
Definitely interested in this project...Nord user here as well.
 
Added ability to choose "server type" too - just like you can on the NordVPN recommended servers page under "advanced settings". Available options for "Standard VPN", "Double VPN" and "P2P" (the only ones relevant for Asus Router config).

I'd really be interested in some help configuring a Web UI though... as per my original post ;)
 
Added ability to choose "server type" too - just like you can on the NordVPN recommended servers page under "advanced settings". Available options for "Standard VPN", "Double VPN" and "P2P" (the only ones relevant for Asus Router config).

I'd really be interested in some help configuring a Web UI though... as per my original post ;)
Question, does your script install all the relevant files to /jffs/addons/nvpnmgr (or whatever you want to name it)?

EDIT: Also I'm not sure why the menu and manager scripts are separate? From a quick look through the code it looks like it would be OK to merge the 2. (Less clutter is usually good!)

WebUI looks do-able. If you've got any layout ideas in mind feel free to send me a sketch/wireframe of a page layout
 
Question, does your script install all the relevant files to /jffs/addons/nvpnmgr (or whatever you want to name it)?

EDIT: Also I'm not sure why the menu and manager scripts are separate? From a quick look through the code it looks like it would be OK to merge the 2. (Less clutter is usually good!)

WebUI looks do-able. If you've got any layout ideas in mind feel free to send me a sketch/wireframe of a page layout

Yes... All files to that folder. I know what you mean by "whatever you want to name it" ;) the repo, main script and menu all have different names ☺️. But, hey, I'm learning here and this is the first time I've used github I should probably choose a name and stick to it!

I didn't really want to make any changes to the original script when creating the menu... Although I ended up making minor ones anyway!

Thanks for the offer around the Web UI... I'll have a think!
 
Just to update, I've picked this up as an interesting project. So far I've got things into a single file, now working on understanding the mechanics of the scripts features so I can dabble with a WebUI
YA! What did we do to deserve you?!? ;)
 
Have you tried using the linux app for nordvpn? it might help your process so you don't have to reinvent the wheel. I use Mx Linux where I can use the app via terminal. Taking functionality like that to the next level for the router would be great.
 
Thanks for the work on this project - looks like a great concept. I have a couple of general VPN questions that i hoped you could help me with.

The main issue I have is that I am living in Australia but want to access UK TV services (BBC, Amazon, Netflix etc) and also access Australia TV services (ABC, etc) at the same time. Can this be achieved with VPN on all the time on the router?

The current solution I use is a DNS proxy (smart DNS proxy) and this works ok but quite often the performance is rubbish and there is a load of buffering - especially BBC.

So I would like to see if I can get a VPN solution to work better than a DNS proxy.

Any help appreciated....
 
Thanks for the work on this project - looks like a great concept. I have a couple of general VPN questions that i hoped you could help me with.

The main issue I have is that I am living in Australia but want to access UK TV services (BBC, Amazon, Netflix etc) and also access Australia TV services (ABC, etc) at the same time. Can this be achieved with VPN on all the time on the router?

The current solution I use is a DNS proxy (smart DNS proxy) and this works ok but quite often the performance is rubbish and there is a load of buffering - especially BBC.

So I would like to see if I can get a VPN solution to work better than a DNS proxy.

Any help appreciated....


Have you looked at the scripts via amtm? I think part of your solution is here https://www.snbforums.com/threads/x3mrouting-selective-routing-for-asuswrt-merlin-firmware.57793/

What devices are you using to access those services? PC, Roku, Amazon Firestick etc ? The answer here may lead to using Yadzi so you can separate out devices to specific vpn servers.

Hope that gives you a crumb trail to follow. lol
 
Thanks for the tips. The main device that I want to use to access these services is my Apple TV (gen 4 with app store). I think it would be fine if I only want to access UK services. The challenge is that I want UK then switch to Oz depending on the app/service.

I guess i could have 2-3 different VPN connections and use a script to switch between them (but this is not going to be great for my wife as it needs to be simple)
 
Have you tried using the linux app for nordvpn? it might help your process so you don't have to reinvent the wheel. I use Mx Linux where I can use the app via terminal. Taking functionality like that to the next level for the router would be great.
the script is built around using nordvpn's API so should be fine. if it breaks or causes issues i'll see if they have an application for armhf/aarch64 that can be controlled at CLI
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top