SagerNet / sing-box

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

[Bug] Hysteria2 UDP无法正常玩游戏 #968

Closed CC-3301 closed 11 months ago

CC-3301 commented 11 months ago

Operating system

Linux

System version

OpenWrt R23.8.23 / LuCI Master (git-23.242.63652-d82d969)

Installation type

Others

If you are using a graphical client, please provide the version of the client.

OpenClash v0.45.141-beta,clash-meta alpha-d4a000a

Version

sing-box version 1.6.0-alpha.5

Environment: go1.21.2 linux/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_clash_api
Revision: 559d5493840846701e9bdff1b15ab45fe45e8219
CGO: disabled

Description

使用HY2玩战地2042,无法进入对局,使用TUIC则没有这个问题

客户端clash-meta 服务端sing-box 异常

客户端sing-box (windows-tun) 服务端sing-box 异常

客户端clash-meta 服务端hysteria2 official 正常

客户端版本clash-meta alpha-d4a000a client config

mode: rule
ipv6: false
log-level: info
geodata-mode: true
geodata-loader: memconservative
tcp-concurrent: true
profile:
  store-selected: true
  store-fake-ip: true
sniffer:
  enable: false
dns:
  enable: true
  ipv6: false
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  default-nameserver:
    - 223.5.5.5
  nameserver:
    - https://cloudflare-dns.com/dns-query#PROXY
  proxy-server-nameserver:
    - https://dns.alidns.com/dns-query
  nameserver-policy:
    "geosite:category-ads-all": rcode://success
    "geosite:cn":
      - https://dns.alidns.com/dns-query
  fake-ip-filter:
    - "+.qq.com"
proxies:
- name: HY2
  type: hysteria2
  server: hide
  port: 443
  password: hide
  alpn: [h3]
proxy-groups:
- name: PROXY
  type: select
  proxies:
    - HY2
    - DIRECT
- name: Game
  type: select
  proxies:
    - PROXY
    - DIRECT
rules:
  - GEOIP,private,DIRECT,no-resolve
  - GEOSITE,private,DIRECT
  - AND,((DST-PORT,443),(NETWORK,UDP),(GEOSITE,geolocation-!cn)),REJECT
  - GEOSITE,CN,DIRECT
  - GEOIP,CN,DIRECT
  - AND,((NETWORK,UDP),(GEOIP,!cn)),Game
  - MATCH,PROXY

服务端版本sing-box v1.6.0-alpha.5 server config

{
    "log": {
        "level": "debug",
        "output": "/var/log/sing-box/box.log",
        "timestamp": true
    },
    "inbounds": [
        {
            "listen": "::",
            "listen_port": 443,
            "sniff": true,
            "domain_strategy": "prefer_ipv6",
            "type": "hysteria2",
            "tag": "hy2-in",
            "users": [
                {
                    "password": "hide"
                }
            ],
            "ignore_client_bandwidth": true,
            "tls": {
                "enabled": true,
                "alpn": "h3",
                "certificate_path": "hide",
                "key_path": "hide"
            }
        }
    ]
}

Reproduction

客户端clash-meta,服务端sing-box,使用Hysteria2协议,打开战地2042,进行游戏匹配,无法进入游戏

Logs

+0800 2023-10-11 21:34:16 INFO [4293290385 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:34:16 INFO [4293290385 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:34:21 INFO [382259472 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:34:21 INFO [382259472 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:34:27 INFO [120247983 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:34:27 INFO [120247983 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:34:30 INFO [2573478900 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:34:30 INFO [2573478900 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:34:30 INFO [2825599743 0ms] inbound/hysteria2[hy2-in]: inbound connection to shield.ac.ea.com:443
+0800 2023-10-11 21:34:30 DEBUG [2825599743 0ms] dns: lookup domain shield.ac.ea.com
+0800 2023-10-11 21:34:30 INFO [2825599743 0ms] dns: lookup succeed for shield.ac.ea.com: 54.217.60.188 99.81.53.227 54.195.54.97
+0800 2023-10-11 21:34:30 DEBUG [2825599743 0ms] dns: resolved [54.217.60.188 99.81.53.227 54.195.54.97]
+0800 2023-10-11 21:34:30 INFO [2825599743 0ms] outbound/direct[direct]: outbound connection to shield.ac.ea.com:443
+0800 2023-10-11 21:34:36 INFO [3434292989 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:34:36 INFO [3434292989 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:34:38 INFO [549438411 0ms] inbound/hysteria2[hy2-in]: inbound connection to pin-river.data.ea.com:443
+0800 2023-10-11 21:34:38 DEBUG [549438411 0ms] router: sniffed protocol: tls, domain: pin-river.data.ea.com
+0800 2023-10-11 21:34:38 DEBUG [549438411 0ms] dns: lookup domain pin-river.data.ea.com
+0800 2023-10-11 21:34:38 INFO [549438411 0ms] dns: lookup succeed for pin-river.data.ea.com: 23.23.7.213 34.232.209.170 18.215.192.131 18.206.1.177 3.210.146.168 35.153.243.134 174.129.157.16 34.205.49.200
+0800 2023-10-11 21:34:38 DEBUG [549438411 0ms] dns: resolved [23.23.7.213 34.232.209.170 18.215.192.131 18.206.1.177 3.210.146.168 35.153.243.134 174.129.157.16 34.205.49.200]
+0800 2023-10-11 21:34:38 INFO [549438411 0ms] outbound/direct[direct]: outbound connection to pin-river.data.ea.com:443
+0800 2023-10-11 21:34:42 INFO [2713556207 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:34:42 INFO [2713556207 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:34:48 INFO [969808976 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:34:48 INFO [969808976 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:34:54 INFO [3426185959 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:34:54 INFO [3426185959 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:35:00 INFO [3612057187 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:35:00 INFO [3612057187 0ms] outbound/direct[direct]: outbound packet connection
+0800 2023-10-11 21:35:04 INFO [1108057174 0ms] inbound/hysteria2[hy2-in]: inbound connection to shield.ac.ea.com:443
+0800 2023-10-11 21:35:04 DEBUG [1108057174 0ms] dns: lookup domain shield.ac.ea.com
+0800 2023-10-11 21:35:04 INFO [1108057174 0ms] dns: lookup succeed for shield.ac.ea.com: 54.217.60.188 99.81.53.227 54.195.54.97
+0800 2023-10-11 21:35:04 DEBUG [1108057174 0ms] dns: resolved [54.217.60.188 99.81.53.227 54.195.54.97]
+0800 2023-10-11 21:35:04 INFO [1108057174 0ms] outbound/direct[direct]: outbound connection to shield.ac.ea.com:443
+0800 2023-10-11 21:35:06 INFO [3200711004 0ms] inbound/hysteria2[hy2-in]: inbound packet connection to 13.214.124.36:25202
+0800 2023-10-11 21:35:06 INFO [3200711004 0ms] outbound/direct[direct]: outbound packet connection
CC-3301 commented 11 months ago

[补充]

客户端clash-meta 服务端clash-meta 异常

客户端sing-box (windows-tun) 服务端hysteria2 official 正常

nekohasekai commented 11 months ago

如果您无法理解我的话,我可以用简体中文再次重复。Clash.Meta 不是 Project S 的项目,如果您要反馈 sing-box 问题,请提供可以在本地环境重现该问题的服务器与客户端 sing-box 配置(而不是粘贴您的部分本地或服务器配置),并提供复现流程。由于您的问题的模糊性,我们允许该流程依赖某个游戏来重现,但不得出现其他代理项目或应用。

如果您再次打开模糊的问题,我们将采取积极的反垃圾措施。