Spaces:
BG5
/
Running

BG5 commited on
Commit
cb68c3e
·
verified ·
1 Parent(s): 1dec9a0

Update fun.py

Browse files
Files changed (1) hide show
  1. fun.py +3 -3
fun.py CHANGED
@@ -43,9 +43,9 @@ async def websocket_proxy(websocket: WebSocket, path: str):
43
  try:
44
  async with websockets.connect(
45
  target_url,
46
- extra_headers={"Host": "127.0.0.1"},
47
- ping_timeout=30,
48
- close_timeout=10
49
  ) as target_ws:
50
  async def client_to_server():
51
  while True:
 
43
  try:
44
  async with websockets.connect(
45
  target_url,
46
+ headers={"Host": "127.0.0.1"}, # 关键修改
47
+ ping_interval=20,
48
+ ping_timeout=30
49
  ) as target_ws:
50
  async def client_to_server():
51
  while True: