diff options
author | George <57254463+zhoreeq@users.noreply.github.com> | 2020-11-13 17:59:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 23:59:05 +0100 |
commit | 765e00c949344b958d4681c91db8502d150f0353 (patch) | |
tree | cccc15af9d6a3190d611c3d913c494a3835f0632 | |
parent | 662359908b84d3a38010773ac70ca05478508fd5 (diff) | |
download | matterbridge-msglm-765e00c949344b958d4681c91db8502d150f0353.tar.gz matterbridge-msglm-765e00c949344b958d4681c91db8502d150f0353.tar.bz2 matterbridge-msglm-765e00c949344b958d4681c91db8502d150f0353.zip |
Add NoTLS option to allow plaintext XMPP connections (#1288)
Co-authored-by: George <zhoreeq@users.noreply.github.com>
-rw-r--r-- | bridge/config/config.go | 2 | ||||
-rw-r--r-- | bridge/xmpp/xmpp.go | 4 | ||||
-rw-r--r-- | matterbridge.toml.sample | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/bridge/config/config.go b/bridge/config/config.go index a1bce8dc..67a7dc13 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -117,7 +117,7 @@ type Protocol struct { NicksPerRow int // mattermost, slack NoHomeServerSuffix bool // matrix NoSendJoinPart bool // all protocols - NoTLS bool // mattermost + NoTLS bool // mattermost, xmpp Password string // IRC,mattermost,XMPP,matrix PrefixMessagesWithNick bool // mattemost, slack PreserveThreading bool // slack diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index ed99aac2..45c5beb0 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -138,14 +138,14 @@ func (b *Bxmpp) createXMPP() error { User: b.GetString("Jid"), Password: b.GetString("Password"), NoTLS: true, - StartTLS: true, + StartTLS: !b.GetBool("NoTLS"), TLSConfig: tc, Debug: b.GetBool("debug"), Session: true, Status: "", StatusMessage: "", Resource: "", - InsecureAllowUnencryptedAuth: false, + InsecureAllowUnencryptedAuth: b.GetBool("NoTLS"), } var err error b.xc, err = options.NewClient() diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample index 92e0e7c2..6b38580f 100644 --- a/matterbridge.toml.sample +++ b/matterbridge.toml.sample @@ -227,6 +227,10 @@ Nick="xmppbot" #OPTIONAL (default false) SkipTLSVerify=true +#Enable to use plaintext connection to your XMPP server. +#OPTIONAL (default false) +NoTLS=true + ## RELOADABLE SETTINGS ## Settings below can be reloaded by editing the file |