[tor-commits] [flashproxy/master] Remove "client" and "relay" query string parameters.

dcf at torproject.org dcf at torproject.org
Wed Dec 21 10:26:04 UTC 2016


commit d518f2615d977475dabaf4a46fbbe83c5a52801c
Author: David Fifield <david at bamsoftware.com>
Date:   Wed Dec 21 02:10:16 2016 -0800

    Remove "client" and "relay" query string parameters.
    
    These could be used to send unsolicited WebSocket connection attempts.
---
 proxy/flashproxy.js | 35 -----------------------------------
 1 file changed, 35 deletions(-)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index 64a2b90..632620e 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -31,16 +31,6 @@
  * If true, show verbose terminal-like output instead of the badge. The values
  * "1", "true", and the empty string "" all enable debug mode. Any other value
  * uses the normal badge display.
- *
- * client=<HOST>:<PORT>
- * The address of the client to connect to. The proxy normally receives this
- * information from the facilitator. When this option is used, the facilitator
- * query is not done. The "relay" parameter must be given as well.
- *
- * relay=<HOST>:<PORT>
- * The address of the relay to connect to. The proxy normally receives this
- * information from the facilitator. When this option is used, the facilitator
- * query is not done. The "client" parameter must be given as well.
  */
 
 /* WebSocket links.
@@ -528,31 +518,6 @@ function FlashProxy() {
             this.rate_limit = new BucketRateLimit(rate_limit_bytes * RATE_LIMIT_HISTORY, RATE_LIMIT_HISTORY);
         }
 
-        client_addr = get_param_addr(query, "client");
-        if (client_addr === null) {
-            puts("Error: can't parse \"client\" parameter.");
-            this.die();
-            return;
-        }
-        relay_addr = get_param_addr(query, "relay");
-        if (relay_addr === null) {
-            puts("Error: can't parse \"relay\" parameter.");
-            this.die();
-            return;
-        }
-        if (client_addr !== undefined && relay_addr !== undefined) {
-            this.begin_proxy(client_addr, relay_addr);
-            return;
-        } else if (client_addr !== undefined) {
-            puts("Error: the \"client\" parameter requires \"relay\" also.")
-            this.die();
-            return;
-        } else if (relay_addr !== undefined) {
-            puts("Error: the \"relay\" parameter requires \"client\" also.")
-            this.die();
-            return;
-        }
-
         puts("Starting; will contact facilitator in " + this.initial_facilitator_poll_interval + " seconds.");
         setTimeout(this.proxy_main.bind(this), this.initial_facilitator_poll_interval * 1000);
     };





More information about the tor-commits mailing list