Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

414 строки
24 KiB

  1. #jinja2: lstrip_blocks: True
  2. # Network-specific config options
  3. network:
  4. # Displayname template for Google Voice contacts.
  5. displayname_template: {{ matrix_bridge_mautrix_gvoice_network_displayname_template | to_json }}
  6. # Config options that affect the central bridge module.
  7. bridge:
  8. # The prefix for commands. Only required in non-management rooms.
  9. command_prefix: {{ matrix_bridge_mautrix_gvoice_command_prefix | to_json }}
  10. # Should the bridge create a space for each login containing the rooms that account is in?
  11. personal_filtering_spaces: {{ matrix_bridge_mautrix_gvoice_bridge_personal_filtering_spaces | to_json }}
  12. # Whether the bridge should set names and avatars explicitly for DM portals.
  13. # This is only necessary when using clients that don't support MSC4171.
  14. private_chat_portal_meta: false
  15. # Should events be handled asynchronously within portal rooms?
  16. # If true, events may end up being out of order, but slow events won't block other ones.
  17. async_events: false
  18. # Should every user have their own portals rather than sharing them?
  19. # By default, users who are in the same group on the remote network will be
  20. # in the same Matrix room bridged to that group. If this is set to true,
  21. # every user will get their own Matrix room instead.
  22. split_portals: false
  23. # Should the bridge resend `m.bridge` events to all portals on startup?
  24. resend_bridge_info: false
  25. # Should leaving Matrix rooms be bridged as leaving groups on the remote network?
  26. bridge_matrix_leave: false
  27. # Should room tags only be synced when creating the portal? Tags mean things like favorite/pin and archive/low priority.
  28. # Tags currently can't be synced back to the remote network, so a continuous sync means tagging from Matrix will be undone.
  29. tag_only_on_create: true
  30. # Should room mute status only be synced when creating the portal?
  31. # Like tags, mutes can't currently be synced back to the remote network.
  32. mute_only_on_create: true
  33. # What should be done to portal rooms when a user logs out or is logged out?
  34. # Permitted values:
  35. # nothing - Do nothing, let the user stay in the portals
  36. # kick - Remove the user from the portal rooms, but don't delete them
  37. # unbridge - Remove all ghosts in the room and disassociate it from the remote chat
  38. # delete - Remove all ghosts and users from the room (i.e. delete it)
  39. cleanup_on_logout:
  40. # Should cleanup on logout be enabled at all?
  41. enabled: false
  42. # Settings for manual logouts (explicitly initiated by the Matrix user)
  43. manual:
  44. # Action for private portals which will never be shared with other Matrix users.
  45. private: nothing
  46. # Action for portals with a relay user configured.
  47. relayed: nothing
  48. # Action for portals which may be shared, but don't currently have any other Matrix users.
  49. shared_no_users: nothing
  50. # Action for portals which have other logged-in Matrix users.
  51. shared_has_users: nothing
  52. # Settings for credentials being invalidated (initiated by the remote network, possibly through user action).
  53. # Keys have the same meanings as in the manual section.
  54. bad_credentials:
  55. private: nothing
  56. relayed: nothing
  57. shared_no_users: nothing
  58. shared_has_users: nothing
  59. # Settings for relay mode
  60. relay:
  61. # Whether relay mode should be allowed. If allowed, the set-relay command can be used to turn any
  62. # authenticated user into a relaybot for that chat.
  63. enabled: false
  64. # Should only admins be allowed to set themselves as relay users?
  65. # If true, non-admins can only set users listed in default_relays as relays in a room.
  66. admin_only: true
  67. # List of user login IDs which anyone can set as a relay, as long as the relay user is in the room.
  68. default_relays: []
  69. # The formats to use when sending messages via the relaybot.
  70. # Available variables:
  71. # .Sender.UserID - The Matrix user ID of the sender.
  72. # .Sender.Displayname - The display name of the sender (if set).
  73. # .Sender.RequiresDisambiguation - Whether the sender's name may be confused with the name of another user in the room.
  74. # .Sender.DisambiguatedName - The disambiguated name of the sender. This will be the displayname if set,
  75. # plus the user ID in parentheses if the displayname is not unique.
  76. # If the displayname is not set, this is just the user ID.
  77. # .Message - The `formatted_body` field of the message.
  78. # .Caption - The `formatted_body` field of the message, if it's a caption. Otherwise an empty string.
  79. # .FileName - The name of the file being sent.
  80. message_formats:
  81. m.text: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b>: {{ .Message }}{% endraw %}"
  82. m.notice: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b>: {{ .Message }}{% endraw %}"
  83. m.emote: "{% raw %}* <b>{{ .Sender.DisambiguatedName }}</b> {{ .Message }}{% endraw %}"
  84. m.file: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a file{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  85. m.image: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent an image{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  86. m.audio: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent an audio file{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  87. m.video: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a video{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  88. m.location: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a location{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  89. # For networks that support per-message displaynames (i.e. Slack and Discord), the template for those names.
  90. # This has all the Sender variables available under message_formats (but without the .Sender prefix).
  91. # Note that you need to manually remove the displayname from message_formats above.
  92. displayname_format: "{% raw %}{{ .DisambiguatedName }}{% endraw %}"
  93. # Permissions for using the bridge.
  94. # Permitted values:
  95. # relay - Talk through the relaybot (if enabled), no access otherwise
  96. # commands - Access to use commands in the bridge, but not login.
  97. # user - Access to use the bridge with puppeting.
  98. # admin - Full access, user level with some additional administration tools.
  99. # Permitted keys:
  100. # * - All Matrix users
  101. # domain - All users on that homeserver
  102. # mxid - Specific user
  103. permissions: {{ matrix_bridge_mautrix_gvoice_bridge_permissions|to_json }}
  104. # Config for the bridge's database.
  105. database:
  106. # The database type. "sqlite3-fk-wal" and "postgres" are supported.
  107. type: postgres
  108. # The database URI.
  109. # SQLite: A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended.
  110. # https://github.com/mattn/go-sqlite3#connection-string
  111. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  112. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  113. uri: {{ matrix_bridge_mautrix_gvoice_appservice_database_uri|to_json }}
  114. # Maximum number of connections.
  115. max_open_conns: 5
  116. max_idle_conns: 1
  117. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  118. # Parsed with https://pkg.go.dev/time#ParseDuration
  119. max_conn_idle_time: null
  120. max_conn_lifetime: null
  121. # Homeserver details.
  122. homeserver:
  123. # The address that this appservice can use to connect to the homeserver.
  124. # Local addresses without HTTPS are generally recommended when the bridge is running on the same machine,
  125. # but https also works if they run on different machines.
  126. address: {{ matrix_bridge_mautrix_gvoice_homeserver_address | to_json }}
  127. # The domain of the homeserver (also known as server_name, used for MXIDs, etc).
  128. domain: {{ matrix_bridge_mautrix_gvoice_homeserver_domain | to_json }}
  129. # What software is the homeserver running?
  130. # Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
  131. software: standard
  132. # The URL to push real-time bridge status to.
  133. # If set, the bridge will make POST requests to this URL whenever a user's remote network connection state changes.
  134. # The bridge will use the appservice as_token to authorize requests.
  135. status_endpoint:
  136. # Endpoint for reporting per-message status.
  137. # If set, the bridge will make POST requests to this URL when processing a message from Matrix.
  138. # It will make one request when receiving the message (step BRIDGE), one after decrypting if applicable
  139. # (step DECRYPTED) and one after sending to the remote network (step REMOTE). Errors will also be reported.
  140. # The bridge will use the appservice as_token to authorize requests.
  141. message_send_checkpoint_endpoint:
  142. # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
  143. async_media: {{ matrix_bridge_mautrix_gvoice_homeserver_async_media | to_json }}
  144. # Should the bridge use a websocket for connecting to the homeserver?
  145. # The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
  146. # mautrix-asmux (deprecated), and hungryserv (proprietary).
  147. websocket: false
  148. # How often should the websocket be pinged? Pinging will be disabled if this is zero.
  149. ping_interval_seconds: 0
  150. # Application service host/registration related details.
  151. # Changing these values requires regeneration of the registration (except when noted otherwise)
  152. appservice:
  153. # The address that the homeserver can use to connect to this appservice.
  154. address: {{ matrix_bridge_mautrix_gvoice_appservice_address }}
  155. # A public address that external services can use to reach this appservice.
  156. # This value doesn't affect the registration file.
  157. public_address: {{ matrix_bridge_mautrix_gvoice_bridge_public_address | to_json }}
  158. # The hostname and port where this appservice should listen.
  159. # For Docker, you generally have to change the hostname to 0.0.0.0.
  160. hostname: 0.0.0.0
  161. port: 8080
  162. # The unique ID of this appservice.
  163. id: gvoice
  164. # Appservice bot details.
  165. bot:
  166. # Username of the appservice bot.
  167. username: {{ matrix_bridge_mautrix_gvoice_appservice_bot_username|to_json }}
  168. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  169. # to leave display name/avatar as-is.
  170. displayname: Google Voice bridge bot
  171. avatar: mxc://maunium.net/VOPtYGBzHLRfPTEzGgNMpeKo
  172. # Whether to receive ephemeral events via appservice transactions.
  173. ephemeral_events: true
  174. # Should incoming events be handled asynchronously?
  175. # This may be necessary for large public instances with lots of messages going through.
  176. # However, messages will not be guaranteed to be bridged in the same order they were sent in.
  177. # This value doesn't affect the registration file.
  178. async_transactions: false
  179. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  180. as_token: {{ matrix_bridge_mautrix_gvoice_appservice_token | to_json }}
  181. hs_token: {{ matrix_bridge_mautrix_gvoice_homeserver_token | to_json }}
  182. # Localpart template of MXIDs for remote users.
  183. # {% raw %}{{.}}{% endraw %} is replaced with the internal ID of the user.
  184. username_template: {{ matrix_bridge_mautrix_gvoice_appservice_username_template | to_json }}
  185. # Config options that affect the Matrix connector of the bridge.
  186. matrix:
  187. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  188. message_status_events: false
  189. # Whether the bridge should send a read receipt after successfully bridging a message.
  190. delivery_receipts: false
  191. # Whether the bridge should send error notices via m.notice events when a message fails to bridge.
  192. message_error_notices: true
  193. # Whether the bridge should update the m.direct account data event when double puppeting is enabled.
  194. sync_direct_chat_list: false
  195. # Whether created rooms should have federation enabled. If false, created portal rooms
  196. # will never be federated. Changing this option requires recreating rooms.
  197. federate_rooms: {{ matrix_bridge_mautrix_gvoice_federate_rooms | to_json }}
  198. # The threshold as bytes after which the bridge should roundtrip uploads via the disk
  199. # rather than keeping the whole file in memory.
  200. upload_file_threshold: 5242880
  201. # Segment-compatible analytics endpoint for tracking some events, like provisioning API login and encryption errors.
  202. analytics:
  203. # API key to send with tracking requests. Tracking is disabled if this is null.
  204. token: null
  205. # Address to send tracking requests to.
  206. url: https://api.segment.io/v1/track
  207. # Optional user ID for tracking events. If null, defaults to using Matrix user ID.
  208. user_id: null
  209. # Settings for provisioning API
  210. provisioning:
  211. # Prefix for the provisioning API paths.
  212. prefix: /_matrix/provision
  213. # Shared secret for authentication. If set to "generate" or null, a random secret will be generated,
  214. # or if set to "disable", the provisioning API will be disabled.
  215. shared_secret: {{ matrix_bridge_mautrix_gvoice_provisioning_shared_secret | to_json }}
  216. # Whether to allow provisioning API requests to be authed using Matrix access tokens.
  217. # This follows the same rules as double puppeting to determine which server to contact to check the token,
  218. # which means that by default, it only works for users on the same server as the bridge.
  219. allow_matrix_auth: true
  220. # Enable debug API at /debug with provisioning authentication.
  221. debug_endpoints: false
  222. # Some networks require publicly accessible media download links (e.g. for user avatars when using Discord webhooks).
  223. # These settings control whether the bridge will provide such public media access.
  224. public_media:
  225. # Should public media be enabled at all?
  226. # The public_address field under the appservice section MUST be set when enabling public media.
  227. enabled: false
  228. # A key for signing public media URLs.
  229. # If set to "generate", a random key will be generated.
  230. signing_key: {{ matrix_bridge_mautrix_gvoice_public_media_signing_key | to_json }}
  231. # Number of seconds that public media URLs are valid for.
  232. # If set to 0, URLs will never expire.
  233. expiry: 0
  234. # Length of hash to use for public media URLs. Must be between 0 and 32.
  235. hash_length: 32
  236. # Settings for converting remote media to custom mxc:// URIs instead of reuploading.
  237. # More details can be found at https://docs.mau.fi/bridges/go/discord/direct-media.html
  238. direct_media:
  239. # Should custom mxc:// URIs be used instead of reuploading media?
  240. enabled: false
  241. # The server name to use for the custom mxc:// URIs.
  242. # This server name will effectively be a real Matrix server, it just won't implement anything other than media.
  243. # You must either set up .well-known delegation from this domain to the bridge, or proxy the domain directly to the bridge.
  244. server_name: media.example.com
  245. # Optionally a custom .well-known response. This defaults to `server_name:443`
  246. well_known_response:
  247. # Optionally specify a custom prefix for the media ID part of the MXC URI.
  248. media_id_prefix:
  249. # If the remote network supports media downloads over HTTP, then the bridge will use MSC3860/MSC3916
  250. # media download redirects if the requester supports it. Optionally, you can force redirects
  251. # and not allow proxying at all by setting this to false.
  252. # This option does nothing if the remote network does not support media downloads over HTTP.
  253. allow_proxy: true
  254. # Matrix server signing key to make the federation tester pass, same format as synapse's .signing.key file.
  255. # This key is also used to sign the mxc:// URIs to ensure only the bridge can generate them.
  256. server_key: ""
  257. # Settings for backfilling messages.
  258. # Note that the exact way settings are applied depends on the network connector.
  259. # See https://docs.mau.fi/bridges/general/backfill.html for more details.
  260. backfill:
  261. # Whether to do backfilling at all.
  262. enabled: {{ matrix_bridge_mautrix_gvoice_backfill_enabled | to_json }}
  263. # Maximum number of messages to backfill in empty rooms.
  264. max_initial_messages: {{ matrix_bridge_mautrix_gvoice_backfill_max_initial_messages | to_json }}
  265. # Maximum number of missed messages to backfill after bridge restarts.
  266. max_catchup_messages: {{ matrix_bridge_mautrix_gvoice_backfill_max_catchup_messages | to_json }}
  267. # If a backfilled chat is older than this number of hours,
  268. # mark it as read even if it's unread on the remote network.
  269. unread_hours_threshold: {{ matrix_bridge_mautrix_gvoice_backfill_unread_hours_threshold | to_json }}
  270. # Settings for backfilling threads within other backfills.
  271. threads:
  272. # Maximum number of messages to backfill in a new thread.
  273. max_initial_messages: {{ matrix_bridge_mautrix_gvoice_backfill_threads_max_initial_messages | to_json }}
  274. # Settings for the backwards backfill queue. This only applies when connecting to
  275. # Beeper as standard Matrix servers don't support inserting messages into history.
  276. queue:
  277. # Should the backfill queue be enabled?
  278. enabled: false
  279. # Number of messages to backfill in one batch.
  280. batch_size: 100
  281. # Delay between batches in seconds.
  282. batch_delay: 20
  283. # Maximum number of batches to backfill per portal.
  284. # If set to -1, all available messages will be backfilled.
  285. max_batches: -1
  286. # Optional network-specific overrides for max batches.
  287. # Interpretation of this field depends on the network connector.
  288. max_batches_override: {}
  289. # Settings for enabling double puppeting
  290. double_puppet:
  291. # Servers to always allow double puppeting from.
  292. # This is only for other servers and should NOT contain the server the bridge is on.
  293. servers: {}
  294. # Whether to allow client API URL discovery for other servers. When using this option,
  295. # users on other servers can use double puppeting even if their server URLs aren't
  296. # explicitly added to the servers map above.
  297. allow_discovery: false
  298. # Shared secrets for automatic double puppeting.
  299. # See https://docs.mau.fi/bridges/general/double-puppeting.html for instructions.
  300. secrets: {{ matrix_bridge_mautrix_gvoice_double_puppet_secrets | to_json }}
  301. # End-to-bridge encryption support options.
  302. #
  303. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  304. encryption:
  305. # Whether to enable encryption at all. If false, the bridge will not function in encrypted rooms.
  306. allow: {{ matrix_bridge_mautrix_gvoice_bridge_encryption_allow | to_json }}
  307. # Whether to force-enable encryption in all bridged rooms.
  308. default: {{ matrix_bridge_mautrix_gvoice_bridge_encryption_default | to_json }}
  309. # Whether to require all messages to be encrypted and drop any unencrypted messages.
  310. require: {{ matrix_bridge_mautrix_gvoice_bridge_encryption_require | to_json }}
  311. # Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
  312. # This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
  313. appservice: {{ matrix_bridge_mautrix_gvoice_bridge_encryption_appservice | to_json }}
  314. # Whether to use MSC4190 instead of appservice login to create the bridge bot device.
  315. # Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
  316. # Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
  317. # Changing this option requires updating the appservice registration file.
  318. msc4190: {{ matrix_bridge_mautrix_gvoice_msc4190_enabled | to_json }}
  319. # Whether to enable self-signing for bridges (Only the bridge bot uses this for now)
  320. # Requires msc4190 to replace keys on reset
  321. self_sign: {{ matrix_bridge_mautrix_gvoice_self_sign_enabled | to_json }}
  322. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  323. # You must use a client that supports requesting keys from other users to use this feature.
  324. allow_key_sharing: {{ matrix_bridge_mautrix_gvoice_bridge_encryption_key_sharing_allow | to_json }}
  325. # Pickle key for encrypting encryption keys in the bridge database.
  326. # If set to generate, a random key will be generated.
  327. pickle_key: {{ matrix_bridge_mautrix_gvoice_bridge_encryption_pickle_key | to_json }}
  328. # Options for deleting megolm sessions from the bridge.
  329. delete_keys:
  330. # Beeper-specific: delete outbound sessions when hungryserv confirms
  331. # that the user has uploaded the key to key backup.
  332. delete_outbound_on_ack: false
  333. # Don't store outbound sessions in the inbound table.
  334. dont_store_outbound: false
  335. # Ratchet megolm sessions forward after decrypting messages.
  336. ratchet_on_decrypt: false
  337. # Delete fully used keys (index >= max_messages) after decrypting messages.
  338. delete_fully_used_on_decrypt: false
  339. # Delete previous megolm sessions from same device when receiving a new one.
  340. delete_prev_on_new_session: false
  341. # Delete megolm sessions received from a device when the device is deleted.
  342. delete_on_device_delete: false
  343. # Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
  344. periodically_delete_expired: false
  345. # Delete inbound megolm sessions that don't have the received_at field used for
  346. # automatic ratcheting and expired session deletion. This is meant as a migration
  347. # to delete old keys prior to the bridge update.
  348. delete_outdated_inbound: false
  349. # What level of device verification should be required from users?
  350. #
  351. # Valid levels:
  352. # unverified - Send keys to all device in the room.
  353. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  354. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  355. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  356. # Note that creating user signatures from the bridge bot is not currently possible.
  357. # verified - Require manual per-device verification
  358. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  359. verification_levels:
  360. # Minimum level for which the bridge should send keys to when bridging messages from the remote network to Matrix.
  361. receive: unverified
  362. # Minimum level that the bridge should accept for incoming Matrix messages.
  363. send: unverified
  364. # Minimum level that the bridge should require for accepting key requests.
  365. share: cross-signed-tofu
  366. # Options for Megolm room key rotation. These options allow you to configure the m.room.encryption event content.
  367. # See https://spec.matrix.org/v1.10/client-server-api/#mroomencryption for more information about that event.
  368. rotation:
  369. # Enable custom Megolm room key rotation settings. Note that these
  370. # settings will only apply to rooms created after this option is set.
  371. enable_custom: false
  372. # The maximum number of milliseconds a session should be used
  373. # before changing it. The Matrix spec recommends 604800000 (a week)
  374. # as the default.
  375. milliseconds: 604800000
  376. # The maximum number of messages that should be sent with a given a
  377. # session before changing it. The Matrix spec recommends 100 as the
  378. # default.
  379. messages: 100
  380. # Disable rotating keys when a user's devices change?
  381. # You should not enable this option unless you understand all the implications.
  382. disable_device_change_key_rotation: false
  383. # Logging config. See https://github.com/tulir/zeroconfig for details.
  384. logging:
  385. min_level: {{ matrix_bridge_mautrix_gvoice_logging_level }}
  386. writers:
  387. - type: stdout
  388. format: pretty