-
Notifications
You must be signed in to change notification settings - Fork 71
/
example-config.yaml
270 lines (252 loc) · 13.1 KB
/
example-config.yaml
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# Homeserver details.
homeserver:
# The address that this appservice can use to connect to the homeserver.
address: https://matrix.example.com
# The domain of the homeserver (also known as server_name, used for MXIDs, etc).
domain: example.com
# What software is the homeserver running?
# Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
software: standard
# The URL to push real-time bridge status to.
# If set, the bridge will make POST requests to this URL whenever a user's discord connection state changes.
# The bridge will use the appservice as_token to authorize requests.
status_endpoint: null
# Endpoint for reporting per-message status.
message_send_checkpoint_endpoint: null
# Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
async_media: false
# Should the bridge use a websocket for connecting to the homeserver?
# The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
# mautrix-asmux (deprecated), and hungryserv (proprietary).
websocket: false
# How often should the websocket be pinged? Pinging will be disabled if this is zero.
ping_interval_seconds: 0
# Application service host/registration related details.
# Changing these values requires regeneration of the registration.
appservice:
# The address that the homeserver can use to connect to this appservice.
address: http://localhost:29337
# The hostname and port where this appservice should listen.
hostname: 0.0.0.0
port: 29337
# Database config.
database:
# The database type. Only "sqlite3-fk-wal" is supported.
type: sqlite3-fk-wal
# SQLite database path. A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended.
uri: file:beeper-imessage.db?_txlock=immediate
# The unique ID of this appservice.
id: imessage
# Appservice bot details.
bot:
# Username of the appservice bot.
username: imessagebot
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
# to leave display name/avatar as-is.
displayname: iMessage bridge bot
avatar: mxc://maunium.net/tManJEpANASZvDVzvRvhILdX
# Whether or not to receive ephemeral events via appservice transactions.
# Requires MSC2409 support (i.e. Synapse 1.22+).
# You should disable bridge -> sync_with_custom_puppets when this is enabled.
ephemeral_events: true
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
as_token: "This value is generated when generating the registration"
hs_token: "This value is generated when generating the registration"
# Segment-compatible analytics endpoint for tracking some events, like provisioning API login and encryption errors.
analytics:
# Hostname of the tracking server. The path is hardcoded to /v1/track
host: api.segment.io
# API key to send with tracking requests. Tracking is disabled if this is null.
token: null
# User ID for tracking events.
user_id: null
imessage:
device_name: beeper-imessage
# Configuration for testing whether our login was successful
login_test:
# What iMessage handle URIs we should attempt to test against
identifiers: []
# Whether we should lookup the above identifier when we first login
lookup_test_on_login: false
# if this is set, this URL will be POSTed if the login test runs and fails and we'll attempt to re-register
reroute_on_login_test_fail_url: null
# Whether we should do an additional lookup at a later time, set to 0 to disable
lookup_test_after_login_seconds: 0
# Whether or not to enable sending using pair-ec.
enable_pair_ec_sending: false
# Rate limits for manual iMessage identity lookups
lookup_ratelimit:
# Allow 1 additional lookup every X time (parsed as a time.Duration)
every: 1m
# How many lookups to allow before limiting
burst: 32
# Bridge config
bridge:
# Localpart template of MXIDs for iMessage users.
# {{.}} is replaced with the phone number or email of the iMessage user.
username_template: imessage_{{.}}
# Displayname template for iMessage users.
# {{.}} is replaced with the contact list name (if available) or username (phone number or email) of the iMessage user.
displayname_template: "{{.}} (iMessage)"
# A URL to fetch validation data from. Use this option or the nac_plist option
nac_validation_data_url: http://example.com/validation_data
# Optional auth token to use when fetching validation data. If null, defaults to passing the as_token.
nac_validation_data_token:
nac_validation_is_relay: false
# Servers to always allow double puppeting from
double_puppet_server_map:
example.com: https://example.com
# Allow using double puppeting from any server with a valid client .well-known file.
double_puppet_allow_discovery: false
# Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
#
# If set, double puppeting will be enabled automatically for local users
# instead of users having to find an access token and run `login-matrix`
# manually.
login_shared_secret_map:
example.com: foobar
# Should the bridge create a space and add bridged rooms to it?
personal_filtering_spaces: false
# Whether or not the bridge should send a read receipt from the bridge bot when a message has been
# sent to iMessage.
delivery_receipts: false
# Whether or not the bridge should send the message status as a custom
# com.beeper.message_send_status event.
message_status_events: true
# Whether or not the bridge should send error notices via m.notice events
# when a message fails to bridge.
send_error_notices: true
# Enable notices about various things in the bridge management room?
enable_bridge_notices: true
# Enable less important notices (sent with m.notice) in the bridge management room?
unimportant_bridge_notices: true
# The maximum number of seconds between the message arriving at the
# homeserver and the bridge attempting to send the message. This can help
# prevent messages from being bridged a long time after arriving at the
# homeserver which could cause confusion in the chat history on the remote
# network. Set to 0 to disable.
max_handle_seconds: 0
# Should we convert heif images to jpeg before re-uploading? This increases
# compatibility, but adds generation loss (reduces quality).
convert_heif: true
# Should we convert tiff images to jpeg before re-uploading? This increases
# compatibility, but adds generation loss (reduces quality).
convert_tiff: true
# Modern Apple devices tend to use h265 encoding for video, which is a licensed standard and therefore not
# supported by most major browsers. If enabled, all video attachments will be converted according to the
# ffmpeg args.
convert_mov: true
# The prefix for commands.
command_prefix: "!im"
# Whether or not created rooms should have federation enabled.
# If false, created portal rooms will never be federated.
federate_rooms: true
# Whether to explicitly set the avatar and room name for private chat portal rooms.
# If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
# If set to `always`, all DM rooms will have explicit names and avatars set.
# If set to `never`, DM rooms will never have names and avatars set.
private_chat_portal_meta: default
# Should iMessage reply threads be mapped to Matrix threads? If false, iMessage reply threads will be bridged
# as replies to the previous message in the thread.
matrix_threads: true
# End-to-bridge encryption support options.
# See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html
encryption:
# Allow encryption, work in group chat rooms with e2ee enabled
allow: false
# Default to encryption, force-enable encryption in all portals the bridge creates
# This will cause the bridge bot to be in private chats for the encryption to work properly.
default: false
# Whether or not to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
appservice: false
# Require encryption, drop any unencrypted messages.
require: false
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: false
# Options for deleting megolm sessions from the bridge.
delete_keys:
# Beeper-specific: delete outbound sessions when hungryserv confirms
# that the user has uploaded the key to key backup.
delete_outbound_on_ack: false
# Don't store outbound sessions in the inbound table.
dont_store_outbound: false
# Ratchet megolm sessions forward after decrypting messages.
ratchet_on_decrypt: false
# Delete fully used keys (index >= max_messages) after decrypting messages.
delete_fully_used_on_decrypt: false
# Delete previous megolm sessions from same device when receiving a new one.
delete_prev_on_new_session: false
# Delete megolm sessions received from a device when the device is deleted.
delete_on_device_delete: false
# Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
periodically_delete_expired: false
# What level of device verification should be required from users?
#
# Valid levels:
# unverified - Send keys to all device in the room.
# cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
# cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
# cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
# Note that creating user signatures from the bridge bot is not currently possible.
# verified - Require manual per-device verification
# (currently only possible by modifying the `trust` column in the `crypto_device` database table).
verification_levels:
# Minimum level for which the bridge should send keys to when bridging messages from iMessage to Matrix.
receive: unverified
# Minimum level that the bridge should accept for incoming Matrix messages.
send: unverified
# Minimum level that the bridge should require for accepting key requests.
share: cross-signed-tofu
# Options for Megolm room key rotation. These options allow you to
# configure the m.room.encryption event content. See:
# https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
# more information about that event.
rotation:
# Enable custom Megolm room key rotation settings. Note that these
# settings will only apply to rooms created after this option is
# set.
enable_custom: false
# The maximum number of milliseconds a session should be used
# before changing it. The Matrix spec recommends 604800000 (a week)
# as the default.
milliseconds: 604800000
# The maximum number of messages that should be sent with a given a
# session before changing it. The Matrix spec recommends 100 as the
# default.
messages: 100
# Disable rotating keys when a user's devices change?
# You should not enable this option unless you understand all the implications.
disable_device_change_key_rotation: false
# Settings for provisioning API
provisioning:
# Prefix for the provisioning API paths.
prefix: /_matrix/provision
# Shared secret for authentication. If set to "generate", a random secret will be generated,
# or if set to "disable", the provisioning API will be disabled.
shared_secret: generate
# Enable debug API at /debug with provisioning authentication.
debug_endpoints: false
# Permissions for using the bridge.
# Permitted values:
# user - Access to use the bridge.
# admin - User level and some additional administration tools
# Permitted keys:
# * - All Matrix users
# domain - All users on that homeserver
# mxid - Specific user
permissions:
"example.com": user
"@admin:example.com": admin
# Logging config. See https://github.com/tulir/zeroconfig for details.
logging:
min_level: debug
writers:
- type: stdout
format: pretty-colored
- type: file
format: json
filename: ./logs/beeper-imessage.log
max_size: 100
max_backups: 10
compress: true