sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

Slow Shadowsocks + ShadowTLS on Windows

Open soranerai opened this issue 3 years ago • 9 comments

Welcome

  • [X] Yes, I'm using the latest major release. Only such installations are supported.
  • [X] Yes, I'm using the latest Golang release. Only such installations are supported.
  • [X] Yes, I've searched similar issues on GitHub and didn't find any.
  • [X] Yes, I've included all information below (version, config, log, etc).

Description of the problem

When connecting via sing-box on android, the speed is about 400Mbps, but when connected on windows, the speed is about 30Mbps (both tested with speedtest.net). Server max speed is 1Gbps.

Version of sing-box

windows amd64 version 1.1b4

Server and client configuration file

Client:

{
  "dns": {
     "servers": [
         {
           "tag": "google",
           "address": "tls://1.1.1.1",
           "detour": "direct"
         }
     ],
     "strategy": "ipv4_only"
   },
  "inbounds": [
    {
      "type": "tun",
      "tag": "tun-in",
      "interface_name": "tun0",
      "inet4_address": "172.19.0.1/30",
      "inet6_address": "fdfe:dcba:9876::1/128",
      "mtu": 1500,
      "auto_route": true,
      "strict_route": true,
      "sniff": true,
      "stack": "gvisor"
    }
  ],
  "outbounds": [
    {
      "type": "shadowsocks",
      "tag": "shadowsocks-out",
      "method": "2022-blake3-aes-128-gcm",
      "password": "****",
      "multiplex": {
        "enabled": true,
        "max_connections": 4,
        "min_streams": 4
      },
      "domain_strategy": "ipv4_only",
      "detour": "shadowtls-out"
    },
    {
      "type": "shadowtls",
      "tag": "shadowtls-out",
      "server": "****",
      "server_port": 8443,
      "tls": {
        "enabled": true,
        "server_name": "cloudflare.com"
      }
    },
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "dns",
      "tag": "dns-out"
    }
  ],
  "route": {
    "rules": [
      {
        "protocol": "dns",
        "outbound": "dns-out"
      }
    ],
    
    "geoip": {
      "path": "geoip.db",
      "download_url": "https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db",
      "download_detour": "direct"
    },
	
    "geosite": {
      "path": "geosite.db",
      "download_url": "https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db",
      "download_detour": "direct"
    },
	
	"final": "shadowsocks-out",
	"auto_detect_interface": true
  }
}

Server config similar to example in documentation

Server and client log file

the logs are almost identical to the android logs, no errors or crashes, just logs

soranerai avatar Sep 14 '22 12:09 soranerai

So you need to switch to linux?

nekohasekai avatar Sep 14 '22 14:09 nekohasekai

the solution definitely work 👍

soranerai avatar Sep 14 '22 14:09 soranerai

the solution definitely work 👍

Sir, would you share the iptables rules?

malikshi avatar Sep 14 '22 14:09 malikshi

Well, or try the system tun stack in 1.1-beta.

nekohasekai avatar Sep 14 '22 14:09 nekohasekai

Well, or try the system tun stack in 1.1-beta.

Tried it, same result. the problem is not in the tunnel i think, direct outbound works at full speed.

soranerai avatar Sep 14 '22 14:09 soranerai

Is it the same for the 1.0 stable version?

nekohasekai avatar Sep 17 '22 23:09 nekohasekai

yes

soranerai avatar Sep 18 '22 16:09 soranerai

1.1b4 speed: 40mbps 1.0 stable speed: 20mbps

soranerai avatar Sep 18 '22 16:09 soranerai

socks5 speed at 1.1b4 - 130mbps

soranerai avatar Sep 19 '22 18:09 soranerai

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Dec 10 '22 02:12 github-actions[bot]