clean up websocket proxy

This commit is contained in:
Percs 2024-07-13 19:56:49 -05:00
parent 738198f954
commit bc9c7310ea

View file

@ -1,12 +1,11 @@
import { BareClient } from "@mercuryworkshop/bare-mux"
const client = new BareClient()
const RealWebSocket = WebSocket
WebSocket = new Proxy(WebSocket, {
construct(_target, args) {
construct(target, args) {
return client.createWebSocket(
args[0],
args[1],
RealWebSocket,
target,
{
"User-Agent": navigator.userAgent
},