Skip to content

feat(core): add support to setting a webview proxy, closes #4263#8441

Merged
lucasfernog merged 12 commits into
tauri-apps:devfrom
time-river:proxy
Feb 1, 2024
Merged

feat(core): add support to setting a webview proxy, closes #4263#8441
lucasfernog merged 12 commits into
tauri-apps:devfrom
time-river:proxy

Conversation

@time-river

Copy link
Copy Markdown
Contributor

wry has been supported http/socks5 proxy in #1006, which has been merged in commit 3cc4d79.

This patch aims to support its feature.

Related issues from original repository:

Related pull request

tweidinger
tweidinger previously approved these changes Dec 20, 2023

@FabianLars FabianLars left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing!

Apart from the suggested doc change we also need a changefile similar to https://github.com/tauri-apps/tauri/blob/dev/.changes/core-android-proxy-method.md.

Then, i also don't think the explicit example adds much value since it's trying to showcase a single line change.
I would assume people wanting to set up a proxy know how the url should look like. If you don't think so you could add an example to the code doc comment too.

Lastly, we also require all commits to be signed. Here's a guide for that: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-signature-verification - i recommend the ssh approach because i think it's easier. A guide for gpg is right above that though.
Once you set up the code signing you can do git commit --amend && git push --force to update this PR

Comment thread core/tauri-utils/src/config.rs Outdated
@time-river time-river force-pushed the proxy branch 2 times, most recently from b508d76 to 000ac13 Compare December 21, 2023 03:13
@time-river

Copy link
Copy Markdown
Contributor Author

Thanks for contributing!

Apart from the suggested doc change we also need a changefile similar to https://github.com/tauri-apps/tauri/blob/dev/.changes/core-android-proxy-method.md.

Then, i also don't think the explicit example adds much value since it's trying to showcase a single line change. I would assume people wanting to set up a proxy know how the url should look like. If you don't think so you could add an example to the code doc comment too.

Lastly, we also require all commits to be signed. Here's a guide for that: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-signature-verification - i recommend the ssh approach because i think it's easier. A guide for gpg is right above that though. Once you set up the code signing you can do git commit --amend && git push --force to update this PR

Thanks. I fix the above questions. Is it okay now?

@time-river time-river force-pushed the proxy branch 3 times, most recently from 95b3598 to ca79e28 Compare December 25, 2023 02:10
Comment thread core/tauri/src/window/mod.rs Outdated
Comment thread core/tauri/Cargo.toml
Comment thread core/tauri-utils/src/config.rs Outdated
Comment thread core/tauri-runtime/src/webview.rs Outdated
Comment thread core/tauri-runtime/src/webview.rs Outdated
Comment thread tooling/api/src/window.ts Outdated
Comment thread core/tauri-utils/src/config.rs Outdated
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
@time-river time-river force-pushed the proxy branch 4 times, most recently from 62895db to 76a36f3 Compare January 3, 2024 10:04
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
wry has been supported http/socks5 proxy in
[tauri-apps#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 <river@vvl.me>
Comment thread .changes/window-proxy.md Outdated
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
Comment thread core/tauri-utils/src/config.rs Outdated
Comment thread core/tauri-utils/src/config.rs Outdated
Comment thread core/tauri-utils/src/config.rs Outdated
Comment thread core/tauri-runtime/src/webview.rs Outdated
Comment thread core/tauri-runtime/src/webview.rs Outdated
Comment thread core/tauri-runtime/src/webview.rs Outdated
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
Comment thread core/tauri-runtime-wry/src/lib.rs Outdated
Comment thread core/tauri/src/window/mod.rs Outdated
amrbashir
amrbashir previously approved these changes Jan 11, 2024
@amrbashir

Copy link
Copy Markdown
Member

@FabianLars can you review and approve this again?

@lucasfernog lucasfernog changed the title feat(wry): support proxy in wry runtime feat(wry): support proxy in wry runtime closes #4263 Feb 1, 2024
@lucasfernog lucasfernog changed the title feat(wry): support proxy in wry runtime closes #4263 feat(core): add support to setting a webview proxy, closes #4263 Feb 1, 2024
@lucasfernog lucasfernog merged commit 6639a57 into tauri-apps:dev Feb 1, 2024
@ArcticLampyrid

Copy link
Copy Markdown

Can we have a no_proxy method to skip using system proxy (which is default)?

  • For Windows (webview2): we can use --no-proxy-server args to do it.
  • For Linux (webkitgtk): use set_network_proxy_settings to set mode WEBKIT_NETWORK_PROXY_MODE_NO_PROXY
  • I do not know anything about the impl on MacOS.

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

Successfully merging this pull request may close these issues.

7 participants