aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
Commit message (Collapse)AuthorAgeFilesLines
* mod_admin_telnet: Use tostring as fallback in pretty printingKim Alvefur2020-05-021-0/+4
| | | | | This has some nice effects such as functions, VirtualHosts and other things being printed using their `__tostring` metamethod.
* mod_admin_telnet: Don't pretty-print the normal console stuffKim Alvefur2020-05-021-7/+3
| | | | | | | | Typing e.g. `c2s` would dump out a bunch of stuff that would probably just confuse users. Now you only get pretty-printing when poking around in the internals with `>`.
* mod_admin_telnet: Reuse existing pretty printing setupKim Alvefur2020-05-021-1/+3
| | | | | Didn't do the configurable defaults thing here because I was going to do this, so that there's only one spot where it's done.
* mod_admin_telnet: Allow configuring pretty printing defaultsKim Alvefur2020-05-021-0/+9
| | | | | | Mostly just to have the defaults merged so you can e.g. output:configure({maxdepth=1})
* mod_admin_telnet: Silence luacheckKim Alvefur2020-04-291-1/+2
|
* mod_admin_telnet: Add a command to configure pretty-printing settingsKim Alvefur2020-04-291-0/+5
| | | | Sometimes you wanna adjust the maxdepth or something.
* mod_admin_telnet: Add a TODO for someone to find in the futureKim Alvefur2020-04-291-0/+1
|
* mod_admin_telnet: Document HTTP command in internal helpKim Alvefur2020-04-291-0/+3
|
* mod_admin_telnet: Document (in the internal help) debug commandsKim Alvefur2020-04-291-0/+5
|
* mod_admin_telnet: Pretty-print values returned from commandsKim Alvefur2020-04-291-4/+13
| | | | | | | | | | | | | | | This makes it much nicer to inspect Prosody internals. Existing textual status messages from commands are not serialized to preserve existing behavior. Explicit serialization of configuration is kept in order to make it clear that returned strings are serialized strings that would look like what's actually in the config file. The default maxdepth of 2 seems ought to be an okay default, balanced between showing enough structure to continue exploring and DoS-ing your terminal. Thanks to Ge0rG for the motivation to finally do this.
* Merge 0.11->trunkKim Alvefur2020-03-221-5/+8
|\
| * mod_admin_telnet: Handle unavailable cipher info (fixes #1510)Kim Alvefur2020-03-221-5/+8
| | | | | | | | | | | | | | | | The LuaSec :info() method gathers info using the OpenSSL function SSL_get_current_cipher(). Documentation for this function states that it may return NULL if no session has been established (yet). If so, the LuaSec functions wrapping this return nil, triggering a nil-indexing error in mod_admin_telnet.
* | mod_admin_telnet: Allow passing list of hosts to http:list()Kim Alvefur2020-02-241-2/+2
| | | | | | | | | | Lets you select what hosts to list http services on. In particular, this enables listing global http services, which was not possible before.
* | mod_admin_telnet: Fix host selection filter, fixes loading on componentsKim Alvefur2020-02-221-3/+17
| | | | | | | | | | | | | | get_hosts_with_module(a component, mod) would still filter out components since they don't have type="component" instead of "local" Introduced in 4d3549e64489
* | mod_admin_telnet: Reflow hosts filter for readabilityKim Alvefur2020-02-221-1/+6
| |
* | mod_admin_telnet: Avoid indexing missing socket (thanks tmolitor)Kim Alvefur2020-02-051-12/+12
| | | | | | | | if `sock` was nil it would still proceed with SNI and ALPN checks
* | mod_admin_telnet: Use promise based DNS resolvingKim Alvefur2020-01-241-7/+5
| | | | | | | | Mostly done for testing this new API
* | Merge 0.11->trunkKim Alvefur2020-01-241-6/+19
|\|
| * mod_admin_telnet: Create a DNS resolver per console session (fixes #1492)Kim Alvefur2020-01-241-6/+19
| | | | | | | | This is now the common pattern, eg see mod_s2s.
* | mod_admin_telnet: Silence luacheck warningsKim Alvefur2019-12-231-2/+4
| |
* | mod_admin_telnet: Include config:get() in help textKim Alvefur2019-12-221-0/+1
| |
* | mod_admin_telnet: Use common sort function in s2s:showKim Alvefur2019-12-151-2/+2
| |
* | mod_admin_telnet: Use existing host comparison when comparing JIDsKim Alvefur2019-12-151-1/+1
| |
* | mod_admin_telnet: Sort hosts in module:listKim Alvefur2019-12-151-10/+1
| |
* | mod_admin_telnet: Refactor internal function for listing hostsKim Alvefur2019-12-151-10/+16
| | | | | | | | Splits out a function that doesn't deal with modules for reuse elsewhere
* | mod_admin_telnet: Merge hostname comparison functionsKim Alvefur2019-12-151-6/+2
| | | | | | | | Missed that there existed one already when writing the one for host:list
* | mod_admin_telnet: Sort by complete labelsKim Alvefur2019-12-151-1/+1
| | | | | | | | Might as well.
* | mod_admin_telnet: Fix host sortingKim Alvefur2019-12-151-1/+1
| | | | | | | | Reversing each %P is a noop
* | mod_admin_telnet: Avoid using LuaSocket for timestampsKim Alvefur2019-12-081-2/+1
| | | | | | | | | | Using util.time will make it easier to move away from LuaSocket if we ever wanted to do that.
* | mod_admin_telnet: Sort hostsKim Alvefur2019-11-301-1/+5
| | | | | | | | | | | | Groups by domain in DNS hierarchy order or something. Why not split on '.' you ask? Well becasue that's not what I typed here. Also "[^.]" is longer than "%P".
* | mod_admin_telnet: Display ALPN in show_tls() if supported and availableKim Alvefur2019-11-211-0/+6
| |
* | mod_admin_telnet: Show SNI name in show_tls() if availableKim Alvefur2019-11-201-0/+6
| |
* | mod_admin_telnet: Show s2s authentication method (probably) usedKim Alvefur2019-11-021-0/+6
| |
* | mod_admin_telnet: xmpp:ping: Log ping timeKim Alvefur2019-10-061-1/+3
| |
* | mod_admin_telnet: Use new compact function for waiting on promisesKim Alvefur2019-09-291-7/+1
| |
* | mod_admin_telnet: Identify native bidi sessionsKim Alvefur2019-09-081-1/+3
| |
* | mod_admin_telnet: Identify bidi-capable s2sout sessions (fixes #1403)Kim Alvefur2019-09-071-1/+1
| |
* | mod_admin_telnet: Use already generated session idKim Alvefur2019-07-281-1/+1
| | | | | | | | Don't need to construct it from components again
* | mod_admin_telnet: Allow specifying a reason when closing sessions (#1400)Kim Alvefur2019-07-281-8/+17
| |
* | mod_admin_telnet: Add xmpp:ping to helpKim Alvefur2019-07-261-0/+3
| |
* | mod_admin_telnet: Add c2s:count() to helpKim Alvefur2019-07-261-0/+1
| |
* | mod_admin_telnet: Make c2s:count() consistent with c2s:show()Kim Alvefur2019-07-261-3/+2
| | | | | | | | Both now operate on the same complete set of c2s sessions
* | mod_admin_telnet: Factor out function for collecting all c2s sessions for ↵Kim Alvefur2019-07-261-2/+6
| | | | | | | | easier reuse
* | mod_admin_telnet: Include both c2s connections and sessions in c2s:show()Kim Alvefur2019-07-261-1/+3
| | | | | | | | This way both incomplete connections and hibernating c2s sessions are shown.
* | mod_admin_telnet: Move error handling to thread callback (fixes #1391)Kim Alvefur2019-05-101-7/+4
| | | | | | | | Avoids yielding over pcall boundry, fixes xmpp:ping() command on Lua 5.1
* | mod_admin_telnet: Check for simple commands before executing in sandboxKim Alvefur2019-05-101-5/+5
| | | | | | | | | | | | This makes fixing yield over pcall boundry issue easier since it would have jumped to the thread error handler instead of proceeding to checking for simple commands.
* | mod_admin_telnet: Collect array from Bosh connections when appending to ↵Michel Le Bihan2019-06-031-1/+1
| | | | | | | | | | | | connection list Fixes #1356
* | mod_admin_telnet: include BOSH connections in c2s:count (#998)Arc Riley2019-05-021-1/+3
| |
* | mod_admin_telnet: added "(bosh)" and "(websocket)" connection flags (#998)Arc Riley2019-05-021-0/+6
| |
* | mod_admin_telnet: include BOSH connections in c2s session commands (#998)Arc Riley2019-05-021-0/+1
| |