mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
default to wss and some documentation updates, #40
This commit is contained in:
parent
d1ec51bfb9
commit
3fe10f3e7c
4 changed files with 23 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
|||
Only websocket-specific stuff.
|
||||
###
|
||||
|
||||
WSS_ENABLED = true
|
||||
DEFAULT_PORTS =
|
||||
http: 80
|
||||
https: 443
|
||||
|
@ -46,7 +47,8 @@ buildUrl = (scheme, host, port, path, params) ->
|
|||
parts.join ''
|
||||
|
||||
makeWebsocket = (addr) ->
|
||||
url = buildUrl 'ws', addr.host, addr.port, '/'
|
||||
wsProtocol = if WSS_ENABLED then 'wss' else 'ws'
|
||||
url = buildUrl wsProtocol, addr.host, addr.port, '/'
|
||||
ws = new WebSocket url
|
||||
###
|
||||
'User agents can use this as a hint for how to handle incoming binary data: if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue