mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-20 13:59:10 +00:00
base64 removed
This commit is contained in:
parent
51de01854b
commit
ecd1ab80bf
2 changed files with 2 additions and 4 deletions
|
@ -28,7 +28,7 @@ udpgw = []
|
|||
|
||||
[dependencies]
|
||||
async-trait = "0.1"
|
||||
base64 = { version = "0.22" }
|
||||
base64easy = "0.1"
|
||||
chrono = "0.4"
|
||||
clap = { version = "4", features = ["derive", "wrap_help", "color"] }
|
||||
ctrlc2 = { version = "3", features = ["tokio", "termination"] }
|
||||
|
|
|
@ -4,7 +4,6 @@ use crate::{
|
|||
proxy_handler::{ProxyHandler, ProxyHandlerManager},
|
||||
session_info::{IpProtocol, SessionInfo},
|
||||
};
|
||||
use base64::Engine;
|
||||
use httparse::Response;
|
||||
use socks5_impl::protocol::UserKey;
|
||||
use std::{
|
||||
|
@ -141,8 +140,7 @@ impl HttpConnection {
|
|||
.extend(format!("{}: {}\r\n", PROXY_AUTHORIZATION, response.to_header_string()).as_bytes());
|
||||
}
|
||||
AuthenticationScheme::Basic => {
|
||||
let cred = format!("{}:{}", credentials.username, credentials.password);
|
||||
let auth_b64 = base64::engine::general_purpose::STANDARD.encode(cred);
|
||||
let auth_b64 = base64easy::encode(credentials.to_string(), base64easy::EngineKind::Standard);
|
||||
self.server_outbuf
|
||||
.extend(format!("{}: Basic {}\r\n", PROXY_AUTHORIZATION, auth_b64).as_bytes());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue