onionscan/config/onionscan_config.go

22 lines
529 B
Go
Raw Normal View History

package config
import (
"time"
)
type OnionscanConfig struct {
TorProxyAddress string
DirectoryDepth int
2016-06-05 20:54:01 +02:00
Fingerprint bool
Timeout time.Duration
}
func Configure(torProxyAddress string, directoryDepth int, fingerprint bool, timeout int) *OnionscanConfig {
onionScan := new(OnionscanConfig)
onionScan.TorProxyAddress = torProxyAddress
onionScan.DirectoryDepth = directoryDepth
2016-06-05 20:54:01 +02:00
onionScan.Fingerprint = fingerprint
onionScan.Timeout = time.Duration(time.Second * time.Duration(timeout))
return onionScan
}