refactor(tunnel): simplify tor implementation (#290)
Simplify interaction within the package by avoiding to have a tor specific config. Use a Config instead. Part of https://github.com/ooni/probe/issues/985.
This commit is contained in:
parent
f739450370
commit
d9aff19be5
6 changed files with 109 additions and 92 deletions
|
|
@ -41,7 +41,7 @@ func Start(ctx context.Context, config *Config) (Tunnel, error) {
|
|||
return enforceNilContract(tun, err)
|
||||
case "tor":
|
||||
logger.Infof("starting %s tunnel; please be patient...", config.Name)
|
||||
tun, err := torStart(ctx, config.Session)
|
||||
tun, err := torStart(ctx, config)
|
||||
return enforceNilContract(tun, err)
|
||||
default:
|
||||
return nil, errors.New("unsupported tunnel")
|
||||
|
|
|
|||
Loading…
Reference in a new issue