fix: h3 showed ping timeout

This commit is contained in:
fufsob committed 2026-10-03 16:42:00 +00:00
1 parent 1fc6c27489
commit e8ace6523d
2 files changed
+11 -1

No files matched your search

@@ -284,7 +284,13 @@ let
elif .settings.vnext then {server: .settings.vnext[0].address, port: .settings.vnext[0].port}
elif .settings.servers then {server: .settings.servers[0].address, port: .settings.servers[0].port}
else null end;
def udp: (.type // .protocol) as $t | (["hysteria", "hysteria2", "tuic"] | index($t) != null) or .quic? == true;
# XRay dials XHTTP over HTTP/3, on UDP, when its ALPN is h3 alone (and not REALITY);
# mKCP is UDP as well. Their servers have no TCP handshake to time either.
def udp: (.type // .protocol) as $t | .streamSettings.network? as $net
| (["hysteria", "hysteria2", "tuic"] | index($t) != null) or .quic? == true
or ($net == "xhttp" and .streamSettings.security? == "tls"
and .streamSettings.tlsSettings.alpn? == ["h3"])
or $net == "kcp" or $net == "mkcp";
($sidecar | map({key: .tag, value: .}) | from_entries) as $real
| [.[] | select(.type != "selector" and .type != "urltest")
| (.tag | ltrimstr("proxy-suite-ob-")) as $tag
+4
View File
@@ -90,6 +90,10 @@ in
assert pkgs.lib.hasInfix "--backend sing-box" hybridStartScript;
assert pkgs.lib.hasInfix "--backend xray" hybridStartScript;
assert pkgs.lib.hasInfix "_proxy_suite_add_xray_sidecar_ob" hybridStartScript;
# The outbounds test pings a sidecar outbound's real server, over UDP when XRay dials
# XHTTP over HTTP/3 or mKCP: no TCP handshake to time there.
assert pkgs.lib.hasInfix ''.streamSettings.tlsSettings.alpn? == ["h3"]'' hybridStartScript;
assert pkgs.lib.hasInfix ''$net == "kcp"'' hybridStartScript;
assert pkgs.lib.hasInfix "hybrid XRay json sidecar" hybridXrayRawStartScript;
assert pkgs.lib.hasInfix ''{type: "vless", tag: $tag, server: "127.0.0.1"''
hybridXrayRawStartScript;