Query string params available in the snowflake proxy for manual mode, broker url, and target relay address

This commit is contained in:
Serene Han 2016-01-23 09:27:23 -08:00
parent 77fbfe0e66
commit 0301ff1879
4 changed files with 43 additions and 23 deletions

View file

@ -25,6 +25,9 @@ class Broker
@clients = 0
@id = genSnowflakeID()
log 'Contacting Broker at ' + @url + '\nSnowflake ID: ' + @id
# Ensure url has the right protocol + trailing slash.
@url = 'https://' + @url if 0 != @url.indexOf('https://', 0)
@url += '/' if '/' != @url.substr -1
# Snowflake registers with the broker using an HTTP POST request, and expects
# a response from the broker containing some client offer.