<div dir="ltr">Hi All<div> I am trying to use the OPAddon script to measure circuit bandwidth. I use the following input configuration for pathrc input configuration:</div><div><br></div><div><br></div><div><div>[GENERAL]</div>

<div># Set the host and port where Tor is</div><div># listening for control-connections</div><div>control_host = 127.0.0.1</div><div>control_port = 9051</div><div><br></div><div>[CIRC_MANAGEMENT]</div><div><br></div><div>

# Size of the maintained pool of circuits</div><div>idle_circuits = 3</div><div><br></div><div># TODO: Configure ports to use</div><div><br></div><div>[NODE_SELECTION]</div><div># Number of hops to be used in paths and</div>

<div># a minimum-value for advertised bandwidth</div><div>pathlen = 3</div><div>min_bw = 1024</div><div><br></div><div># Percentiles</div><div>percent_fast = 100</div><div>percent_skip = 0</div><div>use_all_exits = yes</div>

<div><br></div><div># UniformGenerator with optionally ordered exits,</div><div># 'uniform = no' --> bandwidth-weighted selection</div><div>uniform = no</div><div>order_exits = no</div><div><br></div><div># Make use of guard-nodes (yes|no) or a specific </div>

<div># exit node (nickname or IDHex) for every path</div><div>use_guards = yes</div><div>#use_exit = xyz</div><div><br></div><div>[GEOIP]</div><div># Use GeoIP</div></div><div><br></div><div><div>use_geoip = no</div><div>

<br></div><div># yes|no for unique|equal country codes</div><div># ! comment out to don't care</div><div>unique_countries = no</div><div><br></div><div># Maximum number of continent crossings: 0-n</div><div># ! comment out to enforce distinct continents</div>

<div># ! set >= pathlen to not care about</div><div>#max_continent_crossings = 2</div><div># Maximum number of ocean crossings: 0-n</div><div># ! comment out to don't care</div><div>#max_ocean_crossings = 1</div><div>

<br></div><div># If echelon is set, OP-Addon will try to find an </div><div># exit in the destination country of the current </div><div># request (exit_country may be used as backup)</div><div># yes|no</div><div># TODO: echelon = yes</div>

<div><br></div><div># Set country codes for single positions</div><div>#entry_country = DE</div><div>#middle_country = RU</div><div>#exit_country = US</div><div><br></div><div># TODO: excludes = [".."]</div><div>

<br></div><div>[RTT]</div><div># Frequently ping the latencies of complete circuits</div><div># yes|no</div><div>ping_circs = no</div><div><br></div><div># Tor socks-properties</div><div>socks_host = 127.0.0.1</div><div>
socks_port = 9050</div>
</div><div><div>ping_dummy_host = 127.0.0.1</div><div>ping_dummy_port = 100</div><div><br></div><div># Time interval to wait before triggering</div><div># pings and frequency of pings in seconds (float)</div><div>initial_interval = 10</div>

<div>frequency = 5</div><div><br></div><div># Close a circuit after n timeouts on measurings</div><div># Set to 0 to never close circs (int)</div><div>timeout_limit = 1</div><div><br></div><div>[MODEL]</div><div># Set to 'yes' to measure latencies of single links </div>

<div># and enable circuit creation from the model</div><div># yes|no</div><div>network_model = no</div><div><br></div><div># Min ratio of circs created with the backup-method,</div><div># controls growing of the model (float in [0,1])</div>

<div>#   0:  no growing</div><div>#   1:  growing only</div><div>min_ratio = 0.5</div><div># RTT-threshhold in seconds when creating circs (float):</div><div>#   0:  no threshhold, choose from all proposals</div><div>max_rtt = 0</div>

<div># Minimum number of proposals to choose from (int)</div><div>min_proposals = 100</div><div><br></div><div><div>[EVALUATE]</div><div># Evaluation mode: close every circuit after measuring performance</div><div># yes|no</div>

<div>evaluate = yes</div><div><br></div><div># Number of latency-tests per circuit (int: 0-n)</div><div>num_rtt_tests = 1</div><div># Number of bandwidth-tests per circuit (int:0 or 1)</div><div># Requires <a href="http://stream-server.pl">stream-server.pl</a> listening on the same host</div>

<div>num_bw_tests = 1</div><div><br></div><div># Total amount of circuits to test (int)</div><div>num_records = 5</div></div><div><br></div><div><br></div><div>I run op-addon.py with the above config and it terminates throwing the following error pointing to PathSupport.py. </div>

<div><br></div><div>WARN[Thu Feb 02 17:45:58 2012]:No event for: 650 STREAM 76 CLOSED 47 <!-- <a href="http://128.59.16.165:8041"> -->128.59.16.165:8041<!-- </a> --> REASON=DONE</div><div>Traceback (most recent call last):</div><div>  File "<home directory>/torflow.saved/torflow-3c0dd74/TorCtl/TorCtl.py", line 712, in _eventLoop</div>

<div>    self._handleFn(timestamp, reply)</div><div>  File "<home directory>/torflow.saved/torflow-3c0dd74/TorCtl/TorCtl.py", line 1337, in _handle1</div><div>    self._map1.get(event.event_name, self.unknown_event)(event)</div>

<div>  File "./op-addon.py", line 853, in stream_status_event</div><div>    return self.handle_bw_test(s)</div><div>  File "./op-addon.py", line 823, in handle_bw_test</div><div>    lifespan = stream.lifespan(stream.bw_timestamp)</div>

<div>  File "<home directory>/torflow.saved/torflow-3c0dd74/TorCtl/PathSupport.py", line 1326, in lifespan</div><div>    return now-self.attached_at</div><div>TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'</div>

<div>NOTICE[Thu Feb 02 17:45:58 2012]:Tor closed control connection. Exiting event thread.</div><div>Terminated</div><div><br></div><div>I am not sure how to resolve this ... I am not sure if I am doing something wrong or not...</div>

<div><br></div><div>Thanks</div><div>Sambuddho</div><div><br></div><div><br></div><div><br></div>
</div></div>