[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #25471 [Obfuscation/Snowflake]: "log to pt_state directory" option for snowflake-client
#25471: "log to pt_state directory" option for snowflake-client
-----------------------------------+------------------------------
Reporter: dcf | Owner: (none)
Type: enhancement | Status: needs_review
Priority: Medium | Milestone:
Component: Obfuscation/Snowflake | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------------------+------------------------------
Changes (by dcf):
* status: new => needs_review
Comment:
arlolra's patch:
{{{
--- a/client/snowflake.go
+++ b/client/snowflake.go
@@ -10,6 +10,7 @@ import (
"net"
"os"
"os/signal"
+ "path"
"strings"
"sync"
"syscall"
@@ -126,12 +127,22 @@ 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, "supersedes log
file")
max := flag.Int("max", DefaultSnowflakeCapacity,
"capacity for number of multiplexed WebRTC peers")
flag.Parse()
webrtc.SetLoggingVerbosity(1)
log.SetFlags(log.LstdFlags | log.LUTC)
+
+ if *logToStateDir {
+ stateDir, err := pt.MakeStateDir()
+ if err != nil {
+ log.Fatal(err)
+ }
+ *logFilename = path.Join(stateDir, "snowflake.log")
+ }
+
if *logFilename != "" {
logFile, err := os.OpenFile(*logFilename,
os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25471#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs