From c825fe4af58940e49eeeb715124a3ab42cf61ed5 Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 28 Aug 2024 01:33:32 +0000 Subject: [PATCH] x --- src/socks.rs | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/socks.rs b/src/socks.rs index ee11e1d13c..f36ff92117 100644 --- a/src/socks.rs +++ b/src/socks.rs @@ -99,35 +99,3 @@ impl fmt::Display for Socks5Config { ) } } - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_socks5h_url() { - let config = Socks5Config { - host: "127.0.0.1".to_string(), - port: 9050, - user_password: None, - }; - assert_eq!(config.to_url(), "socks5h://127.0.0.1:9050"); - - let config = Socks5Config { - host: "example.org".to_string(), - port: 1080, - user_password: Some(("root".to_string(), "toor".to_string())), - }; - assert_eq!(config.to_url(), "socks5h://root:toor@example.org:1080"); - - let config = Socks5Config { - host: "example.org".to_string(), - port: 1080, - user_password: Some(("root".to_string(), "foo/?\\@".to_string())), - }; - assert_eq!( - config.to_url(), - "socks5h://root:foo%2F%3F%5C%40@example.org:1080" - ); - } -}