Skip to content

Commit

Permalink
chore: Update sslocal configuration to use 'host' instead of 'us.arlo…
Browse files Browse the repository at this point in the history
…or.dev'
  • Loading branch information
arloor committed Sep 4, 2024
1 parent 2b5befd commit 3c635af
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/shadowsocks-service/src/local/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{io, net::SocketAddr, time::Duration};
use log::{debug, trace};
use shadowsocks::{
config::ServerConfig,
relay::{socks5::Address, tcprelay::utils::copy_encrypted_bidirectional},
relay::{socks5::Address, tcprelay},
};
use tokio::{
io::{copy_bidirectional, AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt},
Expand Down Expand Up @@ -66,8 +66,11 @@ where
}
}
}

match copy_encrypted_bidirectional(svr_cfg.method(), shadow, plain).await {
#[cfg(feature = "https-tunnel")]
let result = tcprelay::utils::copy_bidirectional(shadow, plain).await;
#[cfg(not(feature = "https-tunnel"))]
let result = tcprelay::utils::copy_encrypted_bidirectional(svr_cfg.method(), shadow, plain).await;
match result {
Ok((wn, rn)) => {
trace!(
"tcp tunnel {} <-> {} (proxied) closed, L2R {} bytes, R2L {} bytes",
Expand Down

0 comments on commit 3c635af

Please sign in to comment.