fix(gui): trojan with no obfuscation won't be selected (#1544)

This commit is contained in:
竹林里有冰 2024-10-25 10:49:27 +08:00 committed by GitHub
parent ae89afe878
commit 824d7e554a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1410,16 +1410,8 @@ export default {
o.ssCipher = fields[1];
o.ssPassword = fields[2];
}
const obfsMap = {
original: "none",
"": "none",
ws: "websocket",
};
o.obfs = obfsMap[u.params.type || ""];
if (o.obfs === "ws") {
if (u.params.type === "ws") {
o.obfs = "websocket";
}
if (o.obfs === "websocket") {
o.host = u.params.host || "";
o.path = u.params.path || "/";
}