mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-17 09:10:41 +01:00
auth: bypass ambient proxies by default; UU_USE_PROXY=1 opts in (#52)
A local HTTP/SOCKS proxy that intercepts TLS caused login to fail with "tls handshake eof". Build all cloud API clients with no_proxy() unless UU_USE_PROXY is explicitly truthy, so direct connections are the default and environments that genuinely need a proxy can still enable it.
This commit is contained in:
1 parent
70cb5ad57e
commit
6416f75b7f
5 files changed
+26
-2
No files matched your search
+1
-1
@@ -93,7 +93,7 @@ pub struct Api {
|
||||
}
|
||||
impl Api {
|
||||
pub fn new(signer: UUAuthClient, base: &str) -> Self {
|
||||
Self { signer, base: base.trim_end_matches('/').into(), http: reqwest::Client::builder().timeout(Duration::from_secs(12)).build().unwrap() }
|
||||
Self { signer, base: base.trim_end_matches('/').into(), http: crate::auth::http_client_builder().timeout(Duration::from_secs(12)).build().unwrap() }
|
||||
}
|
||||
pub async fn join_share(&self, connect_id: &str, connect_code: &str) -> Result<JoinData, Error> {
|
||||
if connect_id.trim().is_empty() || connect_code.trim().is_empty() || connect_id.chars().chain(connect_code.chars()).any(char::is_control) { return Err(Error::InvalidAssist); }
|
||||
|
||||
Reference in new issue
Block a user