aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_stun.erl (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-02-11Update copyright year to 2022Badlop1-1/+1
2021-01-27Update newest copyright year to 2021 (#3464)Badlop1-1/+1
2021-01-22ejabberd_stun: Block loopback addresses by defaultHolger Weiss1-1/+1
Don't accept loopback addresses as TURN peers by default. This makes sure the TURN service won't allow remote clients to access local UDP services. However, this will break the case where the 'turn_ipv4_address' was set to 127.0.0.1 as fallback and TURN worked "by accident" if both clients were using the same TURN service. The service then talked to itself on the loopback interface.
2021-01-22Update 'stun' dependencyHolger Weiss1-1/+1
The 'stun' application now rejects Teredo and 6to4 TURN peers unconditionally. Therefore, remove those networks from the default 'turn_blacklist'.
2020-10-01ejabberd_stun: Rename Logger filterHolger Weiss1-2/+2
Don't overwrite the Logger filter added by the 'stun' application (which appends metadata to STUN/TURN log messages). Closes processone/stun#31.
2020-07-01ejabberd_stun: Filter info/debug messagesHolger Weiss1-0/+34
Update 'stun' dependency, and drop the info/debug messages now logged by the 'stun' application if OTP's new logging API is used.
2020-05-29Rename 'turn_v4_ip' and 'turn_v6_ip' optionsHolger Weiss1-12/+12
The 'turn_ipv4_address' and 'turn_ipv6_address' option names are probably more intuitive.
2020-05-21ejabberd_stun: Add 'turn_blacklist' optionHolger Weiss1-0/+3
The new 'turn_blacklist' listener option allows for specifying one or more IP addresses and/or subnet addresses/masks. The TURN server will refuse to relay traffic from/to blacklisted IP addresses. By default, Teredo and 6to4 addresses are blacklisted, as mandated by RFC 6156 (section 9.1).
2020-05-19mod_stun_disco: Offer local IPv6 servicesHolger Weiss1-1/+1
Also announce local STUN/TURN services listening on IPv6 sockets (unless the 'offer_local_services' option is set to 'false').
2020-05-19ejabberd_stun: Support IPv6 for TURNHolger Weiss1-6/+9
The stun application now supports RFC 6156: TURN Extension for IPv6, and therefore needs separate IPv4 and IPv6 relay addresses.
2020-05-19Let ejabberd_stun listen on IPv6 socketsHolger Weiss1-1/+1
The stun application now allows IPv6 clients to perform STUN requests and to allocate TURN relays.
2020-04-28ejabberd_stun: Tone down 'auth_realm' warningHolger Weiss1-7/+7
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-23ejabberd_stun: Fix 'turn_ip' fallbackHolger Weiss1-13/+20
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-22ejabberd_stun: Handle hashed passwords gracefullyHolger Weiss1-1/+8
Don't crash when STUN/TURN authentication is performed against a SCRAM-hashed password.
2020-04-22ejabberd_stun: Add 'stun_get_password' hookHolger Weiss1-2/+11
Add a hook that allows modules to offer a password for STUN/TURN authentication.
2020-04-20ejabberd_stun: Set a default 'turn_ip'Holger Weiss1-6/+8
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-01-28Update copyright to 2020 (#3149)Badlop1-1/+1
2019-09-23Correctly handle unicode in log messagesEvgeny Khramtsov1-2/+2
2019-06-14Use new configuration validatorEvgeny Khramtsov1-31/+20
2019-04-01Rename listening callback from start/2 to start/3Evgeny Khramtsov1-9/+9
This will prevent conflicts in callback names in mod_mqtt Old callback function is still supported.
2019-01-08Update copyright to 2019 (#2756)Badlop1-1/+1
2018-09-29Add forgotten TURN options to validatorEvgeny Khramtsov1-0/+2
Fixes #2621
2018-09-18Fail early when loading unavailable SIP or STUN modulesEvgeny Khramtsov1-10/+9
2018-09-18Refactor ejabberd_listenerEvgeny Khramtsov1-26/+19
2018-09-17Refactor ejabberd listener APIEvgeny Khramtsov1-7/+13
2018-07-05Move shaper to p1_utils repoEvgeniy Khramtsov1-1/+1
2018-06-14Get rid of ejabberd.hrl headerEvgeniy Khramtsov1-5/+4
The header consisted of too many unrelated stuff and macros misuse. Some stuff is moved into scram.hrl and type_compat.hrl. All macros have been replaced with the corresponding function calls. TODO: probably type_compat.hrl is not even needed anymore since we support only Erlang >= OTP 17.5
2018-04-30Add validator for 'accept_interval' listening optionEvgeniy Khramtsov1-1/+3
2018-02-28Validate additional listen optsStu Tomlinson1-1/+3
The options "inet", "inet6" and "backlog" are valid listen options, but are currently logged as errors (even though they do work): 2018-02-28 16:08:44.141 [error] <0.338.0>@ejabberd_listener:validate_module_option:630 unknown listen option 'backlog' for 'ejabberd_c2s' will be likely ignored, available options are: access, shaper, certfile, ciphers, dhfile, cafile, client_cafile, protocol_options, tls, tls_compression, starttls, starttls_required, tls_verify, zlib, max_fsm_queue This adds the necessary validators so they are correctly recognized.
2018-01-05Update copyright datesEvgeniy Khramtsov1-1/+1
2017-12-24Rely on Server Name Indication for incoming Direct-TLS connectionsEvgeniy Khramtsov1-3/+25
This commit also deprecates `certfile` option for ejabberd_http listener.
2017-11-10Cleanup some headersChristophe Romain1-1/+2
2017-05-23Introduce --enable-stun and --enable-sip configure optionsEvgeniy Khramtsov1-0/+16
STUN/TURN and SIP is not compiled by default anymore. Use --enable-stun, --enable-sip or --enable-all to enable them.
2017-05-12Introduce Certficate ManagerEvgeniy Khramtsov1-1/+4
The major goal is to simplify certificate management in ejabberd. Currently it requires some effort from a user to configure certficates, especially in the situation where a lot of virtual domains are hosted. The task is splitted in several sub-tasks: * Implement basic certificate validator. The validator should check all configured certificates for existence, validity, duration and so on. The validator should not perform any actions in the case of errors except logging an error message. This is actually implemented by this commit. * All certificates should be configured inside a single section (something like 'certfiles') where ejabberd should parse them, check the full-chain, find the corresponding private keys and, if needed, resort chains and split the certficates into separate files for easy to use by fast_tls. * Options like 'domain_certfile', 'c2s_certfile' or 's2s_certfile' should probably be deprecated, since the process of matching certificates with the corresponding virtual hosts should be done automatically and these options only introduce configuration errors without any meaningful purpose.
2017-05-12Check presence of some files during option validationEvgeniy Khramtsov1-1/+1
2017-05-08Don't call gen_mod:get_opt() outside of modulesEvgeniy Khramtsov1-3/+3
2017-04-30Don't validate an option in gen_mod:get*opt() functionsEvgeniy Khramtsov1-9/+44
The changes are very similar to those from previous commit: * Now there is no need to pass validating function in gen_mod:get_opt() and gen_mod:get_module_opt() functions, because the modules' configuration keeps already validated values. * New functions gen_mod:get_opt/2 and gen_mod:get_module_opt/3 are introduced. * Functions gen_mod:get_opt/4 and get_module_opt/5 are deprecated. If the functions are still called, the "function" argument is simply ignored. * Validating callback Mod:listen_opt_type/1 is introduced to validate listening options at startup.
2017-01-03Cleanup file headersChristophe Romain1-5/+4
2017-01-02Update copyright date automatically (#1442)Badlop1-1/+1
2016-02-03Move to new dependencies for SIP and STUNMickael Remond1-2/+2
2016-01-13Update copyright to 2016 (#901)Badlop1-1/+1
2015-06-22Document a few more supported protocolsBadlop1-0/+1
2015-06-03Remove unused validation codeEvgeniy Khramtsov1-10/+1
2015-06-01Add config validation at startupEvgeniy Khramtsov1-2/+11
2015-05-21Document protocol support (EJABS-1620)Badlop1-0/+2
2015-01-21Fix missing copyright dates to 2015 (EJAB-1733)Christophe Romain1-0/+17
2014-05-08TURN support (EJAB-1017)Evgeniy Khramtsov1-0/+83