tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

echo-cookie_wsh.py (347B)


      1 #!/usr/bin/python
      2 
      3 from pywebsocket3 import msgutil
      4 
      5 def web_socket_do_extra_handshake(request):
      6    request.ws_cookie = request.headers_in.get('cookie')
      7 
      8 def web_socket_transfer_data(request):
      9    if request.ws_cookie is not None:
     10        msgutil.send_message(request, request.ws_cookie)
     11    else:
     12        msgutil.send_message(request, '(none)')