deltachat-desktop
deltachat-desktop copied to clipboard
Improve proxy settings UI
With core release 1.143.0 old socks5_* settings are deprecated and proxy_* should be used instead.
This should be done when done is updated from 1.142.x.
https://github.com/deltachat/deltachat-android/pull/3292 gives an idea how the screen looks like in Android
Step 1
- [x] Change Setting Types: socks5_enabled, socks5_host, socks5_port, socks5_user, socks5_password => proxy_enabled, proxy_url
- [x] Adapt form: One text field for one proxy_url (placeholder: "Enter proxy URL here"
- [x] UI: Show explaining text: "Supported proxy types: HTTP(S), SOCKS5 and Shadowsocks"
Step 2 (in separate PR)
- [ ] UI: add client side validation
- [x] UI: Show connectivity status & proxy type
- [x] UI: enable multiple proxy url entries
- [x] if a proxy is clicked/selected/added, enable "use proxy" toggle
Step 3 (in separate PR)
- [ ] Proxy UI should also be moved out of configuration and into a separate screen like done on Android: https://github.com/deltachat/deltachat-android/pull/3277
Sharing is probably not necessary on desktop
@link2xt : do we not support username & password for proxies anymore or can it be entered in the form username:[email protected]:8080
Username and password are supported in the form of socks5://username:password@host:port.
Username and password should be URL-encoded.
isn't there also a new qr code type desktop should support?
https://github.com/deltachat/interface/pull/75 https://github.com/deltachat/deltachat-core-rust/pull/5895
yip, there is DC_QR_PROXY, which should be passed to dc_set_config_from_qr() after confirmation, using proxy_use_proxy_confirm.
it supports not only SOCKS5 but also other proxies meanwhile, iirc
Proxy being in advanced settings prevents configuring it for chatmail accounts from the start: https://support.delta.chat/t/delta-chat-on-tails/3703
The majority (or all?) of this has been addressed in https://github.com/deltachat/deltachat-desktop/pull/5052.
UI: add client side validation
Is this enough?
https://github.com/deltachat/deltachat-desktop/blob/b9d42fa8532e50b1110901802641d3f71388396a/packages/frontend/src/components/dialogs/ProxyConfiguration/index.tsx#L321-L331
Proxy UI should also be moved out of configuration and into a separate screen like done on Android:
I'm not sure what's the implication? Please see if what we have now is not enough.
Proxy being in advanced settings prevents configuring it for chatmail accounts from the start:
Also addressed in https://github.com/deltachat/deltachat-desktop/pull/5052
Is this enough?
You don't need to do any manual validation, call check_qr and if it says QR code type is a proxy, then it is a proxy, otherwise not. All the logic for this is in the core. Currently "Add Proxy" button is active for http://127.0.0.1: which I guess would not happen if check_qr is used.
Yes, we do have that as well, on "add proxy" click:
https://github.com/deltachat/deltachat-desktop/blob/b9d42fa8532e50b1110901802641d3f71388396a/packages/frontend/src/components/dialogs/ProxyConfiguration/index.tsx#L143-L154
completed with #5052