commit b0dbf4747368192978db5f6927e71139ef441cd4
Author: David Fifield <[email protected]>
Date:   Thu Jun 29 16:11:03 2017 -0700

    Move some default config into constants at the stop.
---
 proxy-go/snowflake.go | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/proxy-go/snowflake.go b/proxy-go/snowflake.go
index 801be6e..1b7d593 100644
--- a/proxy-go/snowflake.go
+++ b/proxy-go/snowflake.go
@@ -21,6 +21,10 @@ import (
        "golang.org/x/net/websocket"
 )
 
+const defaultBrokerURL = "https://snowflake-reg.appspot.com/";
+const defaultRelayURL = "wss://snowflake.bamsoftware.com/"
+const defaultSTUNURL = "stun:stun.l.google.com:19302"
+
 type snowflakeOptions struct {
        capacity  int
        broker    string
@@ -295,9 +299,9 @@ func main() {
        var logFilename string
        opt = new(snowflakeOptions)
        flag.IntVar(&opt.capacity, "capacity", 10, "maximum concurrent clients")
-       flag.StringVar(&opt.broker, "broker", 
"https://snowflake-reg.appspot.com/";, "broker URL")
-       flag.StringVar(&opt.relay, "relay", "wss://snowflake.bamsoftware.com/", 
"websocket relay URL")
-       flag.StringVar(&opt.stun, "stun", "stun:stun.l.google.com:19302", "stun 
URL")
+       flag.StringVar(&opt.broker, "broker", defaultBrokerURL, "broker URL")
+       flag.StringVar(&opt.relay, "relay", defaultRelayURL, "websocket relay 
URL")
+       flag.StringVar(&opt.stun, "stun", defaultSTUNURL, "stun URL")
        flag.StringVar(&logFilename, "log", "", "log filename")
        flag.Parse()
 

_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to