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",
"version": "2.14.59",
"version": "2.14.60",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

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

View File

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

View File

@ -90,7 +90,11 @@ export default function Clash_Producer() {
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-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;
}

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;
}

View File

@ -120,7 +120,11 @@ export default function Stash_Producer() {
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-fingerprint'];