refactor(tunnel): provide TorArgs and TorBinary directly (#293)
We're trying to remove a circular dependency between the measurement Session and the tunnel package. To this end, continue to reduce the dependency scope by providing TorArgs and TorBinary directly. Part of https://github.com/ooni/probe/issues/985
This commit is contained in:
parent
1eb63bc4b6
commit
47aa773731
5 changed files with 21 additions and 9 deletions
|
|
@ -60,7 +60,7 @@ func torStart(ctx context.Context, config *Config) (Tunnel, error) {
|
|||
default:
|
||||
}
|
||||
logfile := LogFile(config.Session)
|
||||
extraArgs := append([]string{}, config.Session.TorArgs()...)
|
||||
extraArgs := append([]string{}, config.TorArgs...)
|
||||
extraArgs = append(extraArgs, "Log")
|
||||
extraArgs = append(extraArgs, "notice stderr")
|
||||
extraArgs = append(extraArgs, "Log")
|
||||
|
|
@ -68,7 +68,7 @@ func torStart(ctx context.Context, config *Config) (Tunnel, error) {
|
|||
instance, err := config.torStart(ctx, &tor.StartConf{
|
||||
DataDir: path.Join(config.Session.TempDir(), "tor"),
|
||||
ExtraArgs: extraArgs,
|
||||
ExePath: config.Session.TorBinary(),
|
||||
ExePath: config.TorBinary,
|
||||
NoHush: true,
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue