from logger import * ## Connection settings for Tor. tor_port = 9050 tor_host = "localhost" ## Connection settings for the Tor control port. control_port = 9051 ## Controller authentication: # control_password must be the clear-text password that is hashed # for the HashedControlPassword directive in your torrc. control_password = "" ## TorBEL test settings. # When should we stop testing routers that have fallen out of the # global consensus? Timeout value in seconds. stale_router_timeout = 60 * 60 * 4 # Test scheduler type. # Value must be either "hammer" or "conservative". # The "conservative" scheduler is recommended for production use # of TorBEL; "hammer" is useful for extensive debugging. test_scheduler = "conservative" # Complete list of ports to test exiting from. # Must be a proper Python list of unsigned 16-bit integers. test_port_list = [21, 23, 25, 43, 53, 80, 88, 110, 115, 123, 143, 443, 706, 993, 995, 5190, 6667, 8080, 8443] # What IP should TorBEL be binding on? # If test_bind_ip is None or empty, we will use # Tor's guess at our external IP address. # The IP addresses used must be formatted as a string; e.g., "192.168.1.150". test_bind_ip = "" test_host = "" # The maximum number of built and running circuits we want to have simultaneously. # This number is an upper bound and is limited by TorBEL based on the maximum # number of open file descriptors (man getrlimit(2), RLIMIT_NOFILE) and # the number of test ports you have defined above. max_built_circuits = 200 # max_pending_factor determines how many circuits we may extend without being # completely built, according to the following formula: # max_pending_circuits = int(max_pending_factor * max_built_circuits') # Where max_built_circuits' is max_built_circuits adjusted for your system # RLIMIT_NOFILE and test_port_list. # For example, if max_pending_factor is 0.5 and max_build_circuits is 200, # max_pending_circuits = int(0.5 * 200) = 100 # This factor directly determines how quickly the scheduler will try to built # circuits and thus how fast your test runs will complete. # max_pending_factor must be a floating-point number. max_pending_factor = 0.5 # For data exports, specify the output file prefix and whether or not # exports should be gzipped. If export_gzip is True, torbel will export # files of type ".json.gz" and ".csv.gz". export_file_prefix = "torbel_export" export_gzip = False # Export interval in minutes. export_interval = 20 # Should the TorBEL controller run as a daemon? daemonize = False # User and group to change to when dropping root privileges. user = "nobody" group = "nogroup" ## Logging configuration. # Lowest level for which log messages are emitted. # Valid values are, in order of increasing severity: # VERBOSE2, VERBOSE1, DEBUG, INFO, WARNING, ERROR, CRITICIAL log_level = NOTICE # Lowest level for which log messages from TorCtl are emitted. # Valid values are the same as for log_level. torctl_log_level = NOTICE # Log output methods. By default, we output to stdout only if we're not # daemonized, and to syslog only if we are daemonized. # File output is disabled by default. It is possible to log to any combination # of these outputs, if desired. # Possible values: # - log_stdout: True or False # - log_syslog: True or False # - log_file: A string specifying the filename, or None or an empty string if # no file logging is desired. # Since this is a Python module, any Python expression that evaluations to # the above possible values is valid. For example, "log_stdout = not daemonize" # configures logging to standard output based on the above value of "daemonize". # Thus you can change the value of "daemonize" and have the logging configuration # change appropriately. log_stdout = not daemonize log_syslog = daemonize # If log_file is specified, the log output of TorCtl will be placed in # the file named log_file + "-TorCtl". This is a stopgap solution until # proper logging support enters TorCtl mainline. log_file = "" # If torctl_debug is True, the TorCtl library will be instructed # to log all control port commands and responses to TorCtlDebug-XXX, # where XXX is the Unix timestamp when the log was started. # This is not recommended for production use as these logs can be very large. torctl_debug = False torctl_debug_file = "TorCtlDebug"