-
Notifications
You must be signed in to change notification settings - Fork 31
/
config.sample.yaml
192 lines (175 loc) · 6.88 KB
/
config.sample.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
bridge:
# Your homeserver server_name.
domain: "localhost"
# A internally reachable endpoint for the CS api of the homeserver.
homeserverUrl: "http://localhost:8008"
# Prefix of all users of the bridge.
userPrefix: "_bifrost_"
# Set this to the port you want the bridge to listen on.
appservicePort: 9555
# Config for the media proxy
# required to serve publically accessible URLs to authenticated Matrix media
mediaProxy:
# To generate a .jwk file:
# $ node src/generate-signing-key.js > signingkey.jwk
signingKeyPath: "signingkey.jwk"
# How long should the generated URLs be valid for
ttlSeconds: 3600
# The port for the media proxy to listen on
bindPort: 11111
# The publically accessible URL to the media proxy
publicUrl: "https://bifrost.bridge/media"
roomRules: []
# - room: "#badroom:example.com"
# action: "deny"
# - room: "!badroom:example.com"
# action: "deny"
datastore:
# The datastore engine to use, either "nedb" or "postgres"
engine: "postgres"
# For NeDB:
# Location of the user and room database files, by default will be stored in the working directory.
# For Postgres:
# A postgres style connection string.
connectionString: "postgres://postgres:pass@localhost/bifrost"
purple:
# For selecting a specific backend. One of "node-purple", "xmpp-js".
# -- For xmpp.js - You need an existing xmpp server for this to work.
backend: "xmpp-js"
backendOpts:
# endpoint to reach the component on. The default port is 5347
service: "xmpp://localhost:5347"
# domin assigned to the component.
domain: "matrix.localhost"
# password needed by the component.
password: "jam"
jingle:
# Automatically download files from Jingle file transfers. Unsafe for untrusted networks.
autodownload: false
# Default settings to set for new accounts, useful for node-purple. NOT used for xmpp.js
# defaultAccountSettings:
# # The protocol ID (e.g. prpl-sipe)
# prpl-plugin:
# # A set of strings -> values for a plugin's settings.
# # Consult the documentation for your protocol for options in here
# server: sip.unstable.technology:5061
# encryption-policy: obey-server
# backendOpts:
# # Should the backend output extra logging.
# debugEnabled: false
# # Where are the plugin libraries stored.
# pluginDir: "/usr/lib/purple-2"
# # Where should purple account data be stored.
# dataDir: "./purple-data"
# # Should only one plugin be enabled (to simplify userIds / commands).
# soloProtocol: "prpl-sipe"
# # Extra options for protocols.
# protocolOptions:
# # The protocol ID (e.g. prpl-sipe)
# prpl-plugin:
# # When the user passes in a username to "accounts add", it should use this format.
# # The format will replace % with the passed in username.
# usernameFormat: "%@my-domain"
# OR
# backend: "node-purple"
# backendOpts:
# # endpoint to reach the component on. The default port is 5347
# service: "xmpp://localhost:5347"
# # domin assigned to the component.
# domain: "matrix.localhost"
# # password needed by the component.
# password: "jam"
# Matrix forwards room aliases join requests matching a regex in the
# registration file to the owner's bridge, if the room doesn't exist.
# The following options allow you to configure how the purple bridge may
# match those aliases to remote rooms.
portals:
# Enable gateway support for protocols that support them, e.g. xmpp.js
enableGateway: false
# List of regexes to match a alias that can be turned into a bridge.
aliases:
# This matches #_bifrost_ followed by anything
"^_bifrost_(.+)$":
# Use the xmpp-js protocol.
protocol: "xmpp-js"
properties:
# Set room to the first regex match
room: "regex:1"
# Set the server to be conf.localhost
server: "conf.localhost"
# Automatically register users with accounts if they join/get invited
# a room with a protocol they are not bound to.
# This is REQUIRED for xmpp.js to work.
autoRegistration:
enabled: true
protocolSteps:
# For xmpp.js, please use:
xmpp-js:
type: "implicit"
parameters:
username: "<T_LOCALPART>_<T_DOMAIN>@matrix.localhost"
# Set up access controls for the bridge
# access:
# accountCreation:
# whitelist:
# - "^@.*:yourdomain$"
# Available subsitution variables for parameters:
# <T_MXID> - The users mxid.
# <T_MXID_SANE> - The users mxid, with an : replaced with _ and the @ discarded.
# <T_DOMAIN> - The users domain.
# <T_LOCALPART> - The users localpart.
# <T_DISPLAYNAME> - The users displayname, or localpart if not set.
# <T_GENERATEPWD> - Generates a 32 char password
# <T_AVATAR> - The MXC url of the users avatar, if available.
## This is how to autoregister folks with prosody (xmpp)
## with the included lua script in extras. This applies to node-purple (NOT xmpp.js)
# protocolSteps:
# prpl-jabber:
# type: "http"
# path: "http://localhost:5280/register_account/"
# opts:
# method: "post"
# usernameResult: null
# parameters:
# username: "m_<T_LOCALPART>"
# nick: "<T_DISPLAYNAME>"
# password: "<T_GENERATEPWD>"
# auth_token: "bridge-token"
# ip: "127.0.0.1"
# paramsToStore:
# - password
# Enable prometheus metrics reporting.
# This will report metrics on /metrics on the same port as the bridge.
metrics:
enabled: true
provisioning:
# Can users use ""!purple" in a room to bridge it to a group.
enablePlumbing: false
# Required power level to bridge a room into a group.
requiredUserPL: 100
logging:
# Set the logging level for stdout.
# Lower levels are inclusive of higher levels e.g. info will contain warn and error logging.
console: "info" # "debug", "info", "warn", "error", "off"
# A list of files and their associated logging levels.
files:
"./info.log": "info"
# "./error.log": "error"
# "./warn.log": "warn"
# "./debug.log": "debug"
# These are specific flags or values to tune the bridge to different setups.
# The defaults are usually fine, but adjust as needed.
tuning:
# Do not send a message or join a room before setting a users profile for
# the first time. This should help clients hide ugly mxids better behind
# displaynames.
waitOnProfileBeforeSend: true
# A nasty hack to check the domain for conf* to see if the PM is coming from a MUC.
# This is only really needed for legacy clients that don't implement xmlns.
# This is specific to the XMPP.js bridge.
# conferencePMFallbackCheck: false
# Don't send messages from the remote protocol until we have seen them join.
# A list of prefixes to check for a userId.
# This is useful for talking to remote IRC users who might not see a message
# until after they have joined.
# waitOnJoinBeforePM: string[];