Skip to content

Commit

Permalink
feat: 支持 Egern 前置代理 prev_hop 和 Hysteria2 端口跳跃
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Dec 29, 2024
1 parent 3aedd59 commit 278beae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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.15.5",
"version": "2.15.6",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
9 changes: 9 additions & 0 deletions backend/src/core/proxy-utils/producers/egern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -287,6 +295,7 @@ export default function Egern_Producer() {
[proxy.type]: {
...proxy,
type: undefined,
prev_hop,
},
};
});
Expand Down

0 comments on commit 278beae

Please sign in to comment.