mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
clean up websocket proxy
This commit is contained in:
parent
738198f954
commit
bc9c7310ea
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue