Package API¶
Subpackages¶
- sbws.core package
- Submodules
- sbws.core.cleanup module
- sbws.core.generate module
- sbws.core.scanner module
create_path_relay()
dispatch_worker_thread()
dumpstacks()
error_no_circuit()
error_no_helper()
gen_parser()
get_random_range_string()
log_measurement_exception()
main()
main_loop()
measure_bandwidth_to_server()
measure_relay()
measure_rtt_to_server()
measurement_writer()
process_completed_futures()
relay_update_xoff()
run_speedtest()
select_helper_candidates()
sigint_handler()
stop_threads()
timed_recv_from_server()
upload_data()
use_relay_as_entry()
wait_futures_completed()
- sbws.core.stats module
- Module contents
- Submodules
- sbws.lib package
- Submodules
- sbws.lib.circuitbuilder module
- sbws.lib.relaylist module
Relay
Relay._from_desc()
Relay._from_ns()
Relay.address
Relay.average_bandwidth
Relay.burst_bandwidth
Relay.can_exit_to_port()
Relay.consensus_bandwidth
Relay.consensus_bandwidth_is_unmeasured
Relay.consensus_valid_after
Relay.exit_policy
Relay.fingerprint
Relay.flags
Relay.has_2_in_flowctrl
Relay.increment_relay_recent_measurement_attempt()
Relay.increment_relay_recent_priority_list()
Relay.is_exit_not_bad_allowing_port()
Relay.last_consensus_timestamp
Relay.master_key_ed25519
Relay.nickname
Relay.observed_bandwidth
Relay.relay_in_recent_consensus_count
Relay.relay_recent_measurement_attempt_count
Relay.relay_recent_priority_list_count
Relay.update_relay_in_recent_consensus()
Relay.update_router_status()
Relay.update_server_descriptor()
Relay.update_xoff_recv()
Relay.update_xoff_sent()
Relay.xoff_recv_count
Relay.xoff_sent_count
RelayList
RelayList._calculate_min_bw_second_hop()
RelayList._init_relays()
RelayList._need_refresh()
RelayList._refresh()
RelayList._relays_with_flag()
RelayList._relays_without_flag()
RelayList.authorities
RelayList.bad_exits
RelayList.exit_min_bw()
RelayList.exits
RelayList.exits_not_bad_allowing_port()
RelayList.exits_with_2_in_flowctrl()
RelayList.exits_without_2_in_flowctrl()
RelayList.fast
RelayList.guards
RelayList.increment_recent_measurement_attempt()
RelayList.is_consensus_bwscanner_cc_2()
RelayList.is_consensus_bwscanner_cc_gte_1
RelayList.is_consensus_cc_alg_2
RelayList.last_consensus_timestamp
RelayList.non_exit_min_bw()
RelayList.non_exits
RelayList.random_relay()
RelayList.recent_consensus_count
RelayList.recent_measurement_attempt_count
RelayList.relays
RelayList.relays_fingerprints
RelayList.set_consensus_params()
RelayList.sum_consensus_bw
RelayList.sum_consensus_bw_exits_flowctrl2
RelayList.sum_consensus_bw_exits_not_bad_allowing_port
valid_after_from_network_statuses()
- sbws.lib.relayprioritizer module
- sbws.lib.resultdump module
Result
Result.Relay
Result.address
Result.circ
Result.consensus_bandwidth
Result.consensus_bandwidth_is_unmeasured
Result.dest_url
Result.fingerprint
Result.from_dict()
Result.master_key_ed25519
Result.nickname
Result.relay_average_bandwidth
Result.relay_burst_bandwidth
Result.relay_in_recent_consensus
Result.relay_observed_bandwidth
Result.relay_recent_measurement_attempt
Result.relay_recent_priority_list
Result.scanner
Result.time
Result.to_dict()
Result.type
Result.version
Result.xoff_recv
Result.xoff_sent
ResultDump
ResultError
ResultErrorAuth
ResultErrorCircuit
ResultErrorDestination
ResultErrorSecondRelay
ResultErrorStream
ResultSuccess
_ResultType
_StrEnum
load_recent_results_in_datadir()
load_result_file()
merge_result_dicts()
trim_results()
trim_results_ip_changed()
write_result_to_datadir()
- sbws.lib.v3bwfile module
V3BWFile
V3BWFile.bw_kb()
V3BWFile.bw_line_for_node_id()
V3BWFile.bw_sbws_scale()
V3BWFile.bw_torflow_scale()
V3BWFile.from_results()
V3BWFile.from_v100_fpath()
V3BWFile.from_v1_fpath()
V3BWFile.info_stats
V3BWFile.is_max_bw_diff_perc_reached()
V3BWFile.is_min_perc
V3BWFile.max_bw
V3BWFile.mean_bw
V3BWFile.measured_progress_stats()
V3BWFile.median_bw
V3BWFile.min_bw
V3BWFile.num
V3BWFile.read_number_consensus_relays()
V3BWFile.read_router_statuses()
V3BWFile.read_server_descriptors()
V3BWFile.set_under_min_report()
V3BWFile.sum_bw
V3BWFile.to_plt()
V3BWFile.update_progress()
V3BWFile.warn_if_not_accurate_enough()
V3BWFile.write()
V3BWHeader
V3BWHeader.add_net_bw_avgs()
V3BWHeader.add_relays_excluded_counters()
V3BWHeader.add_stats()
V3BWHeader.add_time_report_half_network()
V3BWHeader.consensus_count_from_file()
V3BWHeader.earliest_bandwidth_from_results()
V3BWHeader.from_lines_v1()
V3BWHeader.from_lines_v100()
V3BWHeader.from_results()
V3BWHeader.from_text_v1()
V3BWHeader.generator_started_from_file()
V3BWHeader.keyvalue_tuple_ls
V3BWHeader.keyvalue_unordered_tuple_ls
V3BWHeader.keyvalue_v1str_ls
V3BWHeader.keyvalue_v2_ls
V3BWHeader.latest_bandwidth_from_results()
V3BWHeader.num_lines
V3BWHeader.recent_measurement_attempt_count_from_file()
V3BWHeader.recent_priority_list_count_from_file()
V3BWHeader.recent_priority_relay_count_from_file()
V3BWHeader.strv1
V3BWHeader.strv2
V3BWLine
V3BWLine.bw_keyvalue_tuple_ls
V3BWLine.bw_keyvalue_v1str_ls
V3BWLine.bw_mean_from_results()
V3BWLine.bw_median_from_results()
V3BWLine.bw_strv1
V3BWLine.consensus_bandwidth_from_results()
V3BWLine.consensus_bandwidth_is_unmeasured_from_results()
V3BWLine.desc_bw_avg_from_results()
V3BWLine.desc_bw_bur_from_results()
V3BWLine.desc_bw_obs_last_from_results()
V3BWLine.desc_bw_obs_mean_from_results()
V3BWLine.from_bw_line_v1()
V3BWLine.from_data()
V3BWLine.from_results()
V3BWLine.last_time_from_results()
V3BWLine.result_types_from_results()
V3BWLine.results_away_each_other()
V3BWLine.results_recent_than()
V3BWLine.rtt_from_results()
kb_round_x_sig_dig()
num_results_of_type()
result_type_to_key()
round_sig_dig()
- Module contents
- Submodules
- sbws.util package
- Submodules
- sbws.util.config module
- sbws.util.filelock module
- sbws.util.parser module
- sbws.util.state module
- sbws.util.stem module
add_event_listener()
attach_stream_to_circuit_listener()
circuit_str()
get_socks_info()
init_controller()
is_bootstrapped()
is_torrc_starting_point_set()
launch_or_connect_to_tor()
launch_tor()
only_relays_with_bandwidth()
parse_user_torrc_config()
remove_event_listener()
set_torrc_options_can_fail()
set_torrc_runtime_options()
set_torrc_starting_point()
- Module contents
- Submodules
Submodules¶
sbws.globals module¶
- sbws.globals.touch_file(fname, times=None)[source]¶
If fname exists, update its last access and modified times to now. If fname does not exist, create it. If times are specified, pass them to os.utime for use.
- Parameters:
fname (str) – Name of file to update or create
times (tuple) – 2-tuple of floats for access time and modified time respectively