summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKathy Brade <brade@pearlcrescent.com>2018-03-06 15:43:40 -0500
committerKathy Brade <brade@pearlcrescent.com>2018-03-26 11:52:22 -0400
commit6a70f67dd895d1b9124a08dac06e0cba1b7a30bb (patch)
tree96e0f272736f94a33192b205b1e1e3ca6308739a
parent502001aed9e40f79807b913b02ea82f7c381e47d (diff)
Bug 25405: cannot use Moat if a meek bridge is configuredbug25405-01
Add support for a TOR_BROWSER_MEEK_PROFILE environment variable which, if present, contains the path to the HTTP helper browser profile.
-rw-r--r--meek-client-torbrowser/meek-client-torbrowser.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/meek-client-torbrowser/meek-client-torbrowser.go b/meek-client-torbrowser/meek-client-torbrowser.go
index 0064b4b..abf119b 100644
--- a/meek-client-torbrowser/meek-client-torbrowser.go
+++ b/meek-client-torbrowser/meek-client-torbrowser.go
@@ -205,14 +205,16 @@ func runFirefox() (cmd *exec.Cmd, stdout io.Reader, err error) {
if err != nil {
return
}
- var profilePath string
- var torDataDir = os.Getenv("TOR_BROWSER_TOR_DATA_DIR")
- if torDataDir != "" && torDataDirFirefoxProfilePath != "" {
- profilePath = filepath.Join(torDataDir, torDataDirFirefoxProfilePath)
- } else {
- profilePath, err = filepath.Abs(firefoxProfilePath)
- if err != nil {
- return
+ var profilePath = os.Getenv("TOR_BROWSER_MEEK_PROFILE")
+ if profilePath == "" {
+ var torDataDir = os.Getenv("TOR_BROWSER_TOR_DATA_DIR")
+ if torDataDir != "" && torDataDirFirefoxProfilePath != "" {
+ profilePath = filepath.Join(torDataDir, torDataDirFirefoxProfilePath)
+ } else {
+ profilePath, err = filepath.Abs(firefoxProfilePath)
+ if err != nil {
+ return
+ }
}
}
err = prepareBrowserProfile(profilePath)