mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
api!: make QR code type for proxy not specific to SOCKS5 (#5980)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
use std::fmt;
|
||||
use std::pin::Pin;
|
||||
|
||||
use anyhow::{bail, ensure, format_err, Context as _, Result};
|
||||
use anyhow::{bail, format_err, Context as _, Result};
|
||||
use base64::Engine;
|
||||
use bytes::{BufMut, BytesMut};
|
||||
use fast_socks5::client::Socks5Stream;
|
||||
@@ -113,10 +113,6 @@ pub struct HttpConfig {
|
||||
|
||||
impl HttpConfig {
|
||||
fn from_url(url: Url) -> Result<Self> {
|
||||
ensure!(
|
||||
matches!(url.scheme(), "http" | "https"),
|
||||
"Cannot create HTTP proxy config from non-HTTP URL"
|
||||
);
|
||||
let host = url
|
||||
.host_str()
|
||||
.context("HTTP proxy URL has no host")?
|
||||
|
||||
Reference in New Issue
Block a user