Commit Graph

60 Commits (667c061a84cf58328c3f354077fea14ddf20c9c2)

Author SHA1 Message Date
Martin Dosch 62a185806d Use `net.JoinHostPort` for joining host and port. 3 years ago
Martin Dosch c10213493b Change default resource
Use "go-sendxmpp" plus a random string
(e.g. "go-sendxmpp.aafeec4c-3136ee04-06ab90a)
instead of only "go-sendxmpp" to prevent conflicts
if two instances run at the same time without
having a custom resource configured.
3 years ago
Martin Dosch d36c836276 Add `resource` config option. 3 years ago
Martin Dosch 23cf25caa6 Split on first @ instead of the last to get the domain (thx Sam) 4 years ago
Martin Dosch ec185d75d7 Update copyright year 4 years ago
Martin Dosch b74e921c13 Merge branch 'srvlookup' 4 years ago
Martin Dosch d68a7071b7 Update default config location in . 4 years ago
Martin Dosch 702ce9ff47 Look up SRV records for xmpp- and xmpps-client 4 years ago
Martin Dosch afcbe65bc1 Fix leaving MUCs before closing the connection. 4 years ago
Martin Dosch 4d633ef677 Allow joining multiple MUCs before sending raw xml messages. 4 years ago
Martin Dosch 57bff89256 Add option '--raw'. 4 years ago
Martin Dosch 6984f634e7 Always use StartTLS. 4 years ago
Martin Dosch e4e33cdf75 Fix issue with SRV lookup for xmpps-client. 4 years ago
Martin Dosch 9c7dc43658 Add SRV lookup for xmpps DNS records. 4 years ago
Martin Dosch c4f813d056 Clarify that the `-t` flag is *direct* TLS. 4 years ago
Martin Dosch aba6bb2099 Don't require the `--jserver` command line flag.
Just assume the JIDs domain part to be the server.
The mattn/go-xmpp lib will find the appropriate server
to connect to by resolving the xmpp-client SRV record.
4 years ago
Martin Dosch 953a52560d Update allowed config file permissions. 4 years ago
Martin Dosch 8a93c57f47 Add support for password managers.
Most of this is taken from xmpp-daemon [1] (thanks).

[1] https://git.dagestad.fr/~nicolai/xmpp-daemon/tree/main/README.md
4 years ago
Martin Dosch e5c1f4f51a Add support for password managers. 4 years ago
Tyler 7696a9eb09 Allow 640 permissions
Fixes #1
4 years ago
Martin Dosch ce11b65376 Allow localpart as username
If username is not a JID assume it is the local part and append an @
and the server domain.
4 years ago
Martin Dosch dd4b2a91d1 Look at ~/.config/go-sendxmpp/sendxmpprc for the config.
Also look up the config at ~/.config/go-sendxmpp/sendxmpprc
and prefer it over the legacy path used by perl sendxmpp
(~/.sendxmpprc).
4 years ago
Martin Dosch ad499e4bc0 Use the library for sending oob message
instead of handcrafting the message
Why I didn't see this option in the first place?
5 years ago
Martin Dosch 828ba165e9 Move handrafting OOB messages in own function. 5 years ago
Martin Dosch bb150b6954 Use string variables for handcrafted messages. 5 years ago
Martin Dosch 11883b8961 Don't allow usage of http upload and sending a message at the same time. 5 years ago
Martin Dosch db2ccee50e Send http-upload in OOB message 5 years ago
Martin Dosch 2622081bad Use tlsConfig.ServerName as server for calling httpUpload
The server we connect to might be xmpp.example.org while we have to
disco example.org for user@example.org
5 years ago
Martin Dosch 9fd205f90f Add experimental http-upload 5 years ago
Martin Dosch e674de5df1 Fix typos 5 years ago
Martin Dosch 21ed1c5ff6 User username instead of server to determine ServerName for TLS
certificate check.
5 years ago
Martin Dosch f06dff7321 Add `--no-tls-verify` command line flag. 5 years ago
Martin Dosch a81835b3d9 Change from MIT to BSD 2-Clause license. 5 years ago
Martin Dosch 55914460bd Revert "Remove MarshalJID function."
This reverts commit a631fa057b.
5 years ago
Martin Dosch a631fa057b Remove MarshalJID function. 5 years ago
Martin Dosch c36bd5cb40 Declare tlsConfig properly instead of using xmpp.DefaultConfig. 5 years ago
Martin Dosch ee7bf1fb71 Instantly quit if it's not possible to read the config file. 5 years ago
Martin Dosch bf4ec88e00 Update copyright notice. 5 years ago
Martin Dosch 0d55af6c0a Always try to close XMPP connection before quitting. 5 years ago
Martin Dosch 6907535153 Add ALPN support
This should make go-sendxmpp work on servers using ALPN e.g. when
using sslh on port 443 to use a httpd and XMPP over TLS on the
same port.
5 years ago
Martin Dosch 2283a54a33 [golangci-lint] Fixed some comparisons to bool and an ineffective err generation 5 years ago
Martin Dosch 330e15f532 Moved jid package into the main package. 5 years ago
Martin Dosch ba73e67f88 Merge branch 'master' of https://salsa.debian.org/mdosch-guest/go-sendxmpp 6 years ago
Martin Dosch 359aa28d07 Removed check for file access rights on windows. 6 years ago
Martin Dosch efc88c94f6 Removed unnecessary deferring of closing file. 6 years ago
Martin Dosch f0ccc244b8 Moved manual account data override behind reading config. 6 years ago
Martin Dosch f4357fc51b Changed output for wrong file permissions to also mention 400 as valid access rights. 6 years ago
Martin Dosch f61c0edda0 Skipped reading of config file if all connection parameters are specified via command line arguments. 6 years ago
Martin Dosch c845972b1f Added waiting time before closing connection. 6 years ago
Martin Dosch 52f7f534fb [go-lint]: error strings should not be capitalized or end with punctuation or a newline 6 years ago