5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-26 02:01:36 +00:00

Add NoTLS option to allow plaintext XMPP connections (#1288)

Co-authored-by: George <zhoreeq@users.noreply.github.com>
This commit is contained in:
George 2020-11-13 17:59:05 -05:00 committed by GitHub
parent 662359908b
commit 765e00c949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -117,7 +117,7 @@ type Protocol struct {
NicksPerRow int // mattermost, slack NicksPerRow int // mattermost, slack
NoHomeServerSuffix bool // matrix NoHomeServerSuffix bool // matrix
NoSendJoinPart bool // all protocols NoSendJoinPart bool // all protocols
NoTLS bool // mattermost NoTLS bool // mattermost, xmpp
Password string // IRC,mattermost,XMPP,matrix Password string // IRC,mattermost,XMPP,matrix
PrefixMessagesWithNick bool // mattemost, slack PrefixMessagesWithNick bool // mattemost, slack
PreserveThreading bool // slack PreserveThreading bool // slack

View File

@ -138,14 +138,14 @@ func (b *Bxmpp) createXMPP() error {
User: b.GetString("Jid"), User: b.GetString("Jid"),
Password: b.GetString("Password"), Password: b.GetString("Password"),
NoTLS: true, NoTLS: true,
StartTLS: true, StartTLS: !b.GetBool("NoTLS"),
TLSConfig: tc, TLSConfig: tc,
Debug: b.GetBool("debug"), Debug: b.GetBool("debug"),
Session: true, Session: true,
Status: "", Status: "",
StatusMessage: "", StatusMessage: "",
Resource: "", Resource: "",
InsecureAllowUnencryptedAuth: false, InsecureAllowUnencryptedAuth: b.GetBool("NoTLS"),
} }
var err error var err error
b.xc, err = options.NewClient() b.xc, err = options.NewClient()

View File

@ -227,6 +227,10 @@ Nick="xmppbot"
#OPTIONAL (default false) #OPTIONAL (default false)
SkipTLSVerify=true SkipTLSVerify=true
#Enable to use plaintext connection to your XMPP server.
#OPTIONAL (default false)
NoTLS=true
## RELOADABLE SETTINGS ## RELOADABLE SETTINGS
## Settings below can be reloaded by editing the file ## Settings below can be reloaded by editing the file