[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake/master] Rename logToStateDir/keepLocalAddresses to kebab case
commit 5fa757865507e340b6117c784e4ac0bd88ac7858
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date: Thu Mar 19 16:15:19 2020 -0400
Rename logToStateDir/keepLocalAddresses to kebab case
https://en.wikipedia.org/wiki/Letter_case#Special_case_styles
---
client/snowflake.go | 15 +++++++++++----
client/torrc-localhost | 2 +-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/client/snowflake.go b/client/snowflake.go
index 8acb8f3..af8447c 100644
--- a/client/snowflake.go
+++ b/client/snowflake.go
@@ -89,11 +89,16 @@ func main() {
brokerURL := flag.String("url", "", "URL of signaling broker")
frontDomain := flag.String("front", "", "front domain")
logFilename := flag.String("log", "", "name of log file")
- logToStateDir := flag.Bool("logToStateDir", false, "resolve the log file relative to tor's pt state dir")
- keepLocalAddresses := flag.Bool("keepLocalAddresses", false, "keep local LAN address ICE candidates")
+ logToStateDir := flag.Bool("log-to-state-dir", false, "resolve the log file relative to tor's pt state dir")
+ keepLocalAddresses := flag.Bool("keep-local-addresses", false, "keep local LAN address ICE candidates")
unsafeLogging := flag.Bool("unsafe-logging", false, "prevent logs from being scrubbed")
max := flag.Int("max", DefaultSnowflakeCapacity,
"capacity for number of multiplexed WebRTC peers")
+
+ // Deprecated
+ oldLogToStateDir := flag.Bool("logToStateDir", false, "use -log-to-state-dir instead")
+ oldKeepLocalAddresses := flag.Bool("keepLocalAddresses", false, "use -keep-local-addresses instead")
+
flag.Parse()
log.SetFlags(log.LstdFlags | log.LUTC)
@@ -105,7 +110,7 @@ func main() {
// https://bugs.torproject.org/25600#comment:14
var logOutput = ioutil.Discard
if *logFilename != "" {
- if *logToStateDir {
+ if *logToStateDir || *oldLogToStateDir {
stateDir, err := pt.MakeStateDir()
if err != nil {
log.Fatal(err)
@@ -139,7 +144,9 @@ func main() {
snowflakes := sf.NewPeers(*max)
// Use potentially domain-fronting broker to rendezvous.
- broker, err := sf.NewBrokerChannel(*brokerURL, *frontDomain, sf.CreateBrokerTransport(), *keepLocalAddresses)
+ broker, err := sf.NewBrokerChannel(
+ *brokerURL, *frontDomain, sf.CreateBrokerTransport(),
+ *keepLocalAddresses || *oldKeepLocalAddresses)
if err != nil {
log.Fatalf("parsing broker URL: %v", err)
}
diff --git a/client/torrc-localhost b/client/torrc-localhost
index 9afb033..95746e0 100644
--- a/client/torrc-localhost
+++ b/client/torrc-localhost
@@ -3,6 +3,6 @@ DataDirectory datadir
ClientTransportPlugin snowflake exec ./client \
-url http://localhost:8080/ \
--keepLocalAddresses
+-keep-local-addresses
Bridge snowflake 0.0.3.0:1
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits