mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:03:45 +08:00
chore: secret is empty and no parameters are passed
This commit is contained in:
parent
2d2521e434
commit
2c081e5a04
@ -48,7 +48,7 @@ export const LayoutTraffic = () => {
|
||||
const { server = "", secret = "" } = clashInfo!;
|
||||
|
||||
const s = createSockette(
|
||||
`ws://${server}/traffic?token=${encodeURIComponent(secret)}`,
|
||||
`ws://${server}${secret ? `/traffic?token=${encodeURIComponent(secret)}` : "/traffic"}`,
|
||||
{
|
||||
onmessage(event) {
|
||||
const data = JSON.parse(event.data) as ITrafficItem;
|
||||
@ -86,7 +86,7 @@ export const LayoutTraffic = () => {
|
||||
const { server = "", secret = "" } = clashInfo!;
|
||||
|
||||
const s = createSockette(
|
||||
`ws://${server}/memory?token=${encodeURIComponent(secret)}`,
|
||||
`ws://${server}${secret ? `/memory?token=${encodeURIComponent(secret)}` : "/memory"}`,
|
||||
{
|
||||
onmessage(event) {
|
||||
const data = JSON.parse(event.data) as MemoryUsage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user