genotrance/px

Unclear listen setting

asergunovkl opened this issue · 8 comments

Hi. I'm using px on Windows and trying to make it less invasive as possible. So I was trying to limit interfaces it listens with listen= config. The plan was to listen only local loop, hyper-v and virtual box adapters. But for some reason it shows me in log also connections from LAN adapter.

Can you please share your configuration?

Sure.

# listening only local loop and WSL device
listen = 127.0.0.1,172.21.48.1
# Allow answering to WSL machines
gateway = 1
# to make sure it will not interfere other settings
hostonly = 0 
# this one I'm using as workaround to make sure only these clients will be served
allow = 127.0.0.1/8,172.21.48.1/20 

listen only supports one interface at this time. There's issue #195 to support multiple interfaces that is on the roadmap.

gateway simply overrides listen. From the docs:

  Allow remote machines to use proxy. 0 or 1, default: 0
    Overrides 'listen' and binds to all interfaces

That's why Px is listening on everything. allow feature exists to filter only the clients you trust. So you are using those flags as expected.

Oh I see! Thanks for explanation. This override was not clear for me.
It would be great if px communicated that clearly in debug/verbose mode.
Currently it shows listen=<empty> and it's not showing what caused that. Config I had was already modified by colleague so I didn't have any hint there.

Makes sense - I'll add some logging to provide hints.

Thanks a lot!

This is fixed in v0.9.0 still in development - see branch.

That's awesome! Thanks a lot!