bridgedb.conf 5.97 KB
Newer Older
1
2
3
4
5
6
7
8

#==========
# General-purpose options.

# We chdir to this directory when we start; all files with relative
# pathnames are created under this directory
RUN_IN_DIR = "~/run/"

9
10
11
# Either a file in which to write our pid, or None
PIDFILE = "bridgedb.pid"

12
13
# Either a file to log to, or None if we should log to the console.
LOGFILE = "bridgedb.log"
aagbsn's avatar
aagbsn committed
14
15
16
17
18

# Logfile rotation settings
LOGFILE_COUNT = 5
LOGFILE_ROTATE_SIZE = 10000000

19
# One of "DEBUG", "INFO", "WARNING", "ERROR"...
aagbsn's avatar
aagbsn committed
20
LOGLEVEL = "WARNING"
21

Roger Dingledine's avatar
Roger Dingledine committed
22
# Files from which we read bridge descriptors, on start and on SIGHUP.
23
24
25
26
27
BRIDGE_FILES = [ "./bridge-descriptors" ]

# File from which we read routerstatus entries, for learning which
# current bridges are Running.
STATUS_FILE = "networkstatus-bridges"
28

29
30
31
# Either a file that contains blocked bridges list or None
#COUNTRY_BLOCK_FILE = "./blocked-bridges" 

32
33
34
35
# File from which we read extra-info entries, for learning pluggable
# transports
EXTRA_INFO_FILE = "extra-infos"

36
37
38
39
40
41
42
43
44
# Only consider routers whose purpose matches this string.
BRIDGE_PURPOSE = "bridge"
# File to store persistent info in.
DB_FILE = "./bridgedist.db"
# File to log changes to persistent info in.  For debugging and bugfixing.
DB_LOG_FILE = "./bridgedist.log"
# File in which we store our secret HMAC root key.
MASTER_KEY_FILE = "./secret_key"

45
46
47
# File to which we dump bridge pool assignments for statistics.
ASSIGNMENTS_FILE = "assignments.log"

48
# How many clusters do we group IPs in when distributing bridges based on IP?
49
50
51
# Note that if PROXY_LIST_FILES is set (below), what we actually do here
# is use one higher than the number here, and the extra cluster is used
# for answering requests made by IP addresses in the PROXY_LIST_FILES file.
52
53
N_IP_CLUSTERS = 4

54
55
56
57
# If possible, always give a certain number of answers with a given ORPort.
# This is a list of (port,minimum) tuples.
FORCE_PORTS = [ (443, 1) ]

58
59
60
61
62
63
64
65
66
# If possible, always give a certain number of answers with a given flag.
# Only "stable" is now supported.  This is a list of (flag,minimum) tuples.
FORCE_FLAGS = [ ("Stable", 1) ]

# A list of filenames that contain IP addresses (one per line) of proxies.
# All IP-based distributors that see an incoming connection from a proxy
# will treat them specially.
PROXY_LIST_FILES = [ ]

67
68
69
#==========
# Options related to HTTPS

70
# True if we are enabling distribution via HTTP or HTTPS; False otherwise.
71
72
73
74
75
76
77
78
HTTPS_DIST = True
# What proportion of bridges do we allocate to HTTP distribution?  See
# EMAIL_SHARE and RESERVED_SHARE.
HTTPS_SHARE=10
# An IP address (form "1.2.3.4") where we listen for HTTPS connections.
# "None" to listen on the default interface.
HTTPS_BIND_IP=None
# Port to listen on for incoming HTTPS connections
79
HTTPS_PORT=3443
80
81
82
83
# Certificate file
HTTPS_CERT_FILE="cert"
# Private key file.
HTTPS_KEY_FILE="privkey.pem"
84
85
86
87
88
# If true, there is a trusted proxy relaying incoming messages to us: take
# the *last* entry from its X-Forwarded-For header as the client's IP.
HTTPS_USE_IP_FROM_FORWARDED_HEADER = False

# IP and port to listen on for unencrypted HTTP connections.
89
90
HTTP_UNENCRYPTED_BIND_IP=None
HTTP_UNENCRYPTED_PORT=None
91
92
# As HTTPS_USE_IP_FROM_FORWARDED_HEADER, but for unencrypted connections.
HTTP_USE_IP_FROM_FORWARDED_HEADER = False
93
# How many bridges do we give back in an answer?
Roger Dingledine's avatar
Roger Dingledine committed
94
HTTPS_N_BRIDGES_PER_ANSWER=3
95

96
97
98
99
# Should we tell http users about the bridge fingerprints?  Turn this on
# once we have the vidalia/tor interaction fixed for everbody.
HTTPS_INCLUDE_FINGERPRINTS=False

100
101
102
#==========
# Options related to Email

103
# True if we are enabling distribution via Email; false otherwise.
104
105
106
107
EMAIL_DIST = True
# What proportion of bridges do we allocate to Email distribution?  See
# HTTPS_SHARE and RESERVED_SHARE.
EMAIL_SHARE=10
108

Roger Dingledine's avatar
Roger Dingledine committed
109
# What email addresses do we use for outgoing email?  EMAIL_FROM_ADDR goes
110
111
112
113
# in the From: line in outgoing headers, and EMAIL_SMTP_FROM_ADDR goes in
# the MAIL FROM header in outgoing SMTP.
EMAIL_FROM_ADDR = "bridges@torproject.org"
EMAIL_SMTP_FROM_ADDR = "bridges@torproject.org"
aagbsn's avatar
aagbsn committed
114
115
EMAIL_SMTP_HOST = "127.0.0.1"
EMAIL_SMTP_PORT = 25
116

117
118
119
# Reject any RCPT TO lines that aren't to this user.
EMAIL_USERNAME = "bridges"

120
121
122
123
124
125
# Canonical versions of domains that we will reply to.
EMAIL_DOMAINS = [ "gmail.com", "yahoo.com" ]
# Map from unofficial domain to canonical domain.
EMAIL_DOMAIN_MAP = { "mail.google.com" : "gmail.com",
                     "googlemail.com" : "gmail.com",
                     }
126
127
128
# Map from canonical domain to list of options for that domain.  Recognized
# options are:
#     "ignore_dots" -- the service ignores "." characters in email addresses.
129
130
#     "dkim" -- if there is not a X-DKIM-Authentication-Result header
#        with the value "pass", then drop the message.
131
132
#
# Note that unrecognized options are ignored; be sure to spell them right!
133
134
EMAIL_DOMAIN_RULES = { 'gmail.com' : ["ignore_dots", "dkim"],
                       'yahoo.com' : ["dkim"]
135
                       }
136
# If there are any IPs in this list, only allow incoming connections from
137
138
139
# those IPs.
EMAIL_RESTRICT_IPS=[]
# IP and port to listen on for email connections. Debugging only.
140
EMAIL_BIND_IP="127.0.0.1"
141
EMAIL_PORT=6725
Roger Dingledine's avatar
Roger Dingledine committed
142
# How many bridges do we give back in an answer?
143
EMAIL_N_BRIDGES_PER_ANSWER=3
144

145
146
147
148
# Should we tell http users about the bridge fingerprints?  Turn this on
# once we have the vidalia/tor interaction fixed for everbody.
EMAIL_INCLUDE_FINGERPRINTS=False

149
150
151
152
# Configuration options for GPG signed messages
EMAIL_GPG_SIGNING_ENABLED = False
EMAIL_GPG_SIGNING_KEY = ''

153
154
155
156
157
158
159
#==========
# Options related to unallocated bridges.

# We split bridges into a group accessible by HTTPS queries; a group
# accessible by email queries; and a group that we don't assign to any
# query mechanism.  Once a bridge is assigned to either of the first
# two groups, it stays there persistently.  The bridges are allocated
Roger Dingledine's avatar
Roger Dingledine committed
160
# to these groups in a proportion of
161
162
163
#   HTTPS_SHARE : EMAIL_SHARE : RESERVED_SHARE
RESERVED_SHARE=2

164
FILE_BUCKETS = {}
aagbsn's avatar
aagbsn committed
165
166
167
168
169
170
171

# Options related to recaptcha support.
# Enable/Disable recaptcha
RECAPTCHA_ENABLED = False
# Recaptcha API keys
RECAPTCHA_PUB_KEY = ''
RECAPTCHA_PRIV_KEY = ''