Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear listen setting #200

Closed
asergunovkl opened this issue Dec 7, 2023 · 8 comments
Closed

Unclear listen setting #200

asergunovkl opened this issue Dec 7, 2023 · 8 comments

Comments

@asergunovkl
Copy link

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.

@genotrance
Copy link
Owner

Can you please share your configuration?

@asergunovkl
Copy link
Author

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 

@genotrance
Copy link
Owner

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.

@asergunovkl
Copy link
Author

asergunovkl commented Dec 12, 2023

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.

@genotrance
Copy link
Owner

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

@genotrance genotrance added the bug label Dec 12, 2023
@asergunovkl
Copy link
Author

Thanks a lot!

genotrance added a commit that referenced this issue Dec 20, 2023
@genotrance
Copy link
Owner

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

@asergunovkl
Copy link
Author

That's awesome! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants