tauri-docs icon indicating copy to clipboard operation
tauri-docs copied to clipboard

Document proxy settings in Develop section

Open FabianLars opened this issue 1 year ago • 4 comments

We have many users from china who typically always need a proxy for get around the great firewall. We should try to collect configs required for Tauri development to point them to.

Edit: I don't know anything about proxies so i don't know if this request actually makes sense. It's just a somewhat common issue.

FabianLars avatar Apr 15 '24 12:04 FabianLars

Can you please link some related issues? I was not sure where the proxy would be needed. Either in the webview argument or during development to grab from github?

tweidinger avatar Aug 29 '24 06:08 tweidinger

I think https://github.com/tauri-apps/tauri/issues/7338 is the main one. https://github.com/tauri-apps/tauri/pull/8012

If we want to expand this to runtime settings there's https://github.com/tauri-apps/plugins-workspace/pull/824 and https://github.com/tauri-apps/tauri/issues/9978 (not implemented).

But like i said in the issue, i have no idea about proxies and all the places people need it in tauri. Doesn't help much that large parts of the conversations are in chinese...

My hope for this issue is/was that affected people (ideally those who solved their issues) could chime in and tell us what we need to document.

FabianLars avatar Sep 02 '24 09:09 FabianLars

This is indeed very important for Chinese users, as GitHub is blocked in most parts of mainland China, especially the raw.githubusercontent.com domain. Tauri needs to download some files from GitHub during the packaging process, and most of these redirects point to raw.githubusercontent.com. Therefore, without using a proxy, these files cannot be downloaded.

Unfortunately, many Tauri developers are also unaware of how to configure a proxy.

However, as I commented on https://github.com/tauri-apps/tauri/issues/7338#issuecomment-2313921276, tauri-bundler supports configuring a proxy via environment variables. I have already commented on setting up proxy environment variables in the terminal at https://github.com/tauri-apps/tauri/issues/7338#issuecomment-2324167677. Adding an example command for setting proxy environment variables to the Tauri documentation should be sufficient and doesn't need to be overly detailed.

thep0y avatar Sep 02 '24 09:09 thep0y

Besides using proxies, this pull request https://github.com/tauri-apps/tauri/pull/10866 offers a method to provide a smooth download experience for users in mainland China. I'm not sure if it can be merged.

It also includes practical, usable examples. Compared to using proxies, this method is simpler.

thep0y avatar Sep 02 '24 14:09 thep0y