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.
68 # What email addresses to we use for outgoing email? EMAIL_FROM_ADDR goes
69 # in the From: line in outgoing headers, and EMAIL_SMTP_FROM_ADDR goes in
70 # the MAIL FROM header in outgoing SMTP.
71 EMAIL_FROM_ADDR = "bridges@torproject.org"
72 EMAIL_SMTP_FROM_ADDR = "bridges@torproject.org"
74 # Canonical versions of domains that we will reply to.
75 EMAIL_DOMAINS = [ "gmail.com", "yahoo.com" ]
76 # Map from unofficial domain to canonical domain.
77 EMAIL_DOMAIN_MAP = { "mail.google.com" : "gmail.com",
78 "googlemail.com" : "gmail.com",
80 # Map from canonical domain to list of options for that domain. Recognized
82 # "ignore_dots" -- the service ignores "." characters in email addresses.
83 # "dkim" -- if there is not a X-DKIM-Authentication-Result header
84 # with the value "pass", then drop the message.
86 # Note that unrecognized options are ignored; be sure to spell them right!
87 EMAIL_DOMAIN_RULES = { 'gmail.com' : ["ignore_dots", "dkim"],
88 'yahoo.com' : ["dkim"]
90 # If there are any IPs in this list, only allow incoming connections from
93 # IP and port to listen on for email connections. Debugging only.
94 EMAIL_BIND_IP="127.0.0.1"
96 # How many bridges do we give back in an answer?
97 EMAIL_N_BRIDGES_PER_ANSWER=3
100 # Options related to unallocated bridges.
102 # We split bridges into a group accessible by HTTPS queries; a group
103 # accessible by email queries; and a group that we don't assign to any
104 # query mechanism. Once a bridge is assigned to either of the first
105 # two groups, it stays there persistently. The bridges are allocated
106 # to these groups in a proportion of
107 # HTTPS_SHARE : EMAIL_SHARE : RESERVED_SHARE