You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core): add support to setting a webview proxy, closes#4263 (#8441)
* feat(wry): support proxy in wry runtime
wry has been supported http/socks5 proxy in
[#1006](tauri-apps/wry#1006), which has been
merged in [commit
3cc4d79](tauri-apps/wry@3cc4d79).
This patch aims to support its feature.
Signed-off-by: lin fu <[email protected]>
* Apply suggestions from code review
* Apply suggestions from code review
* Update core/tauri-runtime-wry/src/lib.rs
* Update core/tauri/src/window/mod.rs
* add macos-proxy flag
* add change file
* delete file
* update change file
* use macos-14 runner to test core
---------
Signed-off-by: lin fu <[email protected]>
Co-authored-by: Amr Bashir <[email protected]>
Co-authored-by: Lucas Nogueira <[email protected]>
Co-authored-by: Lucas Nogueira <[email protected]>
Copy file name to clipboardExpand all lines: core/tauri-config-schema/schema.json
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -574,6 +574,14 @@
574
574
"string",
575
575
"null"
576
576
]
577
+
},
578
+
"proxyUrl": {
579
+
"description": "The proxy URL for the WebView for all network requests.\n\nMust be either a `http://` or a `socks5://` URL.\n\n## Platform-specific\n\n- **macOS**: Requires the `macos-proxy` feature flag and only compiles for macOS 14+.",
Copy file name to clipboardExpand all lines: core/tauri-utils/src/config.rs
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1267,6 +1267,14 @@ pub struct WindowConfig {
1267
1267
/// - **Linux**: This makes the new window transient for parent, see <https://docs.gtk.org/gtk3/method.Window.set_transient_for.html>
1268
1268
/// - **macOS**: This adds the window as a child of parent, see <https://developer.apple.com/documentation/appkit/nswindow/1419152-addchildwindow?language=objc>
1269
1269
pubparent:Option<String>,
1270
+
/// The proxy URL for the WebView for all network requests.
1271
+
///
1272
+
/// Must be either a `http://` or a `socks5://` URL.
1273
+
///
1274
+
/// ## Platform-specific
1275
+
///
1276
+
/// - **macOS**: Requires the `macos-proxy` feature flag and only compiles for macOS 14+.
1277
+
pubproxy_url:Option<Url>,
1270
1278
}
1271
1279
1272
1280
implDefaultforWindowConfig{
@@ -1311,6 +1319,7 @@ impl Default for WindowConfig {
1311
1319
window_effects:None,
1312
1320
incognito:false,
1313
1321
parent:None,
1322
+
proxy_url:None,
1314
1323
}
1315
1324
}
1316
1325
}
@@ -2306,6 +2315,7 @@ mod build {
2306
2315
let minimizable = self.minimizable;
2307
2316
let closable = self.closable;
2308
2317
let title = str_lit(&self.title);
2318
+
let proxy_url = opt_str_lit(self.proxy_url.as_ref());
0 commit comments