[tor-commits] [flashproxy/master] Default facilitator address.

dcf at torproject.org dcf at torproject.org
Mon Apr 9 04:08:41 UTC 2012


commit fd1cbd814f68f572e7e3473a1f5282da0716241f
Author: David Fifield <david at bamsoftware.com>
Date:   Mon Mar 12 00:42:03 2012 -0700

    Default facilitator address.
---
 flashproxy.js |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/flashproxy.js b/flashproxy.js
index ab55f07..49c033d 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -1,3 +1,13 @@
+var DEFAULT_FACILITATOR_ADDR = {
+    host: "tor-facilitator.bamsoftware.com",
+    port: 9002
+};
+
+function format_addr(addr)
+{
+    return addr.host + ":" + addr.port;
+}
+
 function FlashProxy()
 {
     this.debug_div = document.createElement("div");
@@ -14,7 +24,17 @@ function FlashProxy()
     };
 
     this.start = function() {
+        var fac_addr;
+
         this.puts("Hello world!");
+
+        fac_addr = DEFAULT_FACILITATOR_ADDR;
+        if (!fac_addr) {
+            puts("Error: Facilitator spec must be in the form \"host:port\".");
+            return;
+        }
+
+        this.puts("Using facilitator " + format_addr(fac_addr) + ".");
     }
 }
 





More information about the tor-commits mailing list