mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
recognize t.me proxy qr codes (#5895)
this PR adds the type DC_QR_SOCKS5_PROXY to `dc_check_qr()` for **supporting telegram proxy QR codes**. if returned, the UI should ask the user if they want to us the proxy and call `dc_set_config_from_qr();` afterwards (plus maybe `dc_configure()`). idea is to improve our proxy story, follow ups may be: - in UI, - move proxy out of "Account & Password", as a **separate "Proxy Activity"** (it should stay in "Advanced" for now, however, below "Server", which might be moved up) - allow **opening the "Proxy Activity" from the welcome screens** three-dot-menu (that would also solve a long standing issue that entering the email address bypasses the proxy - show proxy usage in the "Connectivity View" and/or add an **icon** to the main chatlist screen (beside three-dot menu) in case some proxy is in use; tapping this icon will open the "Proxy Activity" - the the new "Proxy Activity", add a **share / show proxy QR code** button. that would generate invite links in the form `https://i.delta.chat/socks#...` - so that tapping then opens the app. support for these links need to be added to core then. - handle a list of proxies in core, offer selection in UI. the list could be one for all profiles and could be filled eg. by normal invite links or other channels --------- Co-authored-by: iequidoo <117991069+iequidoo@users.noreply.github.com>
This commit is contained in:
@@ -44,6 +44,12 @@ pub enum QrObject {
|
||||
domain: String,
|
||||
instance_pattern: String,
|
||||
},
|
||||
Socks5Proxy {
|
||||
host: String,
|
||||
port: u16,
|
||||
user: Option<String>,
|
||||
pass: Option<String>,
|
||||
},
|
||||
Addr {
|
||||
contact_id: u32,
|
||||
draft: Option<String>,
|
||||
@@ -152,6 +158,17 @@ impl From<Qr> for QrObject {
|
||||
domain,
|
||||
instance_pattern,
|
||||
},
|
||||
Qr::Socks5Proxy {
|
||||
host,
|
||||
port,
|
||||
user,
|
||||
pass,
|
||||
} => QrObject::Socks5Proxy {
|
||||
host,
|
||||
port,
|
||||
user,
|
||||
pass,
|
||||
},
|
||||
Qr::Addr { contact_id, draft } => {
|
||||
let contact_id = contact_id.to_u32();
|
||||
QrObject::Addr { contact_id, draft }
|
||||
|
||||
Reference in New Issue
Block a user