Kim Alvefur
cb06b21406
mod_admin_telnet: Handle unavailable cipher info ( fixes #1510 )
...
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.
6 years ago
Kim Alvefur
a6080a215e
mod_admin_telnet: Create a DNS resolver per console session ( fixes #1492 )
...
This is now the common pattern, eg see mod_s2s.
6 years ago
Kim Alvefur
9e95f5e9f6
mod_admin_telnet: Handle unavailable cipher info ( fixes #1510 )
...
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.
6 years ago
Kim Alvefur
34603f5da0
mod_admin_telnet: Create a DNS resolver per console session ( fixes #1492 )
...
This is now the common pattern, eg see mod_s2s.
6 years ago
Kim Alvefur
af11cae511
mod_admin_telnet: Handle unavailable cipher info ( fixes #1510 )
...
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.
6 years ago
Kim Alvefur
c17d65758e
mod_admin_telnet: Create a DNS resolver per console session ( fixes #1492 )
...
This is now the common pattern, eg see mod_s2s.
6 years ago
Matthew Wild
cdeaa58821
mod_admin_shell, mod_admin_telnet, util.prosodyctl.shell: Separate output from final result
...
Fixes the client pausing for input after output from commands.
6 years ago
Matthew Wild
30d735e748
mod_admin_telnet: Become a front for mod_admin_shell
6 years ago
Kim Alvefur
9c0f2a5d5a
mod_admin_telnet: Update existing sessions on reload
...
This removes the need to disconnect and reconnect to the telnet console
for changes to take effect.
6 years ago
Kim Alvefur
9e60a1be7c
mod_admin_telnet: Use tostring as fallback in pretty printing
...
This has some nice effects such as functions, VirtualHosts and other
things being printed using their `__tostring` metamethod.
6 years ago
Kim Alvefur
4500aabbae
mod_admin_telnet: Don't pretty-print the normal console stuff
...
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 `>`.
6 years ago
Kim Alvefur
5d387ccb3a
mod_admin_telnet: Reuse existing pretty printing setup
...
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.
6 years ago
Kim Alvefur
b044b8b0a1
mod_admin_telnet: Allow configuring pretty printing defaults
...
Mostly just to have the defaults merged so you can e.g.
output:configure({maxdepth=1})
6 years ago
Kim Alvefur
7612c47031
mod_admin_telnet: Silence luacheck
6 years ago
Kim Alvefur
5efc9d8b9c
mod_admin_telnet: Add a command to configure pretty-printing settings
...
Sometimes you wanna adjust the maxdepth or something.
6 years ago
Kim Alvefur
ed209d1f70
mod_admin_telnet: Add a TODO for someone to find in the future
6 years ago
Kim Alvefur
3ac134a9e3
mod_admin_telnet: Document HTTP command in internal help
6 years ago
Kim Alvefur
66f554d5aa
mod_admin_telnet: Document (in the internal help) debug commands
6 years ago
Kim Alvefur
edbf00f460
mod_admin_telnet: Pretty-print values returned from commands
...
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.
6 years ago
Kim Alvefur
cd774239f7
mod_admin_telnet: Allow passing list of hosts to http:list()
...
Lets you select what hosts to list http services on. In particular, this
enables listing global http services, which was not possible before.
6 years ago
Kim Alvefur
5fe826e317
mod_admin_telnet: Fix host selection filter, fixes loading on components
...
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
6 years ago
Kim Alvefur
62e66fe940
mod_admin_telnet: Reflow hosts filter for readability
6 years ago
Kim Alvefur
6e9828ec03
mod_admin_telnet: Avoid indexing missing socket (thanks tmolitor)
...
if `sock` was nil it would still proceed with SNI and ALPN checks
6 years ago
Kim Alvefur
f507f3bb8b
mod_admin_telnet: Use promise based DNS resolving
...
Mostly done for testing this new API
6 years ago
Kim Alvefur
7ee9d3b7af
mod_admin_telnet: Silence luacheck warnings
6 years ago
Kim Alvefur
842657970f
mod_admin_telnet: Include config:get() in help text
6 years ago
Kim Alvefur
9d389440a3
mod_admin_telnet: Use common sort function in s2s:show
6 years ago
Kim Alvefur
b3ff5eec9c
mod_admin_telnet: Use existing host comparison when comparing JIDs
6 years ago
Kim Alvefur
9eea55bee8
mod_admin_telnet: Sort hosts in module:list
6 years ago
Kim Alvefur
5f7845641e
mod_admin_telnet: Refactor internal function for listing hosts
...
Splits out a function that doesn't deal with modules for reuse elsewhere
6 years ago
Kim Alvefur
65c7619a6d
mod_admin_telnet: Merge hostname comparison functions
...
Missed that there existed one already when writing the one for host:list
6 years ago
Kim Alvefur
a34238b2a2
mod_admin_telnet: Sort by complete labels
...
Might as well.
6 years ago
Kim Alvefur
821603db8a
mod_admin_telnet: Fix host sorting
...
Reversing each %P is a noop
6 years ago
Kim Alvefur
ab7c35c8e5
mod_admin_telnet: Avoid using LuaSocket for timestamps
...
Using util.time will make it easier to move away from LuaSocket if we
ever wanted to do that.
6 years ago
Kim Alvefur
07645554cc
mod_admin_telnet: Sort hosts
...
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".
6 years ago
Kim Alvefur
2d7eada577
mod_admin_telnet: Display ALPN in show_tls() if supported and available
6 years ago
Kim Alvefur
b1d048f117
mod_admin_telnet: Show SNI name in show_tls() if available
6 years ago
Kim Alvefur
2a10ceae09
mod_admin_telnet: Show s2s authentication method (probably) used
6 years ago
Kim Alvefur
7590aa04d6
mod_admin_telnet: xmpp:ping: Log ping time
6 years ago
Kim Alvefur
469bfe7d6b
mod_admin_telnet: Use new compact function for waiting on promises
6 years ago
Kim Alvefur
f1dfdac89b
mod_admin_telnet: Identify native bidi sessions
6 years ago
Kim Alvefur
d2ab204f68
mod_admin_telnet: Identify bidi-capable s2sout sessions ( fixes #1403 )
6 years ago
Michel Le Bihan
9a5a3fd0f1
mod_admin_telnet: Collect array from Bosh connections when appending to connection list
...
Fixes #1356
7 years ago
Arc Riley
da0d3e296c
mod_admin_telnet: include BOSH connections in c2s:count ( #998 )
7 years ago
Arc Riley
cdbb6348f6
mod_admin_telnet: added "(bosh)" and "(websocket)" connection flags ( #998 )
7 years ago
Arc Riley
30ef8e7ac4
mod_admin_telnet: include BOSH connections in c2s session commands ( #998 )
7 years ago
Matthew Wild
7896ef03a9
mod_admin_telnet: Allow viewing HTTP event listeners via debug:events('http')
7 years ago
Kim Alvefur
b1871e8b07
mod_admin_telnet: Guard against missing table field
7 years ago
Kim Alvefur
1fd061af59
mod_admin_telnet: Create metatable only once
7 years ago
Kim Alvefur
eb580b9f2b
mod_admin_telnet: Remove unused histogram [luacheck]
7 years ago