-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
hostonly and WSL2 #173
Comments
The virtual adapter on the Px side is x.80.* whereas the connection is coming from x.88.* which is why Px rejects it. |
the subnet mask is .240 not .255 |
Lines 412 to 417 in faaa57c
this function will return the hostname which is 172.18.80.1, but it knows nothing about the local network behind it. is there a python way to extract the subnet mask? |
The goal of We want to be super careful who can authenticate via Px. |
The difference between "apps" and "VMs" is probably a bit blurred, especially when the doc says
but I totally understand that what I ask requires a deeper knowledge of the type of adapters each network uses and this might not be easy to extract. |
The I'd like to see a configuration option added that allows me to specify the names of the WSL2 distros I want included as part of Then, when determining host IPs we could run
We would need to implement a refresh of host IPs every x seconds, similar to how For example, a config that might look something like:
This would mean at startup (and then every x seconds on a timer afterwards) we would:
We can execute commands in a running distro with
Some examples of outputs: No distros running
Multiple distros running
Getting the IP address by the command given
|
I'm open to PRs that can do this cleanly, agree randomizing the WSL2 IP will be a pain to deal with. That being said, I'm not a WSL2 user so hard to implement at this time. |
In WSL2 under Windows 11, i got it working by setting the Just make sure to restart WSL ( |
Mirrored mode does not work really well with VPN adapters currently.
With this, any WSL will get an ip from the range 10.20.30.0/24. You can of course adjust this to your liking.
seems to allow access from a local WSL. |
I've been doing basically the opposite - I run Px in a docker image on WSL2 and have my Windows, WSL2 and Docker apps connect to it. My WSL2 gets an internal IP (172.x) IP in a different range from Docker. In my case, I am not admin on Windows and the firewall is configured to block all inbound connections so Px is inaccessible to WSL2 and Docker. This might be affecting others as well. I can set This setup is more secure since there's no way to access WSL2 from outside the physical machine. If WSL2 is configured with an external IP (assuming that's possible), Px might need to be configured more carefully. |
The problem there is, that there is no SSPI in WSL2, so you need another way to securely store the username/password to access the proxy (keyring?) to not have the Windows domain password somewhere in plain text. In Windows, it can just use the Windows domain credentials which is fairly nice. |
Agree - forgot the primary reason Px came to be! I use env vars to configure Px (username, server, etc) and keyring for saving the password. I also mount |
I am trying to find the simplest setup to use this on WSL2.
I have read #149 but I think it could be even easier.
Basically
--hostonly
is not enough to cover WSL2.I get
Client not allowed 172.18.88.214
even if the log has
proxy:hostonly = 1
On Windows I can see a WSL Ethernet adapter
So,
I wonder if
px
could not scan all these Virtual adapters and add them to the "local" adapters directly.The text was updated successfully, but these errors were encountered: