Closed weibeld closed 9 months ago
There isn’t a —restart
option right now. You can use —quit
and then start Px again. As long as it is the same Px binary (same location), it should stop and start with the same configuration.
I’m just curious why you need to restart a running proxy? Wondering if you have changed settings and want them to take or some other reason? We could add a flag but would be good to know why first.
No, the use case was restarting the proxy when there is a network change like connecting or disconnecting from a VPN. Not sure if the proxy is designed to handle this.
I don’t think there’s a real need for this - Px reloads proxy information that is discovered every 60 seconds using —proxyreload
. The timeout is configurable as well if you need. I think it should handle such VPN changes.
Curious to hear if this does not meet your needs.
I use Px proxy to provide internet access to WSL2 through a company network. When I log in to Windows and after that establish a VPN connection, then the proxy information is updated, as you said, however, I don't have internet access from WSL2. In particular, I can't reach the network interface that Px proxy is listening on from WSL2.
It only works if the VPN connection is established before logging in to Windows, i.e. before Px proxy is started.
I'm not sure I understand this - are you saying that if the VPN is connected before Px starts, everything works fine but Px does not handle the switch if the VPN is started afterwards?
Does this have something to do with https://github.com/genotrance/px/issues/173?
This is added in v0.9.0.
On Windows 10, assuming the proxy has been installed to run on startup with
px.exe --install
and the system has started up, is there a way to manually restart the proxy while it is already running?