linux-cli-community icon indicating copy to clipboard operation
linux-cli-community copied to clipboard

Provide support for openwrt / LUCI

Open JustGitting opened this issue 5 years ago • 6 comments

Hi,

Given OpenWRT is widely used in routers and is FOSS. It would be fantastic to be able to use the ProtonVPN CLI as part of the OpenWRT system.

I've searched https://protonvpn.com/support/ for instructions on using ProtonVPN CLI with OpenWRT, but no results are found.

JustGitting avatar Oct 17 '20 02:10 JustGitting

this!

bytepoet avatar Oct 29 '20 04:10 bytepoet

I actually have it working on OpenWRT but it's kind of a pain because the python dependencies are so heavy--my WRT1900ACS v2 only has enough space for them if I compile the firmware myself. I've been trying to find the time to port it to a proper OpenWRT package but have not gotten around to learning how.

If you're comfortable customizing your OpenWRT installation and compiling the firmware from source I can give you some pointers on how to add this package.

Algebro7 avatar Dec 14 '20 19:12 Algebro7

Did you just install the cli and run it in the background? Did you lose any OpenWRT functions, like Adblock?

bcskillings avatar Feb 15 '21 04:02 bcskillings

Did you just install the cli and run it in the background?

The python dependencies were way too heavy to install in a running system with opkg, I had to create a custom OpenWRT build and compile it into the firmware. Afterwards I ran a script on a cronjob that checks if its connected and runs protonvpn c -f if not.

Did you lose any OpenWRT functions, like Adblock?

Everything seems to work fine, although I'm not using a network level adblock. vpn-policy-routing for selective bypass based on IP/hostname works well.

Algebro7 avatar Feb 15 '21 13:02 Algebro7

What are you running it on? I’m going to be using a nanopi r4s (4Gb ram version) so I should be able to run something resource intensive (unless there’s some limitations preventing that with OpenWRT?) Either way, do you mind sharing what you did to customize OpenWRT to allow this to work?

bcskillings avatar Feb 15 '21 15:02 bcskillings

It's not resource intensive in terms of runtime, its that most routers have very limited space (in some cases just a few MB) for storing data outside the firmware. I don't think you'd have this problem on a Pi but I'm not sure how the OpenWRT partitions are set up on other devices.

You might try just installing python3 and pip with opkg and then installing the CLI with pip first since you might have enough space on that device, and it would save you a lot of headache involved with compiling your own image. If that doesn't work I can share my notes later once I can get to them

Algebro7 avatar Feb 15 '21 15:02 Algebro7