fix: encodeURIComponent secret

This commit is contained in:
GyDi
2023-06-29 14:15:57 +08:00
committed by GitHub
parent c2109d245f
commit 6cf174c5ed
3 changed files with 6 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ const LayoutTraffic = () => {
if (document.visibilityState === "visible") {
// reconnect websocket
const { server = "", secret = "" } = clashInfo;
connect(`ws://${server}/traffic?token=${secret}`);
connect(`ws://${server}/traffic?token=${encodeURIComponent(secret)}`);
} else {
disconnect();
}