AnswerBun.com

Tor client node ignores `set_config` from Stem

Tor Asked by vanbastelaer on September 28, 2021

I was doing some experiments for a project on a Tor test network. I used Chutney to set up a small network and Stem to control one of the client nodes in the network. Because I made some changes on a relay node, I wanted to set up a circuit containing that node and run some quick experiments. My changes made the relay node run much slower, so I also need to change some default timeout settings.

I used the following code to set up a new circuit:

circuit_id = controller.new_circuit(path=["test009r", "test008r"], purpose='general', await_build=True)

The new circuit contains two relay nodes. I made some changes on the test009r node.
Circuit building failed at runtime because:

Circuit failed to be created: CHANNEL_CLOSED

I believe it was because of some timeout, so I configured the client node:

controller.set_conf("MaxCircuitDirtiness", "60000")
controller.set_conf("LearnCircuitBuildTimeout", "0")
controller.set_conf("CircuitBuildTimeout", "60000")
controller.set_conf("CircuitStreamTimeout", "60000")

I tried to set large timeout windows, but it seemed like Tor just ignored them, because I still got the same error.
I also tried:

controller.signal(stem.Signal.HUP)

after set_conf to "refresh" the configuration of the client node.
When running controller.get_conf_map, I was able to confirm that those configurations did change.
This part of the info.log might be relevant:

Jul 16 22:29:55.295 [info] circuit_build_times_set_timeout(): Set buildtimeout to low value 485.535223ms. Setting to 1500ms
Jul 16 22:29:55.417 [info] circuit_build_times_set_timeout(): Based on 164 circuit times, it looks like we don't need to wait so long for circuits to finish. We will now assume a circuit is too slow to use after waiting 2 seconds.
Jul 16 22:29:55.428 [info] circuit_build_times_set_timeout(): Circuit timeout data: 1500.000000ms, 60000.000000ms, Xm: 75, a: 0.861692, r: 0.170732
Jul 16 22:29:55.522 [info] circuit_build_times_filter_timeouts(): We had 28 timeouts out of 164 build times, and filtered 0 above the max of 60000

But I am not sure how to parse them. For example, from Tor’s documentation, 60000 should be in seconds, but not ms?

Add your own answers!

Related Questions

Vps works over tor

2  Asked on January 6, 2022 by khalid-al-anzi

   

Purpose of geoip Data file

2  Asked on December 30, 2021

 

Configuring Tor to Work in Other Web Browsers

2  Asked on December 9, 2021 by statto

         

Tor gets stuck on “Loading Network Status”

1  Asked on November 27, 2021 by bornad-x

 

Use Tor as Proxy for Internet

0  Asked on November 22, 2021 by youngtrashbag

     

Would it be possible to port Tor to Musl libc?

1  Asked on November 10, 2021 by saten-san

 

Tor Installed on Xubuntu VM: Port/Config Problem?

1  Asked on November 5, 2021 by ex_tenebros

 

I don’t want to identify myself as a TOR user

2  Asked on September 28, 2021 by parth-savadiya

     

Can TOR Browser be used with proxychains?

1  Asked on September 28, 2021 by userme

   

Configure for one hop only

2  Asked on September 28, 2021

   

Disable Network Set

0  Asked on September 28, 2021 by bandit-poolana

 

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir