-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
recognize t.me proxy qr codes #5895
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r10s
force-pushed
the
r10s/scan-proxy-qr-code
branch
2 times, most recently
from
August 19, 2024 15:00
07e07f0
to
ef92fef
Compare
r10s
force-pushed
the
r10s/scan-proxy-qr-code
branch
from
August 19, 2024 15:05
ef92fef
to
d54932c
Compare
iequidoo
reviewed
Aug 19, 2024
iequidoo
reviewed
Aug 19, 2024
iequidoo
approved these changes
Aug 20, 2024
src/qr.rs
Outdated
Comment on lines
687
to
724
// disable proxy before changing settings to not use a combination of old and new | ||
context | ||
.set_config_bool(Config::Socks5Enabled, false) | ||
.await?; | ||
|
||
context.set_config(Config::Socks5Host, Some(&host)).await?; | ||
context | ||
.set_config_u32(Config::Socks5Port, u32::from(port)) | ||
.await?; | ||
context.set_config(Config::Socks5User, None).await?; | ||
context.set_config(Config::Socks5Password, None).await?; | ||
context.set_config_bool(Config::Socks5Enabled, true).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the following "solution" for now, to not complicate the code with transactions or so. Anyway, this is minor.
Suggested change
// disable proxy before changing settings to not use a combination of old and new | |
context | |
.set_config_bool(Config::Socks5Enabled, false) | |
.await?; | |
context.set_config(Config::Socks5Host, Some(&host)).await?; | |
context | |
.set_config_u32(Config::Socks5Port, u32::from(port)) | |
.await?; | |
context.set_config(Config::Socks5User, None).await?; | |
context.set_config(Config::Socks5Password, None).await?; | |
context.set_config_bool(Config::Socks5Enabled, true).await?; | |
// invalidate proxy before changing settings to not use a combination of old and new | |
context.set_config(Config::Socks5Host, None).await?; | |
context | |
.set_config_u32(Config::Socks5Port, u32::from(port)) | |
.await?; | |
context.set_config(Config::Socks5User, None).await?; | |
context.set_config(Config::Socks5Password, None).await?; | |
context.set_config(Config::Socks5Host, Some(&host)).await?; | |
context.set_config_bool(Config::Socks5Enabled, true).await?; |
adbenitez
reviewed
Aug 22, 2024
r10s
force-pushed
the
r10s/scan-proxy-qr-code
branch
from
August 22, 2024 20:29
c446f42
to
4346de0
Compare
i added a commit to support the parameters &user= and &pass in |
iequidoo
approved these changes
Aug 22, 2024
link2xt
approved these changes
Aug 23, 2024
5 tasks
Simon-Laux
added a commit
to deltachat/interface
that referenced
this pull request
Sep 17, 2024
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 calldc_set_config_from_qr();
afterwards (plus maybedc_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