edgd1er / nordlynx-proxy

use nordvpn app to open a vpn connection, run a socks proxy
17 stars 8 forks source link

Local_network environment only allows one subnet #13

Closed 1Dimension1 closed 2 years ago

1Dimension1 commented 2 years ago

From the Readme there should be a option to add more subnets.

LOCAL_NETWORK: add subnet to allow, multiple values possible net1, net2, net3, ....

When i change this in my config to:

from: - LOCAL_NETWORK=192.168.0.0/16 to: - LOCAL_NETWORK=192.168.0.0/16,10.100.100.0/24

Then tinyproxy is not able to start anymore due to a config error:

tinyproxy: ERROR (spawn error)
2022-06-01 16:17:57,007 INFO exited: start_vpn (exit status 7; not expected)
2022-06-01 16:17:58,010 INFO spawned: 'tinyproxy' with pid 801
Unable to parse config file. Not starting.
Syntax error on line 229
2022-06-01 16:17:59,020 INFO exited: tinyproxy (exit status 70; not expected)
2022-06-01 16:18:01,033 INFO spawned: 'tinyproxy' with pid 808
Unable to parse config file. Not starting.
Syntax error on line 229
2022-06-01 16:18:02,047 INFO exited: tinyproxy (exit status 70; not expected)
2022-06-01 16:18:05,053 INFO spawned: 'tinyproxy' with pid 817
Unable to parse config file. Not starting.
Syntax error on line 229
2022-06-01 16:18:06,063 INFO exited: tinyproxy (exit status 70; not expected)
2022-06-01 16:18:07,065 INFO gave up: tinyproxy entered FATAL state, too many start retries too quickly

Do you have an idea on how to solve this?

edgd1er commented 2 years ago

tldr; multi local networks are not properly handled.

well, you are right, several problems raised by this issue:

I'll have a look on how to correct this. For the moment consider the multi networks handling broken.

I suspect also a problem when nordvpn status's return cannot be parsed. (error line 229) Could you execute a nordvpn status| grep -oP "(?<=IP: ).+" from the container when you have that error ?

1Dimension1 commented 2 years ago

Thanks for your fast reply:

without local network error:

nordvpn status| grep -oP "(?<=IP: ).+"
xx.xx.xx.xx

with local network error:

nordvpn status| grep -oP "(?<=IP: ).+"
xx.xx.xx.xx

xx.xx.xx.xx = showing nordvpn connected ip

I have now mitigated the issue by putting the proxy in another zone and use masquarade to change the source ip