From 278beae99a1b42cb6b9bb1caf8e1e760751a2289 Mon Sep 17 00:00:00 2001 From: xream Date: Sun, 29 Dec 2024 20:05:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=20Egern=20=E5=89=8D?= =?UTF-8?q?=E7=BD=AE=E4=BB=A3=E7=90=86=20`prev=5Fhop`=20=E5=92=8C=20Hyster?= =?UTF-8?q?ia2=20=E7=AB=AF=E5=8F=A3=E8=B7=B3=E8=B7=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/producers/egern.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 91129a811..d42a03df4 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.15.5", + "version": "2.15.6", "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 a3cc49e62..1638fb11d 100644 --- a/backend/src/core/proxy-utils/producers/egern.js +++ b/backend/src/core/proxy-utils/producers/egern.js @@ -75,6 +75,12 @@ export default function Egern_Producer() { if (proxy.tls && !proxy.sni) { proxy.sni = proxy.server; } + const prev_hop = + proxy.prev_hop || + proxy['underlying-proxy'] || + proxy['dialer-proxy'] || + proxy.detour; + if (proxy.type === 'http') { proxy = { type: 'http', @@ -133,6 +139,8 @@ export default function Egern_Producer() { next_hop: proxy.next_hop, sni: proxy.sni, skip_tls_verify: proxy['skip-cert-verify'], + port_hopping: proxy.ports, + port_hopping_interval: proxy['hop-interval'], }; if (proxy['obfs-password'] && proxy.obfs == 'salamander') { proxy.obfs = 'salamander'; @@ -287,6 +295,7 @@ export default function Egern_Producer() { [proxy.type]: { ...proxy, type: undefined, + prev_hop, }, }; });