Repository navigation
Conversation
If several connections are configured in "Server List" tab, and only one of them has proxy, all connections will try to use proxy due to bug in configuration builder. Add proxy directive only for a connection with proxy configured.
|
I fixed this differently (9857821). I rather error out than to do something that is different than the config/user wants. Otherwise the next person is surprised that the app does something different than what the config specifies. |
|
@schwabe why though? My PR fixes it as it is in OpenVPN 2, i.e. you can have different proxies in different remotes. It just builds the configuration with one remote, and if it fails, rebuilds with another remote. |
|
@ValdikSS different philosophy. If a configuration (different proxies) per remote is unsupported with OpenVPN 3 then it is just unsupported. The app should not just do something "random" instead. This might work well for your special use case but is in my opinion not a great design. Also OpenVPN3 is more an optional feature that is not fully featured anyway. The focus of the app is OpenVPN 2.x. |
|
You think of it as a phisosophy, I see it just as a deficiency of the library, and it's quite trivial for the application to overcome it. I have a VPN server which is frequently unreachable without additional proxy, that's why I have a single connection with two remotes: one without the proxy and one with the proxy. I use OpenVPN 3 because OpenVPN 2 handling in the app has a bug related to network switch or something like that, which could be fixed only by force-stop. This bug is hard to reproduce and it happens only in inconvenient times when I'm about to leave the house or I'm not near the computer. That's why for now I'm using OpenVPN 3. |
|
Yes. But if OpenVPN3 is not supporting this scenario then neither is my app. Your approach generates a config that is different from the configuration that user intended. If you want support for that ocnfiguration, there needs to be a n upstream fix in OpenVPN 3. And for the OpenVPN 2.x bug. It would be good to have at least some screenshot or logs about it. Otherwise that log will be there forever. |
Well, there isn't. The connection handling just hangs forever, without any log entries whatsoever. The current connection can't be torn down and no new connections could be established. I guess there might be race condition between terminating openvpn and starting a new instance, and two openvpns are running at the same time when this happens. When this happens, the UI is quite laggy, and nothing in the log. It never recovers by itself. I don't have reliable reproducer, can only guess. Just made a bug: #1924 |
If I make a toggable option for the app, will it have a chance to get merged? |
|
I really do not get your use-case. With OpenVPN 3.x you can only have the proxy for all remotes or for no remote. The new version enforces that now. If you want that behaviour just setup your configuration like that. |
|
I want auto-reconnection. I don't want to manually choose between different configurations when the connection without proxy stops working. I have a single VPN server (single IP address) which is reachable over the Wi-Fi directly, but over cellular only via proxy. I have two remotes (two "server list" entries inside a single profile) pointing to that VPN server: a regular one with the direct connection, and the same remote with proxy configuration. When I leave the house, I want it to automatically connect via proxy. With my patch, when the Wi-Fi is lost, it tries to reconnect over the same direct connection, fails with the timeout of 10 seconds, and tries the "remote with proxy", which works. The proxy connection is slower and adds more latency, that's why I don't use it on Wi-Fi. If I understand your patch correctly, it will just error out for my case. |
I have no idea how that would work. You are describing a configuration that does not work with OpenVPN 3.x. I have not fully read your patch but I struggle to see how it can generate a configuration that achieves something that OpenVPN 3.x does not support. Also the app has a no logic to rebuild the config and then try a different configuration in case of a failed connection, so doing different configs for different retries should also not work. |
|
Ok, What do I have:
How it works with OpenVPN v2:
How it works with OpenVPN v3, my patch:
It logically implements the same feature which OpenVPN v3 is missing, the same way it works in OpenVPN v2 (inside OpenVPN v2), but inside the application. How it works with your patch:
My point is: why follow OpenVPN v3 artificial limitation (I'm pretty sure nobody just had time to implement proxies in |
|
Sorry, please disregard everything I told. I'm completely wrong, it does not reconnect over proxy. My mind is playing tricks on me. I was completely sure that I somehow fixed it in one of the PRs, but no, apparently I've just fixed the enable/disable switch in this PR, that's all. And probably all this time I tested the proxy by enabling/disabling the first server list entry, that's why I was sure that it will work the same way upon reconnection. Took your time for nothing :/ |
That is nothing that is currently implement nor does your patch implement that. You might have that in some of your local patches but this PR does not add this logic.
Because I don't want all the complexity for this in my app of an, especially when OpenVPN 3.x is not even the main target of my app. If I were to fix this behaviour it would be as an OpenVPN 3.x patch rather than such a clunky workaround. But currently I have don't have a high priority in fixing OpenVPN 3 things. |
|
@ValdikSS no worries, happens to everyone. Currently the best workaround is to probably have two config. One with and one without the proxy. |
If several connections are configured in "Server List" tab, and only one of them has proxy, all connections will try to use proxy due to bug in configuration builder.
Add proxy directive only for a connection with proxy configured.