[tor-commits] [meek/master] const blocks.
dcf at torproject.org
dcf at torproject.org
Sat Apr 26 18:54:18 UTC 2014
commit b2393bc809411f23a3057c111bfa11ed24fff9d7
Author: David Fifield <david at bamsoftware.com>
Date: Sat Apr 26 11:54:06 2014 -0700
const blocks.
---
appengine/reflect.go | 9 ++++++---
latencytest/latencytest.go | 6 ++++--
meek-client-torbrowser/linux.go | 6 ++++--
meek-client-torbrowser/mac.go | 6 ++++--
meek-client-torbrowser/windows.go | 6 ++++--
meek-client/meek-client.go | 20 +++++++++++---------
meek-server/meek-server.go | 20 +++++++++++---------
7 files changed, 44 insertions(+), 29 deletions(-)
diff --git a/appengine/reflect.go b/appengine/reflect.go
index f0755dc..863a738 100644
--- a/appengine/reflect.go
+++ b/appengine/reflect.go
@@ -10,9 +10,12 @@ import (
"appengine/urlfetch"
)
-const forwardURL = "http://meek.bamsoftware.com:7002/"
-// A timeout of 0 means to use the App Engine default (5 seconds).
-const urlFetchTimeout = 10 * time.Second
+const (
+ forwardURL = "http://meek.bamsoftware.com:7002/"
+ // A timeout of 0 means to use the App Engine default (5 seconds).
+ urlFetchTimeout = 10 * time.Second
+)
+
var context appengine.Context
func pathJoin(a, b string) string {
diff --git a/latencytest/latencytest.go b/latencytest/latencytest.go
index c2768eb..0244bd6 100644
--- a/latencytest/latencytest.go
+++ b/latencytest/latencytest.go
@@ -19,8 +19,10 @@ var urls = [...]string{
"https://www.googleusercontent.com/",
}
-const urlFetchTimeout = 10 * time.Second
-const numTrials = 5
+const (
+ urlFetchTimeout = 10 * time.Second
+ numTrials = 5
+)
var context appengine.Context
diff --git a/meek-client-torbrowser/linux.go b/meek-client-torbrowser/linux.go
index a5634b2..6e8d847 100644
--- a/meek-client-torbrowser/linux.go
+++ b/meek-client-torbrowser/linux.go
@@ -5,5 +5,7 @@
package main
-var firefoxPath = "Browser/firefox"
-var firefoxProfilePath = "Data/Browser/profile.meek-http-helper"
+const (
+ firefoxPath = "Browser/firefox"
+ firefoxProfilePath = "Data/Browser/profile.meek-http-helper"
+)
diff --git a/meek-client-torbrowser/mac.go b/meek-client-torbrowser/mac.go
index 9588512..6a11695 100644
--- a/meek-client-torbrowser/mac.go
+++ b/meek-client-torbrowser/mac.go
@@ -5,5 +5,7 @@
package main
-var firefoxPath = "../Contents/MacOS/TorBrowser.app/Contents/MacOS/firefox"
-var firefoxProfilePath = "../Data/Browser/profile.meek-http-helper"
+const (
+ firefoxPath = "../Contents/MacOS/TorBrowser.app/Contents/MacOS/firefox"
+ firefoxProfilePath = "../Data/Browser/profile.meek-http-helper"
+)
diff --git a/meek-client-torbrowser/windows.go b/meek-client-torbrowser/windows.go
index 4dbdb47..3ac9113 100644
--- a/meek-client-torbrowser/windows.go
+++ b/meek-client-torbrowser/windows.go
@@ -5,5 +5,7 @@
package main
-var firefoxPath string = "Browser/firefox.exe"
-var firefoxProfilePath = "Data/Browser/profile.meek-http-helper"
+const (
+ firefoxPath string = "Browser/firefox.exe"
+ firefoxProfilePath = "Data/Browser/profile.meek-http-helper"
+)
diff --git a/meek-client/meek-client.go b/meek-client/meek-client.go
index 1300474..d6b095f 100644
--- a/meek-client/meek-client.go
+++ b/meek-client/meek-client.go
@@ -20,15 +20,17 @@ import (
import "git.torproject.org/pluggable-transports/goptlib.git"
-const ptMethodName = "meek"
-const sessionIdLength = 32
-const maxPayloadLength = 0x10000
-const initPollInterval = 100 * time.Millisecond
-const maxPollInterval = 5 * time.Second
-const pollIntervalMultiplier = 1.5
-const maxHelperResponseLength = 10000000
-const helperReadTimeout = 60 * time.Second
-const helperWriteTimeout = 2 * time.Second
+const (
+ ptMethodName = "meek"
+ sessionIdLength = 32
+ maxPayloadLength = 0x10000
+ initPollInterval = 100 * time.Millisecond
+ maxPollInterval = 5 * time.Second
+ pollIntervalMultiplier = 1.5
+ maxHelperResponseLength = 10000000
+ helperReadTimeout = 60 * time.Second
+ helperWriteTimeout = 2 * time.Second
+)
var ptInfo pt.ClientInfo
diff --git a/meek-server/meek-server.go b/meek-server/meek-server.go
index c7d7e41..3ea445f 100644
--- a/meek-server/meek-server.go
+++ b/meek-server/meek-server.go
@@ -19,15 +19,17 @@ import (
import "git.torproject.org/pluggable-transports/goptlib.git"
-const ptMethodName = "meek"
-const minSessionIdLength = 32
-const maxPayloadLength = 0x10000
-// How long we try to read something back from the ORPort before returning the
-// response.
-const turnaroundTimeout = 10 * time.Millisecond
-// Passed as ReadTimeout and WriteTimeout when constructing the http.Server.
-const readWriteTimeout = 10 * time.Second
-const maxSessionStaleness = 120 * time.Second
+const (
+ ptMethodName = "meek"
+ minSessionIdLength = 32
+ maxPayloadLength = 0x10000
+ // How long we try to read something back from the ORPort before returning the
+ // response.
+ turnaroundTimeout = 10 * time.Millisecond
+ // Passed as ReadTimeout and WriteTimeout when constructing the http.Server.
+ readWriteTimeout = 10 * time.Second
+ maxSessionStaleness = 120 * time.Second
+)
var ptInfo pt.ServerInfo
More information about the tor-commits
mailing list