-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
api!: make QR code type for proxy not specific to SOCKS5 #5980
Conversation
251f0d7
to
ae13f8d
Compare
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.
lgtm, did not test, however.
once merged, we should file issues to support the new format
Qr::Url { url } => Some(url), | ||
Qr::Text { text } => Some(text), | ||
Qr::WebrtcInstance { domain, .. } => Some(Cow::Borrowed(domain)), | ||
Qr::Proxy { host, port, .. } => Some(Cow::Owned(format!("{host}:{port}"))), |
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.
nice! i thought about that format already when doing #5895, however, regarded the idea as a minor because of some lack of understanding of Cow
-strings :)
i do not understand. URLs in QR codes are often just URLs that the user should open in a browser, the QR code is mostly there to avoid typing. do you mean that it is common to have QR codes that just contain a URL that should be used as a proxy then? are they detectable by some format (eg. IP address)? |
@adbenitez wants to use QR codes as the primary interface to add proxies into the list in deltachat/deltachat-android#3292 This could work if all possible proxy URLs are scanned as Proxy type and all proxy URLs can be given to Since users likely use Delta Chat as the QR code scanner app for HTTPS URLs in advertisements and bills, we can still offer "Open" action for Proxy QR codes that have URL starting with "http://" or "https://". |
Maybe I should put the URL into text2 and drop the "protocol". Proxy QR code is first of all an URL that can be used as a proxy, but nothing prevents offering to open it in a browser. |
198d107
to
6d9cc35
Compare
6d9cc35
to
359f85c
Compare
I now detect them by not having a query and a path. So URL |
Now QR codes must have a port to be recognized as a proxy, so |
No description provided.