Hi All I am trying to use the OPAddon script to measure circuit bandwidth. I use the following input configuration for pathrc input configuration:
[GENERAL] # Set the host and port where Tor is # listening for control-connections control_host = 127.0.0.1 control_port = 9051
[CIRC_MANAGEMENT]
# Size of the maintained pool of circuits idle_circuits = 3
# TODO: Configure ports to use
[NODE_SELECTION] # Number of hops to be used in paths and # a minimum-value for advertised bandwidth pathlen = 3 min_bw = 1024
# Percentiles percent_fast = 100 percent_skip = 0 use_all_exits = yes
# UniformGenerator with optionally ordered exits, # 'uniform = no' --> bandwidth-weighted selection uniform = no order_exits = no
# Make use of guard-nodes (yes|no) or a specific # exit node (nickname or IDHex) for every path use_guards = yes #use_exit = xyz
[GEOIP] # Use GeoIP
use_geoip = no
# yes|no for unique|equal country codes # ! comment out to don't care unique_countries = no
# Maximum number of continent crossings: 0-n # ! comment out to enforce distinct continents # ! set >= pathlen to not care about #max_continent_crossings = 2 # Maximum number of ocean crossings: 0-n # ! comment out to don't care #max_ocean_crossings = 1
# If echelon is set, OP-Addon will try to find an # exit in the destination country of the current # request (exit_country may be used as backup) # yes|no # TODO: echelon = yes
# Set country codes for single positions #entry_country = DE #middle_country = RU #exit_country = US
# TODO: excludes = [".."]
[RTT] # Frequently ping the latencies of complete circuits # yes|no ping_circs = no
# Tor socks-properties socks_host = 127.0.0.1 socks_port = 9050 ping_dummy_host = 127.0.0.1 ping_dummy_port = 100
# Time interval to wait before triggering # pings and frequency of pings in seconds (float) initial_interval = 10 frequency = 5
# Close a circuit after n timeouts on measurings # Set to 0 to never close circs (int) timeout_limit = 1
[MODEL] # Set to 'yes' to measure latencies of single links # and enable circuit creation from the model # yes|no network_model = no
# Min ratio of circs created with the backup-method, # controls growing of the model (float in [0,1]) # 0: no growing # 1: growing only min_ratio = 0.5 # RTT-threshhold in seconds when creating circs (float): # 0: no threshhold, choose from all proposals max_rtt = 0 # Minimum number of proposals to choose from (int) min_proposals = 100
[EVALUATE] # Evaluation mode: close every circuit after measuring performance # yes|no evaluate = yes
# Number of latency-tests per circuit (int: 0-n) num_rtt_tests = 1 # Number of bandwidth-tests per circuit (int:0 or 1) # Requires stream-server.pl listening on the same host num_bw_tests = 1
# Total amount of circuits to test (int) num_records = 5
I run op-addon.py with the above config and it terminates throwing the following error pointing to PathSupport.py.
WARN[Thu Feb 02 17:45:58 2012]:No event for: 650 STREAM 76 CLOSED 47 128.59.16.165:8041 REASON=DONE Traceback (most recent call last): File "<home directory>/torflow.saved/torflow-3c0dd74/TorCtl/TorCtl.py", line 712, in _eventLoop self._handleFn(timestamp, reply) File "<home directory>/torflow.saved/torflow-3c0dd74/TorCtl/TorCtl.py", line 1337, in _handle1 self._map1.get(event.event_name, self.unknown_event)(event) File "./op-addon.py", line 853, in stream_status_event return self.handle_bw_test(s) File "./op-addon.py", line 823, in handle_bw_test lifespan = stream.lifespan(stream.bw_timestamp) File "<home directory>/torflow.saved/torflow-3c0dd74/TorCtl/PathSupport.py", line 1326, in lifespan return now-self.attached_at TypeError: unsupported operand type(s) for -: 'NoneType' and 'float' NOTICE[Thu Feb 02 17:45:58 2012]:Tor closed control connection. Exiting event thread. Terminated
I am not sure how to resolve this ... I am not sure if I am doing something wrong or not...
Thanks Sambuddho