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:
@@ -95,9 +95,11 @@ func (g Getter) get(ctx context.Context, saver *trace.Saver) (TestKeys, error) {
|
||||
var proxyURL *url.URL
|
||||
if g.Config.Tunnel != "" {
|
||||
tun, err := tunnel.Start(ctx, &tunnel.Config{
|
||||
Name: g.Config.Tunnel,
|
||||
Session: g.Session,
|
||||
WorkDir: filepath.Join(g.Session.TempDir(), "urlgetter-tunnel"),
|
||||
Name: g.Config.Tunnel,
|
||||
Session: g.Session,
|
||||
TorArgs: g.Session.TorArgs(),
|
||||
TorBinary: g.Session.TorBinary(),
|
||||
WorkDir: filepath.Join(g.Session.TempDir(), "urlgetter-tunnel"),
|
||||
})
|
||||
if err != nil {
|
||||
return tk, err
|
||||
|
||||
Reference in New Issue
Block a user