fix: 修复 Egern 输出

This commit is contained in:
xream 2025-03-03 10:42:44 +08:00
parent 87a4b14ae2
commit c2c39c5de6
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 10 additions and 7 deletions

View File

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

View File

@ -123,10 +123,10 @@ export default function Egern_Producer() {
proxy.udp || proxy.udp_relay || proxy.udp_relay,
next_hop: proxy.next_hop,
};
if (proxy.plugin === 'obfs') {
proxy.obfs = proxy['plugin-opts'].mode;
proxy.obfs_host = proxy['plugin-opts'].host;
proxy.obfs_uri = proxy['plugin-opts'].path;
if (original.plugin === 'obfs') {
proxy.obfs = original['plugin-opts'].mode;
proxy.obfs_host = original['plugin-opts'].host;
proxy.obfs_uri = original['plugin-opts'].path;
}
} else if (proxy.type === 'hysteria2') {
proxy = {
@ -144,9 +144,12 @@ export default function Egern_Producer() {
port_hopping: proxy.ports,
port_hopping_interval: proxy['hop-interval'],
};
if (proxy['obfs-password'] && proxy.obfs == 'salamander') {
if (
original['obfs-password'] &&
original.obfs == 'salamander'
) {
proxy.obfs = 'salamander';
proxy.obfs_password = proxy['obfs-password'];
proxy.obfs_password = original['obfs-password'];
}
} else if (proxy.type === 'tuic') {
proxy = {