fix: 127.0.0.1 is not loopback (#515)

This commit is contained in:
2025-02-06 20:25:10 +08:00 committed by GitHub
parent 801826f36d
commit 621da3c8fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1056,7 +1056,8 @@ impl RendezvousServer {
async fn handle_listener2(&self, stream: TcpStream, addr: SocketAddr) {
let mut rs = self.clone();
if addr.ip().is_loopback() {
let ip = try_into_v4(addr).ip();
if ip.is_loopback() {
tokio::spawn(async move {
let mut stream = stream;
let mut buffer = [0; 1024];