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

Is the proxy_url unavailable on Android? #1488

Open
Borber opened this issue Feb 12, 2025 · 1 comment
Open

Is the proxy_url unavailable on Android? #1488

Borber opened this issue Feb 12, 2025 · 1 comment

Comments

@Borber
Copy link

Borber commented Feb 12, 2025

Describe the bug
The proxy setup code for the Android WebView is not functioning correctly

Steps To Reproduce

pub async fn run() {
    common::init().await;

    tauri::Builder::default()
        .setup(|app| {
            let win_builder = tauri::WebviewWindowBuilder::new(
                app,
                "main",
                tauri::WebviewUrl::External(Url::parse("http://test1.genmeta.net")?),
            )
            .proxy_url(Url::parse("http://192.168.31.86:5379")?);

            #[cfg(target_os = "macos")]
            let win_builder = win_builder
                .title("Gapp")
                .inner_size(1000.0, 800.0)
                .title_bar_style(tauri::TitleBarStyle::Transparent)
                .center();

            let main_window = win_builder.build().expect("failed to build window");

            info!("window created");

            Ok(())
        })
        .plugin(tauri_plugin_opener::init())
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Since test1.genmeta.net is our local network domain, it is currently not accessible.

Expected behavior

Android webview can use proxy

Screenshots

Image

But: MacOS

Image

Platform and Versions (please complete the following information):
[✔] Environment
- OS: Mac OS 15.3.0 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.86.0-nightly (bef3c3b01 2025-02-04)
✔ cargo: 1.86.0-nightly (0e3d73849 2025-02-01)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: nightly-aarch64-apple-darwin (default)
- node: 20.16.0
- pnpm: 9.14.2
- npm: 10.8.1
- bun: 1.2.2
- deno: deno 2.1.9

[-] Packages
- tauri 🦀: 2.2.5
- tauri-build 🦀: 2.0.5
- wry 🦀: 0.48.1
- tao 🦀: 0.31.1
- @tauri-apps/api : 2.2.0
- @tauri-apps/cli : 2.2.7

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

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

@FabianLars
Copy link
Member

correct: https://docs.rs/wry/latest/wry/struct.WebViewBuilder.html#method.with_proxy_config - i do not know if there are reasons for that or if we just didn't get to it so i'll leave this open for now.

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

No branches or pull requests

2 participants