mirror of
https://github.com/Av0idD4rk/firegex.git
synced 2026-10-23 16:31:00 +00:00
Now on IPv6
This commit is contained in:
parent
ada3a7212b
commit
c6e94bcf89
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
**/*.pyc
|
||||
**/__pycache__/
|
||||
/.vscode/**
|
||||
/.mypy_cache/**
|
||||
|
||||
**/node_modules
|
||||
**/.pnp
|
||||
|
||||
@ -368,17 +368,14 @@ async def react_deploy(path):
|
||||
return FileResponse(file_request)
|
||||
|
||||
if DEBUG:
|
||||
async def forward_websocket(ws_a: WebSocket, ws_b: websockets.WebSocketClientProtocol):
|
||||
async def forward_websocket(ws_a, ws_b):
|
||||
while True:
|
||||
data = await ws_a.receive_bytes()
|
||||
await ws_b.send(data)
|
||||
|
||||
|
||||
async def reverse_websocket(ws_a: WebSocket, ws_b: websockets.WebSocketClientProtocol):
|
||||
async def reverse_websocket(ws_a, ws_b):
|
||||
while True:
|
||||
data = await ws_b.recv()
|
||||
await ws_a.send_text(data)
|
||||
|
||||
@app.websocket("/ws")
|
||||
async def websocket_debug_proxy(ws: WebSocket):
|
||||
await ws.accept()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user