[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit fd1cbd814f68f572e7e3473a1f5282da0716241f
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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) + ".");
     }
 }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits