This commit is contained in:
Sorunome 2020-04-03 18:53:46 +02:00
commit 2863938e68
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
2 changed files with 180 additions and 0 deletions

52
README.md Normal file
View File

@ -0,0 +1,52 @@
[![Support room on Matrix](https://img.shields.io/matrix/mx-puppet-bridge:sorunome.de.svg?label=%23mx-puppet-bridge%3Asorunome.de&logo=matrix&server_fqdn=sorunome.de)](https://matrix.to/#/#mx-puppet-bridge:sorunome.de)[![donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/Sorunome/donate)
# mx-puppet-skype
This is a skype puppeting bridge for matrix. It is based on [mx-puppet-bridge](https://github.com/Sorunome/mx-puppet-bridge) and provide multi-user instances.
## Quick start using Docker
Docker image can be found at https://hub.docker.com/r/sorunome/mx-puppet-skype
For docker you probably want the following changes in `config.yaml`:
```yaml
bindAddress: '0.0.0.0'
filename: '/data/database.db'
file: '/data/bridge.log'
```
Also check the config for other values, like your homeserver domain.
## Install Instructions (from Source)
* Clone and install:
```
git clone https://github.com/Sorunome/mx-puppet-skype.git
cd mx-puppet-skype
npm install
* Edit the configuration file and generate the registration file:
```
cp sample.config.yaml config.yaml
# fill info about your homeserver and skype app credentials to config.yaml manually
npm run start -- -r # generate registration file
or
docker run -v </path/to/host>/data:/data -it sorunome/mx-puppet-skype -r
```
* Copy the registration file to your synapse config directory.
* Add the registration file to the list under `app_service_config_files:` in your synapse config.
* Restart synapse.
* Start the bridge:
```
npm run start
```
* Start a direct chat with the bot user (`@_skypepuppet_bot:domain.tld` unless you changed the config).
(Give it some time after the invite, it'll join after a minute maybe.)
* Get your Skype username and password as below, and tell the bot user to link your skype account:
```
link <username> <password>
```
* Tell the bot user to list the available rooms: (also see `help`)
```
list
```
Clicking rooms in the list will result in you receiving an invite to the bridged room.

128
sample.config.yaml Normal file
View File

@ -0,0 +1,128 @@
bridge:
# Address for the bridge to bind to; if running as a Docker container, you
# probably want 0.0.0.0 here
bindAddress: localhost
# Port to host the bridge on which your homeserver will connect to
port: 6000
# Name of your homeserver
domain: matrix.myhomeserver.com
# URL where the bridge can connect to your homeserver
homeserverUrl: http://localhost:8008
# Optionally specify a different media URL used for the media store
#mediaURL: https://external-url.org
# This enabled automatic double-puppeting:
# A map for shared secrets of the homeserver URL to the shared secret
# See https://github.com/devture/matrix-synapse-shared-secret-auth
#loginSharedSecretMap:
# yourserver.com: supersecretsharedsecret
# optionally override the display name of the bridge bot
#displayname: Protocol Bot
# optionally set the avatar of the bridge bot
#avatarUrl: mxc://yourserver.com/somefile
logging:
# Log level of console output
# Allowed values starting with most verbose:
# silly, debug, verbose, info, warn, error
console: info
# Optionally, you can apply filters to the console logging
#console:
# level: info
# enabled:
# - Store
# disabled:
# - PresenceHandler
# Date and time formatting
lineDateFormat: MMM-D HH:mm:ss.SSS
# Logging files
# Log files are rotated daily by default
files:
# Log file path
- file: "bridge.log"
# Log level for this file
# Allowed values starting with most verbose:
# silly, debug, verbose, info, warn, error
level: info
# Date and time formatting
datePattern: YYYY-MM-DD
# Maximum number of logs to keep.
# This can be a number of files or number of days.
# If using days, add 'd' as a suffix
maxFiles: 14d
# Maximum size of the file after which it will rotate. This can be a
# number of bytes, or units of kb, mb, and gb. If using the units, add
# 'k', 'm', or 'g' as the suffix
maxSize: 50m
# Optionally enable/disable logging for certain modules
#disabled:
# - PresenceHandler
# - module: bot-sdk-MatrixLiteClient
# regex: /_matrix/client/r0/presence/ # this regex needs to match to disable the log
#enabled:
# - Store
database:
# Use Postgres as a database backend
# If set, will be used instead of SQLite3
# Connection string to connect to the Postgres instance
# with username "user", password "pass", host "localhost" and database name "dbname".
# Modify each value as necessary
#connString: "postgres://user:pass@localhost/dbname?sslmode=disable"
# Use SQLite3 as a database backend
# The name of the database file
filename: database.db
provisioning:
# Regex of Matrix IDs allowed to use the puppet bridge
whitelist:
# Allow a specific user
#- "@user:server\\.com"
# Allow users on a specific homeserver
- "@.*:yourserver\\.com"
# Allow anyone
#- ".*"
# Regex of Matrix IDs forbidden from using the puppet bridge
#blacklist:
# Disallow a specific user
#- "@user:server\\.com"
# Disallow users on a specific homeserver
#- "@.*:yourserver\\.com"
presence:
# Bridge online/offline status
enabled: true
# How often to send status to the homeserver in milliseconds
interval: 500
# if the im.vector.user_status state setting should be diabled
#disableStatusState: false
# A blacklist of remote user IDs for the im.vector.user_status state setting
#statusStateBlacklist:
# - baduser
relay:
# Regex of Matrix IDs to allow to use the relay mode
# Same format as in provisioning
whitelist:
- "@.*:yourserver\\.com"
#blacklist:
#- "@user:yourserver\\.com"
# Map certain homeserver URLs to the C-S API endpoint
# Useful for double-puppeting if .well-known is unavailable for some reason
#homeserverUrlMap:
# yourserver.com: http://localhost:1234
namePatterns:
# Override the protocols set default name patterns
# Which variables are available depends on protocol implementation
user: :name
room: :name
limits:
# Up to how many users should be auto-joined on room creation? -1 to disable
# Defaults to 200
#maxAutojoinUsers: 200
# How long the delay between two autojoin users should be, in millisectonds.
# Defaults to 5000
#roomUserAutojoinDelay: 5000