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

importing a config with "socks-proxy" directive results in weird behavior, likely a bug (workaround available) #1752

Open
LindaFerum opened this issue Aug 19, 2024 · 1 comment

Comments

@LindaFerum
Copy link

LindaFerum commented Aug 19, 2024

General information

  1. Android Version 13

  2. Android Vendor/Custom ROM
    Calyx, Graphene, but seems to reproduce on stock

  3. Device
    Pixel 5, Pixel 8

  4. Version of the app (version number/play store version/self-built)
    From Github 0.7.53 but also reproduced on 0.7.51

Description of the issue

When importing a config that has a socks-proxy directive pointing to localhost like the following

socks-proxy 127.0.0.1 9998

the app creates remote entries in the app interface with the proxy option selected (which is reasonable and I guess expected)

the radio button of the remote(s) is set to "socksv5" option and the IP is present as expected.

HOWEVER the app then completely, utterly ignores the proxy (the proxy program logs show no attempts to connect to the proxy from openVPN or well, anyone, of course)

Changing the radio buttons to None and then back again does nothing (proxy is still completely ignored)

Manually changing the proxy address to a wrong one, exiting the ics-openvpn app and then manually changing the proxy address / port in UI to the correct one also does nothing (proxy will still be ignored)

The only workaround is:


  1. import the config into ics-openvpn WITHOUT the socks-proxy option (as in, make a version of the config with the socks-proxy directive removed and import that one into ics-openvpn)

  2. after successful import, go to "custom options" section in "advanced" tab in the app

  3. enter

socks-proxy 127.0.0.1 9998

as a custom option

THEN and only then proxy starts working as expected (proxy program logs show successful connection, and VPN tunnel is set up as expected )

  1. PS: additional hint to anyone suffering issues after step 3 - if the server listening on localhost forwards traffic to some other server (as mine does) it is paramount that the route to that server be explicitly excluded from VPN, which on android is most easily done via "allowed apps" function of ics-openvpn as long as the socks listener is started by another app.

If I may humbly suggest a quick fix for this behavior, allowing user to choose whether the "socks-proxy" directive in the config should be handled by per-remote "proxy radio buttons" UI functionality or sent straight to "custom options" would make for a good usability touch and make working around the above weird behavior much easier (but I do suspect that the proxy UI settings being ignored after import is an actual honest bug)

@Aleximal
Copy link

Aleximal commented Sep 4, 2024

Reproduces for me on latest release, was pulling out hair trying to understand why a socks proxy on localhost launched from a whitelisted app was being ignored.

Thanks for the workaround

@schwabe please fix it, my crops are dying (not really but still explaining the workaround to non-technical users is gonna be hard :-))

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

No branches or pull requests

2 participants