shadowsocks / shadowsocks-rust

A Rust port of shadowsocks
https://shadowsocks.org/
MIT License
8.73k stars 1.19k forks source link

网页不能打开 #1377

Closed 800sea closed 12 months ago

800sea commented 12 months ago

我在iOS上使用badvpn-tun2socks(手机) -> ssLocal(手机) -> sserver(电脑) shadowsocks-rust:v1.17.1 代理成功后app可以正常使用,但是网页就不行.并且我使用网页打开ip:port 就可以打开网页. 我的配置如下 sslocal config.json

{
    "server": "172.17.122.45",
    "server_port": 8388,
    "password": "123456",
    "method": "aes-256-gcm",
    "local_address": "127.0.0.1",
    "local_port": 7890,
    "remote_dns_address": "114.114.114.114",
    "remote_dns_port":53,
    "locals":[
        {
        "protocol": "tunnel",
        "local_address": "127.0.0.1",
        "local_port": 5353,
        "forward_address": "8.8.8.8",
        "forward_port": 53,
        "mode": "tcp_only",
    }]
}

ssserver config.json

{
    "server": "0.0.0.0",
    "server_port": 8388,
    "password": "123456",
    "method": "aes-256-gcm",
    "mode": "tcp_and_udp",
    "log": {
            // Equivalent to `-v` command line option
            "level": 3,
            "format": {
                // Euiqvalent to `--log-without-time`
                "without_time": true,
            },
            // Equivalent to `--log-config`
            // More detail could be found in https://crates.io/crates/log4rs
            // "config_path": "/path/to/log4rs/config.yaml"
        }
}

错误日志如下:

TRACE [3080:84983] [shadowsocks::relay::tcprelay::aead] got AEAD salt b"\xc3\x0f\x10*\xd3\x16\xc6\x92a@\x8cO+\xcd\xa7a\xd2\x14\xed\xb0\x8f\xd8\x05\xd9\xceYwi\xc2\xbc\xd9>"
TRACE [3080:84983] [shadowsocks_service::server::tcprelay] accepted tcp client connection 172.17.122.43:57054, establishing tunnel to 127.0.0.1:7890
**ERROR** [3080:84987] [shadowsocks_service::server::tcprelay] tcp tunnel 172.17.122.43:57054 -> 127.0.0.1:7890 connect failed, error: Connection refused (os error 61)
DEBUG [3080:84987] [shadowsocks_service::server::tcprelay] tcp server stream aborted with error: Connection refused (os error 61)
TRACE [3080:84882] [shadowsocks::relay::tcprelay::crypto_io] generated AEAD cipher salt b"\x83g\xdfL\xbdI\x87Y.]\x8f\xba\x7f\x88x\x17\x17\x11\xa4\x96\xbb\x0c+b\x16jQ~QU1\xf5"
TRACE [3080:84983] [shadowsocks::relay::tcprelay::aead] got AEAD salt b"\xbc,\x82X\x1c\xff\xd6w\x08\xda\xfb\xde\x96\x88\x92\xd3N;Q\xe1\x9e\'\xdb\xf5\xc1\xcfb?\x13\xd2\x10\xcd"
TRACE [3080:84983] [shadowsocks_service::server::tcprelay] accepted tcp client connection 172.17.122.43:57056, establishing tunnel to 127.0.0.1:7890
**ERROR** [3080:84983] [shadowsocks_service::server::tcprelay] tcp tunnel 172.17.122.43:57056 -> 127.0.0.1:7890 connect failed, error: Connection refused (os error 61)
DEBUG [3080:84983] [shadowsocks_service::server::tcprelay] tcp server stream aborted with error: Connection refused (os error 61)
TRACE [3080:84882] [shadowsocks::relay::tcprelay::crypto_io] generated AEAD cipher salt b"-x\xef\xd26KW\x16s\x87r \xf5\x17DO\x9c\x13\xa5l\x10\xa2\x8c\xeai\xa6\xca\xb1g\xac\xd2^"
TRACE [3080:84983] [shadowsocks::relay::tcprelay::aead] got AEAD salt b"\xe8\x14\x9e*\x9d\xe2\x17\xedVo\x1f|\x84\xab\xb0\xafed\xfb p\x10\xfd\x8a\xa3\xcd\xf8#\x1e\x87\x7f/"
TRACE [3080:84983] [shadowsocks_service::server::tcprelay] accepted tcp client connection 172.17.122.43:57058, establishing tunnel to 127.0.0.1:7890
**ERROR** [3080:84987] [shadowsocks_service::server::tcprelay] tcp tunnel 172.17.122.43:57058 -> 127.0.0.1:7890 connect failed, error: Connection refused (os error 61)
DEBUG [3080:84987] [shadowsocks_service::server::tcprelay] tcp server stream aborted with error: Connection refused (os error 61)
TRACE [3080:84882] [shadowsocks::relay::tcprelay::crypto_io] generated AEAD cipher salt b" \x8b\xa2z\x1a\xcc\x0b\x9f\x15\'\xe6+\xd4\xf0\xd4\xaeOe\xdfX\x1a$\x08\x13\xc3\xaa\xd5\xf5\xf3\xae\x9f\x8a"
TRACE [3080:84983] [shadowsocks::relay::tcprelay::aead] got AEAD salt b"\xad\x19\x18\xff\xa1C\xbf\xddY\xb5\x86\x8f\xcb\xd3~F\xc4\xfc\xfc\xbe\xaa\xda\xd7uv\x04\x1c\x02\xabA\xfe1"
TRACE [3080:84983] [shadowsocks_service::server::tcprelay] accepted tcp client connection 172.17.122.43:57060, establishing tunnel to 127.0.0.1:7890
**ERROR** [3080:84983] [shadowsocks_service::server::tcprelay] tcp tunnel 172.17.122.43:57060 -> 127.0.0.1:7890 connect failed, error: Connection refused (os error 61)
DEBUG [3080:84983] [shadowsocks_service::server::tcprelay] tcp server stream aborted with error: Connection refused (os error 61)
TRACE [3080:84882] [shadowsocks::relay::tcprelay::crypto_io] generated AEAD cipher salt b"o\xa9\x83\x99Li\xfaD_MW;\x88\xfd\xd8\xdc\x9bu \x16\x1b\xa7\xe4\xa8\xe3\xc5F\xd4>vtG"
TRACE [3080:84987] [shadowsocks::relay::tcprelay::aead] got AEAD salt b"\xf8\xa2\x0ek\x84\x04\xccOa\xeb/fO\x113]\x8f\xe3Z\xabo\xf9k\x96\x13m!\x957\xec,\x89"
TRACE [3080:84987] [shadowsocks_service::server::tcprelay] accepted tcp client connection 172.17.122.43:57062, establishing tunnel to 127.0.0.1:7890
**ERROR**[3080:84987] [shadowsocks_service::server::tcprelay] tcp tunnel 172.17.122.43:57062 -> 127.0.0.1:7890 connect failed, error: Connection refused (os error 61)
DEBUG [3080:84987] [shadowsocks_service::server::tcprelay] tcp server stream aborted with error: Connection refused (os error 61)
TRACE [3080:84882] [shadowsocks::relay::tcprelay::crypto_io] generated AEAD cipher salt b"\x97\xc10\xa33\xaa\xc4;G\x13\x0c\'\xbf\xd9Z\x829\x10\x8bu\x84\x06P^N\x14\\2;\xcdR\x1b"
TRACE [3080:84987] [shadowsocks::relay::tcprelay::aead] got AEAD salt b"\x88P^\xc0\xad\x1e\xd2\x90\x14\xca5\x9d\xcd\xdc\xb4^J\xcc\x1c|*(\xcd\xed[u\x18R\xfd\xdf(i"
TRACE [3080:84987] [shadowsocks_service::server::tcprelay] accepted tcp client connection 172.17.122.43:57064, establishing tunnel to 127.0.0.1:7890
**ERROR** [3080:84983] [shadowsocks_service::server::tcprelay] tcp tunnel 172.17.122.43:57064 -> 127.0.0.1:7890 connect failed, error: Connection refused (os error 61)
DEBUG [3080:84983] [shadowsocks_service::server::tcprelay] tcp server stream aborted with error: Connection refused (os error 61)
TRACE [3080:84882] [shadowsocks::relay::tcprelay::crypto_io] generated AEAD cipher salt b"x\xb63\xad3T\x9a\xc3\xac\x05\xe5Q7\xad\xd6\xe3O\xd57\xeb\xa4:\xe0BJ2\x9a\xae#ev\xc3"
TRACE [3080:84983] [shadowsocks::relay::tcprelay::aead] got AEAD salt b"U\x97U\xeb\xe9\xb2\"\x80L\x1a\x1fr\xc2\x06\xbd\x87`\xeb\xc1\xcf_\xdb/\xef\x0f&Q\xef=\xcav|"
TRACE [3080:84983] [shadowsocks_service::server::tcprelay] accepted tcp client connection 172.17.122.43:57066, establishing tunnel to 127.0.0.1:7890
**ERROR** [3080:84987] [shadowsocks_service::server::tcprelay] tcp tunnel 172.17.122.43:57066 -> 127.0.0.1:7890 connect failed, error: Connection refused (os error 61)
DEBUG [3080:84987] [shadowsocks_service::server::tcprelay] tcp server stream aborted with error: Connection refused (os error 61)
zonyitoo commented 12 months ago
**ERROR** [3080:84983] [shadowsocks_service::server::tcprelay] tcp tunnel 172.17.122.43:57060 -> 127.0.0.1:7890 connect failed, error: Connection refused (os error 61)
DEBUG [3080:84983] [shadowsocks_service::server::tcprelay] tcp server stream aborted with error: Connection refused (os error 61)

The error message was very clear. Your sslocal sent target address 127.0.0.1:7890 to ssserver, which was not connectable from server.