jotyGill / openpyn-nordvpn

Easily connect to and switch between, OpenVPN servers hosted by NordVPN on Linux (+patch leakes)
GNU General Public License v3.0
628 stars 114 forks source link

POC: Adding config based ports #229

Closed ryanolee closed 5 years ago

ryanolee commented 5 years ago

What is this?

This PR is a preposed solution to the issues outlined here https://github.com/jotyGill/openpyn-nordvpn/issues/228. It aims to add more customisation to the ports exposed when using the -f option.

How does it work?

A new set of options (--allow-config and --allow-config-json) have been added. These options load a JSON config object that gets converted into a series of ip table rules that get loaded before the firewall to exclude certain ports.

Current state

This code had been tested in a docker env (which I can add to a separate PR if there is interest in that) that does not fully cover all of the code In this PR. More testing will be needed on this front if we do want to go forwards with this idea. Additionally we will likely want to add testing around this before merging

Let me know if this is set up ok as it is my first real Open Source PR 😄!

Any commentary on it would be of great help

jotyGill commented 5 years ago

Again thank you for putting time into this.

my first real Open Source PR smile! Welcome! (setup looks good to me)

I'll merge this now to apply my changes on top. we'll see what breaks.

ryanolee commented 5 years ago

🙏