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
|
|
@ -359,8 +359,10 @@ func (s *Session) MaybeStartTunnel(ctx context.Context, name string) error {
|
|||
}
|
||||
s.logger.Infof("starting '%s' tunnel; please be patient...", name)
|
||||
tunnel, err := tunnel.Start(ctx, &tunnel.Config{
|
||||
Name: name,
|
||||
Session: s,
|
||||
Name: name,
|
||||
Session: s,
|
||||
TorArgs: s.TorArgs(),
|
||||
TorBinary: s.TorBinary(),
|
||||
})
|
||||
if err != nil {
|
||||
s.logger.Warnf("cannot start tunnel: %+v", err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue