25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00
Commit Graph

8340 Commits

Author SHA1 Message Date
Holger Weiss
e4de03f3df mod_stun_disco: Try to resolve listener address
In some IPv6-only networks, hostnames that have no AAAA record are
resolved to an IPv6 address that's mapped to the host's IPv4 address.
This allows the IPv6-only clients to communicate with IPv4-only services
such as ejabberd's built-in STUN/TURN server.  If STUN/TURN clients try
to contact the IPv4 address directly rather than using the mapped IPv6
address, the connection will fail.

Therefore, try to resolve the IP address of local ejabberd_stun services
to the hostname and announce that hostname rather than the IP address if
(and only if) the hostname resolves back to the original IP address, and
not to any additional IPv4 or IPv6 address(es).

This can (and should) be reverted once IPv6 support is added to
ejabberd's built-in STUN/TURN server.
2020-04-30 22:40:01 +02:00
Jerome Sautret
724d09a510 Set ejabberd version to 20.04 2020-04-29 16:29:59 +02:00
Badlop
fba6a64648 Fix English typos in configure.ac 2020-04-29 12:07:35 +02:00
Jérôme Sautret
0539637d30
Merge pull request #3232 from weiss/enable-stun
Enable STUN/TURN support by default
2020-04-29 10:29:05 +02:00
Badlop
4a7d42647f Rewrite sentences in modules options examples, to not break Docs indentation 2020-04-28 21:31:35 +02:00
Paweł Chmielowski
b56663ef07 Update dependences in mix 2020-04-28 17:23:36 +02:00
Paweł Chmielowski
25597a4326 Run tests for mssql only if configured with --enable-mssql 2020-04-28 16:52:08 +02:00
Paweł Chmielowski
56c8f6b280 Update deps 2020-04-28 16:24:40 +02:00
ChaosKid42
abc3260e75
enable tests with mssql-backend (#3136) 2020-04-28 16:22:42 +02:00
Jérôme Sautret
24a11fc8e8
Merge pull request #3235 from weiss/xep-0215
Support STUN/TURN service discovery
2020-04-28 16:03:21 +02:00
Holger Weiss
6eb2f07274 ejabberd_stun: Tone down 'auth_realm' warning
These days, STUN/TURN authentication can be performed with ephemeral
credentials, where the REALM is irrelevant. Therefore, just log an
[info] message rather than a [warning] in the case where no
authentication REALM is configured but multiple virtual domains exist.
2020-04-28 10:34:43 +02:00
Holger Weiss
9cd47d7085 Add tests for mod_stun_disco 2020-04-28 10:34:43 +02:00
Holger Weiss
69d1d62add Support XEP-0215: External Service Discovery
Add the 'mod_stun_disco' module, which allows XMPP clients to discover
STUN/TURN services and to obtain temporary credentials for using them as
per XEP-0215: External Service Discovery.  The temporary credentials
handed out to clients have the format described in:

https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00

Also add the new module to the example configuration file.

Closes #2947.
2020-04-28 10:34:43 +02:00
Badlop
3db9459591 Don't offer X-OAUTH2 if the only auth method enabled is Anonymous (#3209) 2020-04-27 20:03:21 +02:00
Paweł Chmielowski
6320dfd34e Don't store caps information for direct presences of muc room
We really don't need those, and thanks to each individual room having
different hash (as one of hashed data is room description) we end with
lot of data that we really don't need.
2020-04-27 13:17:51 +02:00
Badlop
055fe744d3 Clean some unused functions in ejabberd_ctl, this makes "make hooks" happy 2020-04-24 20:36:24 +02:00
Christoph Scholz
d7c696f97c mix.exs: Update 'xmpp' and 'stun' 2020-04-23 20:05:40 +02:00
Holger Weiss
fc444ce503 rebar.config: Update 'xmpp' and 'stun'
Use the current versions of 'xmpp' (to get XEP-0215 support) and 'stun'
(to fix TURN issues).
2020-04-23 20:05:40 +02:00
Holger Weiss
88f392721b gen_mod: Reload modules after reloading listeners
Make sure modules won't be reloaded before listeners.  This is necessary
to allow the (not yet committed) 'mod_stun_disco' module to parse the
listener configuration after configuration reloads.
2020-04-23 20:05:40 +02:00
Holger Weiss
c55e7b8499 ejabberd_stun: Fix 'turn_ip' fallback
The 'turn_ip' option validator doesn't accept an inet:ip4_address()
tuple.

While at it, change the logic to only perform the fallback address
lookup if no 'turn_ip' is configured (analogous to the fallback
mechanism for the case where the 'auth_realm' is undefined).
2020-04-23 18:32:40 +02:00
ChaosKid42
1f7ca91670
use dsn-less config for mssql (#3131) 2020-04-23 13:56:41 +02:00
Licaon_Kter
d9131c854d
Bump jiffy so it compiles on older GCC (#3218)
* Update jiffy

* And here
2020-04-23 13:29:33 +02:00
Holger Weiss
09a87f5a0c ejabberd_stun: Handle hashed passwords gracefully
Don't crash when STUN/TURN authentication is performed against a
SCRAM-hashed password.
2020-04-22 00:16:03 +02:00
Holger Weiss
1db70edcf8 ejabberd_stun: Add 'stun_get_password' hook
Add a hook that allows modules to offer a password for STUN/TURN
authentication.
2020-04-22 00:09:42 +02:00
Badlop
1a3533e4a2 Fix some English typos 2020-04-21 20:58:01 +02:00
Badlop
3db9de26e9 Rephrase mod_admin_extra doc, a2x screwed the format when building Docs 2020-04-21 20:11:39 +02:00
Badlop
78f0439e78 Make a few more strings translatable in MUC and Shared Roster WebAdmin 2020-04-20 20:24:56 +02:00
Badlop
b124e911d3 Update some translated strings where only print chars had changed 2020-04-20 20:24:50 +02:00
Holger Weiss
c836dc66a8 ejabberd_stun: Set a default 'turn_ip'
Try to resolve the local hostname, use the result as the default
'turn_ip', and only log a warning if that fails.  Using the local
hostname's address by default is analogous to mod_proxy65's behavior.
2020-04-20 08:42:32 +02:00
Holger Weiss
b1b3c4cdcf Enable STUN/TURN by default
Build ejabberd with STUN/TURN support by default, and add a STUN/TURN
listener to the example configuration file.
2020-04-20 00:37:41 +02:00
Holger Weiss
b0f95975c2 Travis CI: Test against Erlang/OTP 22.3 2020-04-19 15:39:34 +02:00
Badlop
2e48c24638 Updated Spanish translation 2020-04-17 19:29:17 +02:00
Badlop
7359eb6246 Updated Catalan translation 2020-04-17 19:23:21 +02:00
Badlop
99d21bca49 Don't extract for translation strings from man pages, at least for now 2020-04-17 19:23:18 +02:00
Badlop
1b98084918 Fix previous commit 2020-04-17 19:23:13 +02:00
Badlop
d311eaf8f3 Log messages generated by msgmerge and display unexpected ones 2020-04-17 17:28:43 +02:00
Badlop
0355e15a42 Fix doc content in mod_admin_extra so it can be extracted by make translations 2020-04-17 17:28:39 +02:00
Badlop
101f7a6d63 Check if mod_muc_log is enabled before setting logging option (#3215) 2020-04-17 16:19:58 +02:00
Badlop
4aa85c538c When rescode is some unexpected, probably error message, print it 2020-04-17 16:19:55 +02:00
Paweł Chmielowski
22980ed8a5 Restart offline pop_messages when there is mismatch between select and delete
When another connection is inserting something to spool at this same time
as we do pop_messages, it's possible that insert will happen between we
fetch messages and delete them, so we effectively will delete it without
delivering it to client. This change catch this situation and restart
transaction, so we should always have consistent results.
2020-04-17 15:30:28 +02:00
Paweł Chmielowski
cb1c0a3188 Update mysql driver to get rid of warning 2020-04-16 18:26:13 +02:00
Badlop
0705695e02 Update documentation of mod_shared_roster (#3214) 2020-04-16 13:12:32 +02:00
Paweł Chmielowski
c11922e2a2 Make session iq response have from be set to server jid
It looks like old version of Smack don't accept request that are have
from sent to sender jid, but are only working when jid is set to server
address. This is also how it looks in old xmpp rfc examples.
2020-04-16 13:05:42 +02:00
Paweł Chmielowski
37226dd41f Resending unacked stanzas should send even archived msgs if mod_offline is enabled
Messages that are received when no c2s is active will be stored in offline,
even when mam archived them, so i don't think we should be doing something
different in this case.
2020-04-16 13:04:12 +02:00
Badlop
cd0b65f4d5 Fix unused variables from previous commit 2020-04-14 15:00:45 +02:00
Badlop
b7c088d4b0 Update links to the ejabberd Docs page in WebAdmin 2020-04-14 13:59:11 +02:00
Badlop
e197b25e82 Rename opts->name to label, to avoid confusion with the group name (#3214)
Also updated WebAdmin to show more meaningful explanations
Also fixed a bug that break support for group@host in Displayed
2020-04-14 13:58:53 +02:00
Jérôme Sautret
b02506eaaf
Merge pull request #3132 from area-42/publisher_mssql_text_to_varchar
change PubSub publisher from text to varchar for mssql
2020-04-10 16:20:43 +02:00
Badlop
8694517c34 Minor fixes in doc 2020-04-09 16:30:21 +02:00
Badlop
2febd1c220 Copy more option explanations from ejabberd Docs site 2020-04-08 18:49:41 +02:00