fix: encode controller secret, close #601
This commit is contained in:
parent
6e391df5ee
commit
f9a68e8b23
@ -32,7 +32,7 @@ const LayoutTraffic = () => {
|
||||
if (!clashInfo) return;
|
||||
|
||||
const { server = "", secret = "" } = clashInfo;
|
||||
connect(`ws://${server}/traffic?token=${secret}`);
|
||||
connect(`ws://${server}/traffic?token=${encodeURIComponent(secret)}`);
|
||||
|
||||
return () => {
|
||||
disconnect();
|
||||
|
@ -30,7 +30,7 @@ export const useLogSetup = () => {
|
||||
getClashLogs().then(setLogData);
|
||||
|
||||
const { server = "", secret = "" } = clashInfo;
|
||||
connect(`ws://${server}/logs?token=${secret}`);
|
||||
connect(`ws://${server}/logs?token=${encodeURIComponent(secret)}`);
|
||||
|
||||
return () => {
|
||||
disconnect();
|
||||
|
Loading…
Reference in New Issue
Block a user