SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
20.48k stars 2.44k forks source link

hysteria出站,视频网站/多媒体网站显示不正常 #192

Closed jinlin-teck closed 2 years ago

jinlin-teck commented 2 years ago

Welcome

Description of the problem

hysteria出站,视频网站/多媒体网站显示不正常 环境: 服务端客户端都是sing-box最新版 然后hysteria出站,打开YouTube显示异常,将客户端换成hysteria自家客户端就正常。 sing-box日志显示却无异常 image

Version of sing-box

```console $ sing-box version sing-box version 1.1-beta11 Environment: go1.19.2 linux/amd64 Tags: with_quic,with_utls CGO: enabled ```

Server and client configuration file

```console { "log": { "level": "info", "output": "/usr/local/etc/sing-box/sing-box.log", "timestamp": true }, "inbounds": [ { "type": "hysteria", "tag": "hysteria-in", "listen": "::", "listen_port": 1234, "sniff": true, "up_mbps": 30, "down_mbps": 30, "obfs": "***********", "auth_str": "******", "tls": { "enabled": true, "server_name": "*********.com", "alpn": "h3", "min_version": "1.2", "max_version": "1.3", "cipher_suites": [ "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256" ], "certificate_path": "/*********.crt", "key_path": "/*********.key" } } ], "outbounds": [ { "type": "direct", "tag": "direct-out" } ], "route": { "geoip": { "path": "/usr/local/etc/sing-box/geoip.db" }, "geosite": { "path": "/usr/local/etc/sing-box/geosite.db" }, "rules": [ { "geosite": "google", "geoip": "google", "outbound": "direct-out" }, { "domain_suffix": ".cn", "geosite": [ "cn", "category-ads-all" ], "geoip": "cn", "outbound": "block" } ], "final": "direct-out" } } ------------------------------------------------ { "log": { "level": "info", "output": "/usr/local/etc/sing-box/sing-box.log", "timestamp": true }, "inbounds": [ { "type": "mixed", "tag": "mixed-in-global", "listen": "::", "listen_port": 1080, "sniff": true } ], "outbounds": [ { "type": "hysteria", "tag": "hysteria-out", "server": "********", "server_port": 1234, "up_mbps": 30, "down_mbps": 30, "obfs": "**************", "auth_str": "***********", "tls": { "enabled": true, "server_name": "****.com", "alpn": "h3", "min_version": "1.2", "max_version": "1.3", "cipher_suites": [ "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256" ] } } ], "route": { "geoip": { "path": "/usr/local/etc/sing-box/geoip.db" }, "geosite": { "path": "/usr/local/etc/sing-box/geosite.db" }, "rules": [ { "inbound": "mixed-in-global", "outbound": "hysteria-out" } ] } } ```

Server and client log file

```console +0800 2022-10-30 14:27:19 INFO [1901832616] inbound/mixed[mixed-in-global]: inbound connection from 192.168.0.8:6648 +0800 2022-10-30 14:27:19 INFO [1901832616] inbound/mixed[mixed-in-global]: inbound connection to 142.251.10.95:443 +0800 2022-10-30 14:27:19 INFO [1901832616] outbound/hysteria[hysteria-out]: outbound connection to 142.251.10.95:443 +0800 2022-10-30 14:27:19 INFO [492758146] inbound/mixed[mixed-in-global]: inbound connection from 192.168.0.8:6649 +0800 2022-10-30 14:27:19 INFO [492758146] inbound/mixed[mixed-in-global]: inbound connection to 142.251.220.35:80 +0800 2022-10-30 14:27:19 INFO [492758146] outbound/hysteria[hysteria-out]: outbound connection to 142.251.220.35:80 +0800 2022-10-30 14:27:19 INFO [2120684954] inbound/mixed[mixed-in-global]: inbound connection from 192.168.0.8:6650 +0800 2022-10-30 14:27:19 INFO [2120684954] inbound/mixed[mixed-in-global]: inbound connection to 142.250.204.78:443 +0800 2022-10-30 14:27:19 INFO [2120684954] outbound/hysteria[hysteria-out]: outbound connection to 142.250.204.78:443 +0800 2022-10-30 14:27:19 INFO [3339208794] inbound/mixed[mixed-in-global]: inbound connection from 192.168.0.8:6651 +0800 2022-10-30 14:27:19 INFO [3339208794] inbound/mixed[mixed-in-global]: inbound connection to 142.250.207.67:443 +0800 2022-10-30 14:27:19 INFO [3339208794] outbound/hysteria[hysteria-out]: outbound connection to 142.250.207.67:443 +0800 2022-10-30 14:27:20 INFO [4246282856] inbound/mixed[mixed-in-global]: inbound connection from 192.168.0.8:6652 +0800 2022-10-30 14:27:20 INFO [4246282856] inbound/mixed[mixed-in-global]: inbound connection to 142.250.204.78:443 +0800 2022-10-30 14:27:20 INFO [4246282856] outbound/hysteria[hysteria-out]: outbound connection to 142.250.204.78:443 ```
Ciacconas commented 2 years ago

把 client的 "disable_mtu_discovery": 设成true试试。服务端的不要动

jinlin-teck commented 2 years ago

这样设置就正常了!感谢! 但这是为什么呢? 看文档这个的说明是强制为 Linux 和 Windows 以外的系统启用(根据上游)。而我的是Linux系统

Ciacconas commented 2 years ago

应该就是mtu太大了,限制一下就好了

jinlin-teck commented 2 years ago

好的,感谢!