3 # General-purpose options.
5 # We chdir to this directory when we start; all files with relative
6 # pathnames are created under this directory
9 # Either a file in which to write our pid, or None
10 PIDFILE = "bridgedb.pid"
12 # Either a file to log to, or None if we should log to the console.
13 LOGFILE = "bridgedb.log"
14 # One of "DEBUG", "INFO", "WARNING", "ERROR"...
17 # Files from which we read bridge descriptors, on start and on SIGHUP.
18 BRIDGE_FILES = [ "./bridge-descriptors" ]
20 # File from which we read routerstatus entries, for learning which
21 # current bridges are Running.
22 STATUS_FILE = "networkstatus-bridges"
24 # Only consider routers whose purpose matches this string.
25 BRIDGE_PURPOSE = "bridge"
26 # File to store persistent info in.
27 DB_FILE = "./bridgedist.db"
28 # File to log changes to persistent info in. For debugging and bugfixing.
29 DB_LOG_FILE = "./bridgedist.log"
30 # File in which we store our secret HMAC root key.
31 MASTER_KEY_FILE = "./secret_key"
33 # How many clusters do we group IPs in when distributing bridges based on IP?
37 # Options related to HTTPS
39 # True if we are enabling distribution via HTTP or HTTPS; False otherwise.
41 # What proportion of bridges do we allocate to HTTP distribution? See
42 # EMAIL_SHARE and RESERVED_SHARE.
44 # An IP address (form "1.2.3.4") where we listen for HTTPS connections.
45 # "None" to listen on the default interface.
47 # Port to listen on for incoming HTTPS connections
50 HTTPS_CERT_FILE="cert"
52 HTTPS_KEY_FILE="privkey.pem"
53 # IP and port to listen on for unencrypted HTTP connections. Debugging only.
54 HTTP_UNENCRYPTED_BIND_IP=None
55 HTTP_UNENCRYPTED_PORT=None
56 # How many bridges do we give back in an answer?
57 HTTPS_N_BRIDGES_PER_ANSWER=3
60 # Options related to Email
62 # True if we are enabling distribution via Email; false otherwise.
64 # What proportion of bridges do we allocate to Email distribution? See
65 # HTTPS_SHARE and RESERVED_SHARE.
67 # Canonical versions of domains that we will reply to.
68 EMAIL_DOMAINS = [ "gmail.com", "yahoo.com" ]
69 # Map from unofficial domain to canonical domain.
70 EMAIL_DOMAIN_MAP = { "mail.google.com" : "gmail.com",
71 "googlemail.com" : "gmail.com",
73 # Map from canonical domain to list of options for that domain. Recognized
75 # "ignore_dots" -- the service ignores "." characters in email addresses.
77 # Note that unrecognized options are ignored; be sure to spell them right!
78 EMAIL_DOMAIN_RULES = { 'gmail.com' : ["ignore_dots"],
81 # If there are any IPs in this list, only allow incoming connections from
84 # IP and port to listen on for email connections. Debugging only.
87 # How many bridges do we give back in an answer?
88 EMAIL_N_BRIDGES_PER_ANSWER=3
91 # Options related to unallocated bridges.
93 # We split bridges into a group accessible by HTTPS queries; a group
94 # accessible by email queries; and a group that we don't assign to any
95 # query mechanism. Once a bridge is assigned to either of the first
96 # two groups, it stays there persistently. The bridges are allocated
97 # to these groups in a proportion of
98 # HTTPS_SHARE : EMAIL_SHARE : RESERVED_SHARE