diff --git a/app/Protocols/Singbox.php b/app/Protocols/Singbox.php index 8b69386d..3ad4244b 100644 --- a/app/Protocols/Singbox.php +++ b/app/Protocols/Singbox.php @@ -121,7 +121,7 @@ class SingBox } - protected function buildVmess($uuid, $server) + protected function buildVmess($uuid, $server) { $array = []; $array['tag'] = $server['name']; @@ -289,7 +289,7 @@ class SingBox ] ]; - if ($server['version'] == 1) { + if (is_null($server['version']) || $server['version'] == 1) { $array['auth_str'] = $password; $array['tag'] = $server['name']; $array['type'] = 'hysteria'; diff --git a/public/assets/admin/umi.js b/public/assets/admin/umi.js index 6988c3cb..b644d139 100644 --- a/public/assets/admin/umi.js +++ b/public/assets/admin/umi.js @@ -102100,7 +102100,7 @@ }, y.a.createElement("div", { className: "form-group col-md-3 col-xs-12" }, y.a.createElement("label", null, "HYSTERIA\u7248\u672c"), y.a.createElement(N["a"], { - value: parseInt(e.version), + value: parseInt(e.version) ? 2 : 1, style: { width: "100%" }, diff --git a/public/theme/v2board/assets/images/icon/Sing-box.png b/public/theme/v2board/assets/images/icon/Sing-box.png new file mode 100644 index 00000000..367925aa Binary files /dev/null and b/public/theme/v2board/assets/images/icon/Sing-box.png differ diff --git a/public/theme/v2board/assets/umi.js b/public/theme/v2board/assets/umi.js index 7cbf594a..1b147e12 100644 --- a/public/theme/v2board/assets/umi.js +++ b/public/theme/v2board/assets/umi.js @@ -1037,7 +1037,10 @@ renderSubscribeBox() { var e = this.props.subscribeUrl , t = []; - return (Object(u["i"])() || Object(u["j"])()) && (t.push({ + return t.push({ + title: "Sing-box", + href: "sing-box://import-remote-profile?url=" + encodeURIComponent(e + "&flag=sing-box") + "#" + window.settings.title + }), (Object(u["i"])() || Object(u["j"])()) && (t.push({ title: "Shadowrocket", href: "shadowrocket://add/sub://" + window.btoa(e + "&flag=shadowrocket").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "") + "?remark=" + window.settings.title }), @@ -1062,9 +1065,6 @@ Object(u["n"])() && (t.push({ title: "ClashMeta", href: "clash://install-config?url=" + encodeURIComponent(e + "&flag=meta") + "&name=" + window.settings.title - }) && t.push({ - title: "Clash For Windows", - href: "clash://install-config?url=" + encodeURIComponent(e) + "&name=" + window.settings.title })), Object(u["g"])() && (t.push({ title: "NekoBox For Android", @@ -1072,9 +1072,6 @@ }) && t.push({ title: "ClashMeta For Android", href: "clash://install-config?url=" + encodeURIComponent(e + "&flag=meta") + "&name=" + window.settings.title - }) && t.push({ - title: "Clash For Android", - href: "clash://install-config?url=" + encodeURIComponent(e) + "&name=" + window.settings.title }), t.push({ title: "Surfboard",