Skip to content

Weird port change #2412

@mkyybx

Description

@mkyybx

What version of shadowsocks-libev are you using?

shadowsocks-libev 3.1.3
I got this from official OpenWrt repo and installed on my EA3500 router.

What operating system are you using?

Linux EA3500 4.14.95 #0 Mon Jan 28 08:54:32 2019 armv5tel GNU/Linux

What did you do?

I configured the ss-server as the following:

/var/etc/shadowsocks-libev/ss_server.cfg07eca1.json:

{
"use_syslog": true,
"ipv6_first": false,
"fast_open": false,
"reuse_port": false,
"mode": "tcp_and_udp",
"server": "0.0.0.0",
"server_port": 52500,
"method": "chacha20-ietf-poly1305",
"password": "********"
}
And the OpenWrt will run ss-server with the following parameters:
/usr/bin/ss-server -c /var/etc/shadowsocks-libev/ss_server.cfg07eca1.json -b 192.168.1.1

What did you expect to see?

I could connect my router using shadowsocks client from another host and use the socks5 proxy to browse Internet.

What did you see instead?

Some webpages could be loaded normally like google.com. But some pages couldn't like bilibili.com. Through the browser I found it was stuck by the request of gstatic.com or akamai***.net.

I then turn ss-server into verbose mode and use curl to do the test. I found sometimes ss-server will try to connect to 5xxxx port instead of 443 port. The log is as following:

Client side:

$ tsocks curl https://www.google.com:443 -o /dev/null -v
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 172.217.5.196...

  • TCP_NODELAY set
  • Connected to www.google.com (127.0.0.1) port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
    } [5 bytes data]
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
    } [512 bytes data]
    0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0^C

Server(router) side:

22:56:35 daemon.info /usr/bin/ss-server[16974]: accept a connection
22:56:35 daemon.info /usr/bin/ss-server[16974]: connect to 172.217.5.196:50177
22:56:53 daemon.info /usr/bin/ss-server[16974]: TCP connection timeout

Sometimes I will also get the following message:

getpeername: Socket not connected

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions