Repository navigation
Expand file tree
/
Copy pathspns.ini.example
More file actions
161 lines (121 loc) · 7.12 KB
/
Copy pathspns.ini.example
File metadata and controls
161 lines (121 loc) · 7.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[db]
# The postgresql database URL
url = postgresql:///spns
[log]
# Log level
level = INFO
[hivemind]
# The socket we listen on, that other parts of the PN service use to communicate with the central "hivemind" process
listen = ipc://./hivemind.sock
# Optional encrypted TCP curve listener
#listen_curve = tcp://0.0.0.0:22030
# One or more admin x25519 pubkeys (comma-separated) for the listen_curve address; you can specify
# multiple by separating by whitespace or commas. Any listed pubkeys will have admin access when
# connecting to the listen_curve address.
listen_curve_admin = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
# Optional address(es) on which we listen for public quic requests (i.e. subscribe or unsubscribe
# from clients). This is an alternative to submitting via onion request can be used instead of
# OMQ, e.g. over Session Router. `[keys]:quic` must be set when this option is enabled.
#
# The first address in this list that is either an IPv4 address, or the IPv6 any address (`[::]`)
# will be used for *outgoing* connections to SNs.
quic_listen = [::]:5522
# OMQ address where we can make RPC requests to oxend. This can be a local oxend (e.g.
# ipc:///path/to/oxend.sock), a plaintext address, or a curve-encrypted address with pubkey.
oxend_rpc = tcp://localhost:22029
# How many SN connections we attempt to establish at once. Can be large to make a huge burst of
# connections at startup, or lower to pace those connections a little more.
max_connects = 1000
# We use a time-based filter on notifications to avoid sending duplicate notifications; this timer
# controls the minimum time for which we will filter duplicates. (In practice, the filter will
# often last somewhat longer than this, but this is the minimum). It must outlast the oldest a
# notification can be when it reaches us: one replayed after a monitor session is resumed can be
# about 13 minutes old (the 10 minutes a detached session lasts, plus the reconnection and the
# storage server's cleanup timer), and a duplicate of one already pushed must still be recognised
# then. The filter keeps two generations of hashes, so a longer lifetime costs a little memory.
filter_lifetime = 900
# How long the main hivemind process will wait at startup before establishing connections to
# the network's service nodes. This delay is designed to allow subordinate notification processes
# to connect to the hivemind to ensure that notification services are ready after a restart before
# we subscribe (and start receiving) message notifications.
startup_wait = 8.0
# Comma-separate list of expected notifier names; if non-empty then while starting up, the
# `startup_wait` timer becomes a maximum wait time: we start up as soon as the timer is reached *or*
# we have received notifier registrations for all the notifiers listed here. (Note that even when
# this is set other notifiers can still register, they just aren't required for startup to proceed).
#notifiers_expected = apns,firebase
# The most bytes of a message body that reach a device, for subscriptions that want data. A bigger
# message reaches a subscription that opted in to truncated bodies cut to this many bytes, with its
# full size, and any other as its size alone, flagged as too large. Must be positive; 2500 is the
# most the push services accept once the body is encrypted and encoded, and a larger value makes
# them reject the notifications of bigger messages, so is only for testing.
#body_limit = 2500
# How many of its swarm's nodes each account is subscribed on, at most the swarm's size: -1, the
# default, for all of them, or a positive number. Fewer means fewer subscriptions to make and
# renew, and fewer duplicate notifications from the swarm, at the cost of an account's
# notifications depending on fewer nodes' connections. The accounts go to the nodes holding the
# fewest.
#redundancy = -1
# The most notifications per account a storage server keeps while our monitor session with it is
# detached, and replays when it is resumed, after a reconnection or a quick restart: the newest of
# them, the rest being lost, as push notifications are best effort.
#resume_replay = 10
# For testing only: seconds between an account's renewals, within a tenth either side, instead of
# 45-55 minutes; it must stay well below the 65 minutes a storage server keeps a monitor.
#renewal_interval = 60
# The most monitor (subscription) requests in flight at once across all storage servers, and how
# many seconds one may go unanswered before it is retried; both must be positive. The defaults,
# shown here, suit production.
#monitor_requests = 64
#monitor_timeout = 600
# Seconds between the multi-line status reports in the log; at least 2.
#status_report_interval = 300
# A file to write each status report to as well, as Markdown, replacing the one before; by default
# none.
#status_report_file = /var/lib/spns/status-report.md
[keys]
# This section lists the files containing keys needed by the PN server.
# These two keys are X25519 keys used for internal hivemind communications and for decode onion
# requests. You can generate these X25519 keys using:
#
# ./make-x25519-key.py FILENAME
#
hivemind = key_x25519
onionreq = onionreq_x25519
# This key is required: the Ed25519 key used for our connections to storage servers, and for the
# QUIC listener, if QUIC listening is enabled via the [hivemind] quic_listen option. Its pubkey is
# what storage servers recognise as the privileged push server's: its monitor sessions get the large
# limits and their own pool of missed notifications, where an unrecognised key gets a small
# anonymous session. Its pubkey also serves as an Ed25519 onion request key, alongside `onionreq`:
# clients encrypt to its X25519 conversion, so that they can use the one Ed25519 pubkey for
# session-router, QUIC and onion requests. Each onion request is tried with `onionreq` first, if
# set, then with this. You can create it using `session-router-config --key FILENAME` (from the
# session-router-bin package).
quic = key_ed25519
[notify-firebase]
# Magic json token file google spits out from somewhere deep in the firebase admin control panel
#token_file = loki-a1a1a-firebase-adminsdk-blahblah-1234567890.json
# How many times we will attempt to re-send notification on failure
retries = 3
# Interval (seconds) between retry attempts
retry_interval = 10
# How frequently (in seconds) we send notification requests
notify_interval = 0.1
[notify-apns]
# Application identifier, aka "topic". Required when using apns.
identifier = com.loki-project.loki-messenger
# Filename containing the APNS client certificate. Required when using apns.
cert_file = apns-cert.pem
# How many times we will attempt to re-send notification on failure
retries = 2
# Interval (seconds) between retry attempts
retry_interval = 3
[notify-apns-sandbox]
# Application identifier, aka "topic". Required when using apns.
identifier = com.loki-project.loki-messenger
# Filename containing the APNS client certificate. Required when using apns.
cert_file = apns-sandbox-cert.pem
# How many times we will attempt to re-send notification on failure
retries = 0
# Interval (seconds) between retry attempts
retry_interval = 3