dizda / fast-socks5

Fast SOCKS5 client/server implementation written in Rust async/.await (with tokio)
https://anyip.io/
MIT License
340 stars 67 forks source link

Unknown address type error #52

Open liweiv opened 1 month ago

liweiv commented 1 month ago

socks server is provide by v2ray-core. My code:

    let mut cfg = Config::default();
    cfg.set_skip_auth(true);
    let ss_stream = Socks5Stream::connect(
        "127.0.0.1:1080".to_string(),
        "imap.gmail.com".to_string(),
        993,
        cfg,
    )
    .await?;

This error occured when I am using fast-socks for async-imap lib to connect gmail imap server. 09:00:19 [INFO] Connected @ 127.0.0.1:1080 09:00:19 [DEBUG] (2) fast_socks5::client: skipping auth 09:00:19 [INFO] Requesting headers Some(Domain("imap.gmail.com", 993))... 09:00:19 [DEBUG] (2) fast_socks5::client: TargetAddr::Domain 09:00:19 [DEBUG] (2) fast_socks5::client: Bytes long version: [...xx..] 09:00:19 [DEBUG] (2) fast_socks5::client: Bytes shorted version: [xx.....] 09:00:19 [DEBUG] (2) fast_socks5::client: Padding: 21 09:00:19 [DEBUG] (2) fast_socks5::client: Reply received: [version: 5, reply: 0, rsv: 5, address_type: 7] ---- tests::run_imap_3 stdout ---- err: Unknown address type