aboutsummaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* net: isolate LuaSec-specificsJonas Schäfer2022-04-271-1/+53
| | | | | | | | | | | | | | For this, various accessor functions are now provided directly on the sockets, which reach down into the LuaSec implementation to obtain the information. While this may seem of little gain at first, it hides the implementation detail of the LuaSec+LuaSocket combination that the actual socket and the TLS layer are separate objects. The net gain here is that an alternative implementation does not have to emulate that specific implementation detail and "only" has to expose LuaSec-compatible data structures on the new functions.
* Merge 0.12->trunkMatthew Wild2022-04-251-2/+5
|\
| * util.argparse: Revise 553c6204fe5b with a different approachMatthew Wild2022-04-251-2/+5
| | | | | | | | | | | | The second return value is (not insensibly) assumed to be an error. Instead of returning a value there in the success case, copy the positional arguments into the existing opts table.
* | Merge 0.12->trunkMatthew Wild2022-04-251-2/+2
|\|
| * util.argparse: Return final 'arg' table with positional arguments for ↵Matthew Wild2022-04-251-2/+2
| | | | | | | | | | | | | | | | convenience This is the same as the input table (which is mutated during processing), but if that table was created on the fly, such as by packing `...` it's convenient if it also gets returned from the parse function.
* | Merge 0.12->trunkMatthew Wild2022-04-131-2/+2
|\|
| * util.prosodyctl: check turn: ensure a result is always returned from a check ↵Matthew Wild2022-04-131-2/+2
| | | | | | | | (thanks eTaurus)
* | Merge 0.12->trunkKim Alvefur2022-04-021-1/+1
|\|
| * util.random: Test whether util.crand works before using it (fix #1734)Kim Alvefur2022-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | util.crand can be configured at compile time to use the Linux getrandom() system call, available from Linux 3.17, but it is still possible to load it with an older kernel lacking that system call, where attempting to use it throws an ENOSYS error. By testing for this on load we can fall back to /dev/urandom in this case.
* | Merge 0.12->trunkMatthew Wild2022-03-281-0/+7
|\|
| * prosodyctl: check config: Report paths of loaded configuration files (fixed ↵Matthew Wild2022-03-281-0/+7
| | | | | | | | #1729)
* | Merge 0.12->trunkMatthew Wild2022-03-211-6/+13
|\|
| * util.startup: Show error for unrecognized arguments passed to 'prosody' ↵Matthew Wild2022-03-211-6/+13
| | | | | | | | (fixes #1722)
* | Merge 0.12->trunkMatthew Wild2022-03-191-0/+6
|\|
| * prosodyctl: check turn: Fail with error if our own address is supplied for ↵Matthew Wild2022-03-191-0/+6
| | | | | | | | the ping test
* | Merge 0.12->trunkMatthew Wild2022-03-192-6/+21
|\|
| * prosodyctl: check config: Skip bare JID components in orphan checkMatthew Wild2022-03-191-1/+1
| |
| * mod_admin_socket: Comment on LuaSocket UNIX compat codeKim Alvefur2022-03-161-0/+6
| | | | | | | | Ref #1717
| * mod_admin_socket: Compat for luasocket prior to unix datagram supportKim Alvefur2022-03-151-0/+3
| | | | | | | | | | | | | | | | | | | | The "socket.unix" module exported only a function before https://github.com/lunarmodules/luasocket/commit/aa1b8cc9bc35e56de15eeb153c899e4c51de82a8 when datagram support was added. Fixes #1717 Thanks rsc and lucas for reporting and testing
| * prosodyctl: check turn: warn about external port mismatches behind NATMatthew Wild2022-03-111-5/+11
| | | | | | | | | | | | | | Some NATs don't preserve port numbers, which can cause the TURN server's reported relay address to be incorrect (the TURN server has no way to predict what the external port is, so it can't be corrected in config like an IP mismatch can).
* | util.stanza: Create tables with correct size to avoid reallocationsKim Alvefur2022-03-181-2/+15
| | | | | | | | | | Potential performance gain since the tables don't need to be resized as they grow to the final size.
* | util.stanza: Use table.move in cloneKim Alvefur2022-03-181-9/+6
| | | | | | | | Code reduction, potentially a performance gain.
* | util.array: Take advantage of table.move()Matthew Wild2022-03-181-10/+6
| |
* | util.prosodyctl.shell: Support for receiving partial lines (no automatic \n)Matthew Wild2022-03-171-2/+6
| |
* | util.logger: Return sink_function from add_simple_sink()Matthew Wild2022-03-171-0/+1
| | | | | | | | This allows a simple sink to be later removed via remove_sink()
* | util.logger: Support for removing individual log sinks without a full resetMatthew Wild2022-03-171-0/+15
|/
* spelling: non-existing mistakes (thanks timeless)0.12.0Kim Alvefur2022-03-071-2/+2
|
* Spelling: Fix various spelling mistakes (thanks timeless)Kim Alvefur2022-03-076-8/+8
| | | | | | Words, sometimes I wonder how they even work Maybe I missed something.
* prosodyctl: check turn: compare correct addresses for relay mismatch ↵Matthew Wild2022-03-051-2/+5
| | | | detection (thanks Zash)
* prosodyctl: check turn: Add check for private IP returned from STUN.Matthew Wild2022-03-051-0/+4
|
* prosodyctl: check turn: improve warning text to suggest issuesMatthew Wild2022-03-051-1/+5
|
* prosodyctl: check turn: fix traceback when server does not provide realm/nonceMatthew Wild2022-03-051-4/+12
| | | | As coturn when installed out of the box on Debian (because auth isn't enabled?)
* prosodyctl: check turn: fix formatting of multiple warningsMatthew Wild2022-03-051-2/+3
|
* prosodyctl: check turn: always show debug info even if test failsMatthew Wild2022-03-051-11/+15
|
* prosodyctl: check turn: Clearer error when unable to resolve external ↵Matthew Wild2022-03-051-1/+1
| | | | service host
* prosodyctl: check: include TURN checks by defaultMatthew Wild2022-03-051-2/+2
|
* prosodyctl: check: Slightly improved argument handlingMatthew Wild2022-03-051-1/+11
|
* prosodyctl: check turn: show relayed address(es) in verbose modeMatthew Wild2022-03-051-0/+7
|
* prosodyctl: check turn: Allow specifying port for the ping serviceMatthew Wild2022-03-051-2/+9
|
* prosodyctl: check turn: Add support for testing data relay with an external ↵Matthew Wild2022-03-051-4/+88
| | | | STUN server via --ping
* util.bit53: Support for more than 2 arguments, for compat with bit32Matthew Wild2022-03-041-3/+27
|
* Merge config-updates+check-turn from timberMatthew Wild2022-03-047-7/+174
|\
| * util.bit53: Add left- and right shift operationsKim Alvefur2021-06-281-0/+2
| | | | | | | | | | While not used by anything in Prosody, it is known to be used by some 3rd party modules.
| * util.prosodyctl: check turn: New command to verify STUN/TURN service is ↵Matthew Wild2022-03-041-2/+163
| | | | | | | | operational
| * util.hex: Deprecate to/from in favour of encode/decode, for consistency!Matthew Wild2022-03-044-4/+8
| |
| * core.certmanager: Turn soft dependency on LuaSec into a hardKim Alvefur2022-02-101-1/+1
| | | | | | | | | | | | The default network backend server_epoll already requires LuaSec so Prosody won't even start without it, so we can get rid of these lines here too.
* | prosodyctl: check dns: Allow admin to specify undiscoverable external IPs in ↵Matthew Wild2022-03-021-0/+5
| | | | | | | | config
* | prosodyctl: check dns: List discovered addresses for diagnostic purposesMatthew Wild2022-03-021-0/+16
| | | | | | | | | | | | It is very common to get the "unknown address" warning with this command, but people do not always understand it, or know how to debug it. Now we clearly show the addresses that prosodyctl discovered.
* | util.prosodyctl: check: warn about unreferenced components, suggest disco_itemsMatthew Wild2022-03-021-0/+35
| |
* | util.prosodyctl: Warn about enabled public registration in 'check config'Matthew Wild2022-03-021-0/+28
| |