Skip to content

Commit

Permalink
feat: Surge Hysteria2 输入/输出增加 ecn 参数
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Oct 12, 2023
1 parent 21b531a commit fca508b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.70",
"version": "2.14.71",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/core/proxy-utils/parsers/peggy/surge.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ tuic_v5 = tag equals "tuic-v5" address (alpn/passwordk/uuidk/ip_version/tls_veri
wireguard = tag equals "wireguard" (section_name/no_error_alert/ip_version/underlying_proxy/test_url/others)* {
proxy.type = "wireguard-surge";
}
hysteria2 = tag equals "hysteria2" address (no_error_alert/ip_version/underlying_proxy/test_url/sni/tls_verification/passwordk/download_bandwidth/others)* {
hysteria2 = tag equals "hysteria2" address (no_error_alert/ip_version/underlying_proxy/test_url/sni/tls_verification/passwordk/download_bandwidth/ecn/others)* {
proxy.type = "hysteria2";
}
socks5 = tag equals "socks5" address (username password)? (fast_open/others)* {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/core/proxy-utils/parsers/peggy/surge.peg
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ tuic_v5 = tag equals "tuic-v5" address (alpn/passwordk/uuidk/ip_version/tls_veri
wireguard = tag equals "wireguard" (section_name/no_error_alert/ip_version/underlying_proxy/test_url/others)* {
proxy.type = "wireguard-surge";
}
hysteria2 = tag equals "hysteria2" address (no_error_alert/ip_version/underlying_proxy/test_url/sni/tls_verification/passwordk/download_bandwidth/others)* {
hysteria2 = tag equals "hysteria2" address (no_error_alert/ip_version/underlying_proxy/test_url/sni/tls_verification/passwordk/download_bandwidth/ecn/others)* {
proxy.type = "hysteria2";
}
socks5 = tag equals "socks5" address (username password)? (fast_open/others)* {
Expand Down
2 changes: 2 additions & 0 deletions backend/src/core/proxy-utils/producers/surge.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ function hysteria2(proxy) {
'down',
);

result.appendIfPresent(`,ecn=${proxy.ecn}`, 'ecn');

return result.toString();
}

Expand Down

0 comments on commit fca508b

Please sign in to comment.