GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Verified Commit 5683956c authored by Philipp Winter's avatar Philipp Winter
Browse files

Add more extensive logging.

This patch 1) makes obfs4proxy log its output to file and 2) adds a log
message that prints the error message (if any) after sending a "SIGNAL
ACTIVE" tor tor.
parent 84126f7d
...@@ -63,7 +63,7 @@ func writeConfigToTorrc(tmpFh io.Writer, dataDir string) error { ...@@ -63,7 +63,7 @@ func writeConfigToTorrc(tmpFh io.Writer, dataDir string) error {
"SafeLogging 0\n"+ "SafeLogging 0\n"+
"Log notice file %s/tor.log\n"+ "Log notice file %s/tor.log\n"+
"DataDirectory %s\n"+ "DataDirectory %s\n"+
"ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit exec /usr/bin/obfs4proxy\n"+ "ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit exec /usr/bin/obfs4proxy -enableLogging -logLevel DEBUG\n"+
"Bridge %s\n"+ "Bridge %s\n"+
"Bridge %s\n"+ "Bridge %s\n"+
"Bridge %s\n", getDomainSocketPath(dataDir), dataDir, dataDir, "Bridge %s\n", getDomainSocketPath(dataDir), dataDir, dataDir,
...@@ -206,6 +206,7 @@ func (c *TorContext) TestBridgeLines(bridgeLines []string) *TestResult { ...@@ -206,6 +206,7 @@ func (c *TorContext) TestBridgeLines(bridgeLines []string) *TestResult {
// SETCONF. See the following issue for more details: // SETCONF. See the following issue for more details:
// https://gitlab.torproject.org/tpo/anti-censorship/bridgestrap/-/issues/12 // https://gitlab.torproject.org/tpo/anti-censorship/bridgestrap/-/issues/12
if _, err := c.Ctrl.Request("SIGNAL ACTIVE"); err != nil { if _, err := c.Ctrl.Request("SIGNAL ACTIVE"); err != nil {
log.Printf("Bug: error after sending SIGNAL ACTIVE: %s", err)
result.Error = err.Error() result.Error = err.Error()
return result return result
} }
......
...@@ -16,7 +16,7 @@ SocksPort auto ...@@ -16,7 +16,7 @@ SocksPort auto
SafeLogging 0 SafeLogging 0
Log notice file /foo/tor.log Log notice file /foo/tor.log
DataDirectory /foo DataDirectory /foo
ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit exec /usr/bin/obfs4proxy ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit exec /usr/bin/obfs4proxy -enableLogging -logLevel DEBUG
Bridge obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1 Bridge obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1
Bridge obfs4 193.11.166.194:27015 2D82C2E354D531A68469ADF7F878FA6060C6BACA cert=4TLQPJrTSaDffMK7Nbao6LC7G9OW/NHkUwIdjLSS3KYf0Nv4/nQiiI8dY2TcsQx01NniOg iat-mode=0 Bridge obfs4 193.11.166.194:27015 2D82C2E354D531A68469ADF7F878FA6060C6BACA cert=4TLQPJrTSaDffMK7Nbao6LC7G9OW/NHkUwIdjLSS3KYf0Nv4/nQiiI8dY2TcsQx01NniOg iat-mode=0
Bridge obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0 Bridge obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment