示例#1
0
        public TorClient(TorOptions options)
        {
            Options = options ?? throw new ArgumentNullException(nameof(options));

            _httpClient = new Lazy <HttpClient>(() =>
                                                new HttpClient(
                                                    new HttpClientHandler {
                UseProxy = true,
                Proxy    = new WebProxy(
                    options.TorIpAddress,
                    options.ProxyPort)
            }, true));

            TorControl = new TorControlAdapter(this);
        }
示例#2
0
 public TorControl(TorOptions options) : base(options)
 {
 }