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?
34 # Note that if PROXY_LIST_FILES is set (below), what we actually do here
35 # is use one higher than the number here, and the extra cluster is used
36 # for answering requests made by IP addresses in the PROXY_LIST_FILES file.
39 # If possible, always give a certain number of answers with a given ORPort.
40 # This is a list of (port,minimum) tuples.
41 FORCE_PORTS = [ (443, 1) ]
43 # If possible, always give a certain number of answers with a given flag.
44 # Only "stable" is now supported. This is a list of (flag,minimum) tuples.
45 FORCE_FLAGS = [ ("Stable", 1) ]
47 # A list of filenames that contain IP addresses (one per line) of proxies.
48 # All IP-based distributors that see an incoming connection from a proxy
49 # will treat them specially.
50 PROXY_LIST_FILES = [ ]
53 # Options related to HTTPS
55 # True if we are enabling distribution via HTTP or HTTPS; False otherwise.
57 # What proportion of bridges do we allocate to HTTP distribution? See
58 # EMAIL_SHARE and RESERVED_SHARE.
60 # An IP address (form "1.2.3.4") where we listen for HTTPS connections.
61 # "None" to listen on the default interface.
63 # Port to listen on for incoming HTTPS connections
66 HTTPS_CERT_FILE="cert"
68 HTTPS_KEY_FILE="privkey.pem"
69 # If true, there is a trusted proxy relaying incoming messages to us: take
70 # the *last* entry from its X-Forwarded-For header as the client's IP.
71 HTTPS_USE_IP_FROM_FORWARDED_HEADER = False
73 # IP and port to listen on for unencrypted HTTP connections.
74 HTTP_UNENCRYPTED_BIND_IP=None
75 HTTP_UNENCRYPTED_PORT=None
76 # As HTTPS_USE_IP_FROM_FORWARDED_HEADER, but for unencrypted connections.
77 HTTP_USE_IP_FROM_FORWARDED_HEADER = False
78 # How many bridges do we give back in an answer?
79 HTTPS_N_BRIDGES_PER_ANSWER=3
81 # Should we tell http users about the bridge fingerprints? Turn this on
82 # once we have the vidalia/tor interaction fixed for everbody.
83 HTTPS_INCLUDE_FINGERPRINTS=False
86 # Options related to Email
88 # True if we are enabling distribution via Email; false otherwise.
90 # What proportion of bridges do we allocate to Email distribution? See
91 # HTTPS_SHARE and RESERVED_SHARE.
94 # What email addresses do we use for outgoing email? EMAIL_FROM_ADDR goes
95 # in the From: line in outgoing headers, and EMAIL_SMTP_FROM_ADDR goes in
96 # the MAIL FROM header in outgoing SMTP.
97 EMAIL_FROM_ADDR = "bridges@torproject.org"
98 EMAIL_SMTP_FROM_ADDR = "bridges@torproject.org"
100 # Reject any RCPT TO lines that aren't to this user.
101 EMAIL_USERNAME = "bridges"
103 # Canonical versions of domains that we will reply to.
104 EMAIL_DOMAINS = [ "gmail.com", "yahoo.com" ]
105 # Map from unofficial domain to canonical domain.
106 EMAIL_DOMAIN_MAP = { "mail.google.com" : "gmail.com",
107 "googlemail.com" : "gmail.com",
109 # Map from canonical domain to list of options for that domain. Recognized
111 # "ignore_dots" -- the service ignores "." characters in email addresses.
112 # "dkim" -- if there is not a X-DKIM-Authentication-Result header
113 # with the value "pass", then drop the message.
115 # Note that unrecognized options are ignored; be sure to spell them right!
116 EMAIL_DOMAIN_RULES = { 'gmail.com' : ["ignore_dots", "dkim"],
117 'yahoo.com' : ["dkim"]
119 # If there are any IPs in this list, only allow incoming connections from
121 EMAIL_RESTRICT_IPS=[]
122 # IP and port to listen on for email connections. Debugging only.
123 EMAIL_BIND_IP="127.0.0.1"
125 # How many bridges do we give back in an answer?
126 EMAIL_N_BRIDGES_PER_ANSWER=3
128 # Should we tell http users about the bridge fingerprints? Turn this on
129 # once we have the vidalia/tor interaction fixed for everbody.
130 EMAIL_INCLUDE_FINGERPRINTS=False
133 # Options related to unallocated bridges.
135 # We split bridges into a group accessible by HTTPS queries; a group
136 # accessible by email queries; and a group that we don't assign to any
137 # query mechanism. Once a bridge is assigned to either of the first
138 # two groups, it stays there persistently. The bridges are allocated
139 # to these groups in a proportion of
140 # HTTPS_SHARE : EMAIL_SHARE : RESERVED_SHARE