deltachat-desktop icon indicating copy to clipboard operation
deltachat-desktop copied to clipboard

Improve proxy settings UI

Open link2xt opened this issue 1 year ago • 8 comments

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

new-proxy-settings

Sharing is probably not necessary on desktop

link2xt avatar Sep 12 '24 01:09 link2xt

@link2xt : do we not support username & password for proxies anymore or can it be entered in the form username:[email protected]:8080

nicodh avatar Oct 11 '24 06:10 nicodh

Username and password are supported in the form of socks5://username:password@host:port. Username and password should be URL-encoded.

link2xt avatar Oct 11 '24 22:10 link2xt

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

Simon-Laux avatar Oct 23 '24 12:10 Simon-Laux

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

r10s avatar Oct 23 '24 19:10 r10s

Proxy being in advanced settings prevents configuring it for chatmail accounts from the start: https://support.delta.chat/t/delta-chat-on-tails/3703

link2xt avatar Apr 09 '25 01:04 link2xt

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

WofWca avatar Jun 14 '25 10:06 WofWca

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.

link2xt avatar Jun 16 '25 11:06 link2xt

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

WofWca avatar Jun 16 '25 11:06 WofWca

completed with #5052

nicodh avatar Aug 16 '25 05:08 nicodh