sbws 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
RelayRelay._from_desc()Relay._from_ns()Relay.addressRelay.average_bandwidthRelay.burst_bandwidthRelay.can_exit_to_port()Relay.consensus_bandwidthRelay.consensus_bandwidth_is_unmeasuredRelay.consensus_valid_afterRelay.exit_policyRelay.fingerprintRelay.flagsRelay.has_2_in_flowctrlRelay.increment_relay_recent_measurement_attempt()Relay.increment_relay_recent_priority_list()Relay.is_exit_not_bad_allowing_port()Relay.last_consensus_timestampRelay.master_key_ed25519Relay.nicknameRelay.observed_bandwidthRelay.relay_in_recent_consensus_countRelay.relay_recent_measurement_attempt_countRelay.relay_recent_priority_list_countRelay.update_relay_in_recent_consensus()Relay.update_router_status()Relay.update_server_descriptor()Relay.update_xoff_recv()Relay.update_xoff_sent()Relay.xoff_recv_countRelay.xoff_sent_count
RelayListRelayList._calculate_min_bw_second_hop()RelayList._init_relays()RelayList._need_refresh()RelayList._refresh()RelayList._relays_with_flag()RelayList._relays_without_flag()RelayList.authoritiesRelayList.bad_exitsRelayList.exit_min_bw()RelayList.exitsRelayList.exits_not_bad_allowing_port()RelayList.exits_with_2_in_flowctrl()RelayList.exits_without_2_in_flowctrl()RelayList.fastRelayList.guardsRelayList.increment_recent_measurement_attempt()RelayList.is_consensus_bwscanner_cc_2()RelayList.is_consensus_bwscanner_cc_gte_1RelayList.is_consensus_cc_alg_2RelayList.last_consensus_timestampRelayList.non_exit_min_bw()RelayList.non_exitsRelayList.random_relay()RelayList.recent_consensus_countRelayList.recent_measurement_attempt_countRelayList.relaysRelayList.relays_fingerprintsRelayList.set_consensus_params()RelayList.sum_consensus_bwRelayList.sum_consensus_bw_exits_flowctrl2RelayList.sum_consensus_bw_exits_not_bad_allowing_port
valid_after_from_network_statuses()
- sbws.lib.relayprioritizer module
- sbws.lib.resultdump module
ResultResult.RelayResult.addressResult.circResult.consensus_bandwidthResult.consensus_bandwidth_is_unmeasuredResult.dest_urlResult.fingerprintResult.from_dict()Result.master_key_ed25519Result.nicknameResult.relay_average_bandwidthResult.relay_burst_bandwidthResult.relay_in_recent_consensusResult.relay_observed_bandwidthResult.relay_recent_measurement_attemptResult.relay_recent_priority_listResult.scannerResult.timeResult.to_dict()Result.typeResult.versionResult.xoff_recvResult.xoff_sent
ResultDumpResultErrorResultErrorAuthResultErrorCircuitResultErrorDestinationResultErrorSecondRelayResultErrorStreamResultSuccess_ResultType_StrEnumload_recent_results_in_datadir()load_result_file()merge_result_dicts()trim_results()trim_results_ip_changed()write_result_to_datadir()
- sbws.lib.v3bwfile module
V3BWFileV3BWFile.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_statsV3BWFile.is_max_bw_diff_perc_reached()V3BWFile.is_min_percV3BWFile.max_bwV3BWFile.mean_bwV3BWFile.measured_progress_stats()V3BWFile.median_bwV3BWFile.min_bwV3BWFile.numV3BWFile.read_number_consensus_relays()V3BWFile.read_router_statuses()V3BWFile.read_server_descriptors()V3BWFile.set_under_min_report()V3BWFile.sum_bwV3BWFile.to_plt()V3BWFile.update_progress()V3BWFile.warn_if_not_accurate_enough()V3BWFile.write()
V3BWHeaderV3BWHeader.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_lsV3BWHeader.keyvalue_unordered_tuple_lsV3BWHeader.keyvalue_v1str_lsV3BWHeader.keyvalue_v2_lsV3BWHeader.latest_bandwidth_from_results()V3BWHeader.num_linesV3BWHeader.recent_measurement_attempt_count_from_file()V3BWHeader.recent_priority_list_count_from_file()V3BWHeader.recent_priority_relay_count_from_file()V3BWHeader.strv1V3BWHeader.strv2
V3BWLineV3BWLine.bw_keyvalue_tuple_lsV3BWLine.bw_keyvalue_v1str_lsV3BWLine.bw_mean_from_results()V3BWLine.bw_median_from_results()V3BWLine.bw_strv1V3BWLine.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.loghandler 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