diff --git a/backend/package.json b/backend/package.json index 9f2be8a7..1bc86652 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.20.47", + "version": "2.20.48", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/producers/egern.js b/backend/src/core/proxy-utils/producers/egern.js index 39b674fe..06145a74 100644 --- a/backend/src/core/proxy-utils/producers/egern.js +++ b/backend/src/core/proxy-utils/producers/egern.js @@ -9,6 +9,7 @@ export default function Egern_Producer() { if ( ![ 'http', + 'https', 'socks5', 'ss', 'trojan', @@ -83,7 +84,7 @@ export default function Egern_Producer() { if (proxy.type === 'http') { proxy = { - type: 'http', + type: proxy.tls ? 'https' : 'http', name: proxy.name, server: proxy.server, port: proxy.port, @@ -91,6 +92,12 @@ export default function Egern_Producer() { password: proxy.password, tfo: proxy.tfo || proxy['fast-open'], next_hop: proxy.next_hop, + ...(proxy.tls + ? { + sni: proxy.sni, + skip_tls_verify: proxy['skip-cert-verify'], + } + : {}), }; } else if (proxy.type === 'socks5') { proxy = { @@ -364,6 +371,7 @@ export default function Egern_Producer() { if ( [ 'http', + 'https', 'socks5', 'ss', 'trojan', @@ -394,6 +402,25 @@ export default function Egern_Producer() { }; } } + if ( + ['socks5', 'ss', 'trojan', 'vless', 'vmess'].includes( + original.type, + ) + ) { + if ( + ['on', 'true', true, '1', 1].includes( + original['block-quic'], + ) + ) { + proxy.block_quic = true; + } else if ( + ['off', 'false', false, '0', 0].includes( + original['block-quic'], + ) + ) { + proxy.block_quic = false; + } + } if ( ['ss'].includes(original.type) && proxy.shadow_tls &&