feat: 支持 hysteria2

This commit is contained in:
xream 2023-09-22 14:43:43 +08:00
parent 7603fac036
commit bc0dd4b175
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
7 changed files with 23 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "sub-store", "name": "sub-store",
"version": "2.14.59", "version": "2.14.60",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -208,7 +208,7 @@ function lastParse(proxy) {
delete proxy.network; delete proxy.network;
} }
} }
if (['trojan', 'tuic', 'hysteria'].includes(proxy.type)) { if (['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(proxy.type)) {
proxy.tls = true; proxy.tls = true;
} }
if (proxy.tls && !proxy.sni) { if (proxy.tls && !proxy.sni) {

View File

@ -423,6 +423,7 @@ function Clash_All() {
'tuic', 'tuic',
'vless', 'vless',
'hysteria', 'hysteria',
'hysteria2',
'wireguard', 'wireguard',
].includes(proxy.type) ].includes(proxy.type)
) { ) {

View File

@ -90,7 +90,11 @@ export default function Clash_Producer() {
proxy['http-opts'].headers.Host = [httpHost]; proxy['http-opts'].headers.Host = [httpHost];
} }
} }
if (['trojan', 'tuic', 'hysteria'].includes(proxy.type)) { if (
['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(
proxy.type,
)
) {
delete proxy.tls; delete proxy.tls;
} }
delete proxy['tls-fingerprint']; delete proxy['tls-fingerprint'];

View File

@ -108,7 +108,11 @@ export default function ClashMeta_Producer() {
} }
} }
if (['trojan', 'tuic', 'hysteria'].includes(proxy.type)) { if (
['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(
proxy.type,
)
) {
delete proxy.tls; delete proxy.tls;
} }

View File

@ -108,7 +108,11 @@ export default function ShadowRocket_Producer() {
} }
} }
if (['trojan', 'tuic', 'hysteria'].includes(proxy.type)) { if (
['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(
proxy.type,
)
) {
delete proxy.tls; delete proxy.tls;
} }

View File

@ -120,7 +120,11 @@ export default function Stash_Producer() {
proxy['http-opts'].headers.Host = [httpHost]; proxy['http-opts'].headers.Host = [httpHost];
} }
} }
if (['trojan', 'tuic', 'hysteria'].includes(proxy.type)) { if (
['trojan', 'tuic', 'hysteria', 'hysteria2'].includes(
proxy.type,
)
) {
delete proxy.tls; delete proxy.tls;
} }
delete proxy['tls-fingerprint']; delete proxy['tls-fingerprint'];