mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
Add context to HTTP handlers, attempt to support localhost Broker.
Seems unlikely to work due to dev_appserver single inflight request limitation
This commit is contained in:
parent
4acff9983c
commit
b04d1f67fb
4 changed files with 110 additions and 35 deletions
|
@ -28,7 +28,8 @@ class Broker
|
|||
@clients = 0
|
||||
@id = genSnowflakeID()
|
||||
# Ensure url has the right protocol + trailing slash.
|
||||
@url = 'https://' + @url if 0 != @url.indexOf('https://', 0)
|
||||
@url = 'http://' + @url if 0 == @url.indexOf('localhost', 0)
|
||||
@url = 'https://' + @url if 0 != @url.indexOf('http', 0)
|
||||
@url += '/' if '/' != @url.substr -1
|
||||
|
||||
# Promises some client SDP Offer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue