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

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

Merged
merged 12 commits into from
Feb 1, 2024

Conversation

time-river
Copy link
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
Copy link
Member

@FabianLars FabianLars left a comment

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

core/tauri-utils/src/config.rs Outdated Show resolved Hide resolved
@time-river
Copy link
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?

core/tauri/src/window/mod.rs Outdated Show resolved Hide resolved
core/tauri/Cargo.toml Outdated Show resolved Hide resolved
core/tauri-utils/src/config.rs Outdated Show resolved Hide resolved
core/tauri-runtime/src/webview.rs Outdated Show resolved Hide resolved
core/tauri-runtime/src/webview.rs Outdated Show resolved Hide resolved
tooling/api/src/window.ts Outdated Show resolved Hide resolved
core/tauri-utils/src/config.rs Outdated Show resolved Hide resolved
core/tauri-runtime-wry/src/lib.rs Outdated Show resolved Hide resolved
core/tauri-runtime-wry/src/lib.rs Outdated Show resolved Hide resolved
core/tauri-runtime-wry/src/lib.rs Outdated Show resolved Hide resolved
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>
.changes/window-proxy.md Outdated Show resolved Hide resolved
core/tauri-runtime-wry/src/lib.rs Outdated Show resolved Hide resolved
core/tauri-runtime-wry/src/lib.rs Outdated Show resolved Hide resolved
core/tauri-utils/src/config.rs Outdated Show resolved Hide resolved
core/tauri-utils/src/config.rs Outdated Show resolved Hide resolved
core/tauri-utils/src/config.rs Outdated Show resolved Hide resolved
core/tauri-runtime/src/webview.rs Outdated Show resolved Hide resolved
core/tauri-runtime/src/webview.rs Outdated Show resolved Hide resolved
core/tauri-runtime/src/webview.rs Outdated Show resolved Hide resolved
core/tauri-runtime-wry/src/lib.rs Outdated Show resolved Hide resolved
amrbashir
amrbashir previously approved these changes Jan 11, 2024
@amrbashir
Copy link
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
30 checks passed
@ArcticLampyrid
Copy link

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