I've configured shadowsocks system by running ss-server on VPS and ss-local on my client machine. Then I made a simple SOCKS5 client which connects to ss-local and resolve SOCKS request using C. All work well, when I run ss-tunnel instead of ss-local, my SOCKS5 client can't connect to ss-tunnel.
TCP connection terminates as soon as it established. I'm not sure what is the proper reason.
ss-tunnel -c config.json -L <destaddr:port>
But it does when I run ss-local instead.
ss-local -c config.json
Below is my config file.
{
"server":"xxx.xxx.xxx.xxx",
"server_port":443,
"local_address": "127.0.0.1",
"local_port":10800,
"password":"xxxxxxxxxx",
"timeout":60,
"method":"chacha20-ietf-poly1305",
"workers":8,
"plugin":"obfs-local",
"plugin_opts":"obfs=tls;obfs-host=www.google.com"
}
Is there any difference between protocols of ss-local and ss-tunnel? I know it's false, but anyway can't get it how they go wrong. Thanks.
ss-tunnel establishes a complete tunnel with ss-server, all traffic to ss-tunnel is directly relayed to ss-server without any SOCKS request/resolve processes. After I've removed SOCKS handshake in my client program, it worked properly.