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

[bug] socks5 proxyUrl has no effect on Android #12865

Open
fokx opened this issue Mar 2, 2025 · 1 comment
Open

[bug] socks5 proxyUrl has no effect on Android #12865

fokx opened this issue Mar 2, 2025 · 1 comment
Labels
platform: Android status: needs triage This issue needs to triage, applied to new issues type: bug type: documentation Need to update the API documentation

Comments

@fokx
Copy link

fokx commented Mar 2, 2025

Describe the bug

when setting socks5 proxy in tauri.conf.json

  "app": {
    "windows": [
      {
        "title": "tauri-app",
        "width": 800,
        "height": 800,
        "proxyUrl": "socks5://127.0.0.1:2080",
        "url": "https://bgp.he.net"
      }
    ],
    "security": {
      "csp": null
    }
  },

in which bgp.he.net is a website that can show visitor's IP,
and run it on Android using pnpm tauri android dev,
then my real IP is shown.
While by configuring Firefox Nightly's socks5 proxy, I can get my proxy' IP.
This means the proxyUrl setting does not work.

Reproduction

I create a example project:
https://github.com/fokx/tauri-app-reproduction-socks5-error-android
created by pnpm create tauri-app with vanilla setting, pnpm as pkg manager, and has socks5 proxy and url configured.

then running

pnpm i
pnpm tauri android init
pnpm tauri android dev 

Expected behavior

The app should show my proxy server's IP.

Full tauri info output

[✔] Environment
    - OS: Arch Linux Rolling Release x86_64 (X64) (Unknown DE on tty)
    ✔ webkit2gtk-4.1: 2.46.6
    ✔ rsvg2: 2.59.2
    ✔ rustc: 1.85.0 (4d91de4e4 2025-02-17)
    ✔ cargo: 1.85.0 (d73d2caf9 2024-12-31)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 22.11.0
    - pnpm: 9.15.5
    - yarn: 4.3.0
    - npm: 10.9.0

[-] Packages
    - tauri 🦀: 2.3.1
    - tauri-build 🦀: 2.0.6
    - wry 🦀: 0.50.1
    - tao 🦀: 0.32.6
    - tauri-cli 🦀: 2.2.7
    - @tauri-apps/api : 2.3.0
    - @tauri-apps/cli : 2.3.1

[-] Plugins
    - tauri-plugin-opener 🦀: 2.2.6
    - @tauri-apps/plugin-opener : 2.2.6

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - bundler: Vite

Stack trace


Additional context

I have tested the socks5 proxy setting on Win10, Win11, and Linux, they all work. Just does not work on Android.

@fokx fokx added status: needs triage This issue needs to triage, applied to new issues type: bug labels Mar 2, 2025
@fokx fokx changed the title [bug] socks5 proxyUrl not supported on Android [bug] socks5 proxyUrl has no effect on Android Mar 2, 2025
@fokx
Copy link
Author

fokx commented Mar 4, 2025

I found this is wry:
https://github.com/tauri-apps/wry/blob/8dfeb7650213fc10edbf7b03acc9a95107c7e342/src/lib.rs#L663

  /// Set a proxy configuration for the webview. Supports HTTP CONNECT and SOCKSv5 proxies
  ///
  /// - **macOS**: Requires macOS 14.0+ and the `mac-proxy` feature flag to be enabled.
  /// - **Android / iOS:** Not supported.
  pub proxy_config: Option<ProxyConfig>,

So, socks5 proxy is not supported on Android, right? I think tauri's doc should have this note too.

@FabianLars FabianLars added the type: documentation Need to update the API documentation label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Android status: needs triage This issue needs to triage, applied to new issues type: bug type: documentation Need to update the API documentation
Projects
None yet
Development

No branches or pull requests

2 participants