Tauri 2’s WebviewWindowBuilder accepts a proxy URL before the window is built. In the application’s setup code:

let page = "https://www.example.org/".parse()?;
let proxy = "socks5://127.0.0.1:1080".parse()?;

let window = tauri::WebviewWindowBuilder::new(
    app,
    "proxied-page",
    tauri::WebviewUrl::External(page),
)
.proxy_url(proxy)
.build()?;

app is the existing Tauri app handle, and the enclosing function propagates parse and build errors. Use an unused window label. Keep the target platform and Tauri version with a configuration report.

The builder documents HTTP and SOCKS5 proxy URLs. The shown SOCKS service must already be available on the computer running the application. An independent public-site check can instead use a remote SOCKS5 URL from the SOCKS5 proxy list when public intermediaries are permitted and no proxy account is configured or retained. Use the listener’s actual scheme, and retain the external page URL as the website destination.

The route belongs to this webview. A Rust command using another HTTP client needs that client’s proxy configuration, even when JavaScript invokes the command from this window.

Related articles