This commit is contained in:
Sarah Jamie Lewis 2023-04-04 15:49:09 -07:00
parent a2603f243e
commit fac630dbaf
1 changed files with 10 additions and 0 deletions

View File

@ -433,6 +433,16 @@ func buildACN(globalSettings settings.GlobalSettings, torPath string, appDir str
socksPort = globalSettings.CustomSocksPort
}
// Override Ports if on Tails...
if cwtchTails := os.Getenv("CWTCH_TAILS"); strings.ToLower(cwtchTails) == "true" {
log.Infof("CWTCH_TAILS environment variable set... overriding tor config...")
controlPort = 9051
socksPort = 9050
globalSettings.CustomControlPort = controlPort
globalSettings.CustomSocksPort = socksPort
globalSettings.AllowAdvancedTorConfig = true
}
torrc := tor.NewTorrc().WithSocksPort(socksPort).WithOnionTrafficOnly().WithControlPort(controlPort).WithHashedPassword(base64.StdEncoding.EncodeToString(key))
// torrc.WithLog(path.Join(appDir, "tor", "tor.log"), tor.TorLogLevelNotice)
if globalSettings.UseCustomTorrc {