diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-03-05 11:31:22 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-03-05 11:31:22 +0000 |
commit | 1af4939c118831e3020f765c91a4b6b33f55394b (patch) | |
tree | 9cb70e70899c9749dfdce348671183c637730f7a | |
parent | fa68985f24c2160d4cb2e634a0e0df857e4a666e (diff) | |
download | prosody-1af4939c118831e3020f765c91a4b6b33f55394b.tar.gz prosody-1af4939c118831e3020f765c91a4b6b33f55394b.zip |
prosodyctl: check turn: show relayed address(es) in verbose mode
-rw-r--r-- | util/prosodyctl/check.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua index f5236b86..b452a0bf 100644 --- a/util/prosodyctl/check.lua +++ b/util/prosodyctl/check.lua @@ -158,6 +158,8 @@ local function check_turn_service(turn_service, ping_service) return result; end + result.relayed_addresses = alloc_response:get_xor_relayed_addresses(); + if not ping_service then -- Success! We won't be running the relay test. return result; @@ -1247,6 +1249,11 @@ local function check(arg) else if opts.verbose then print(("External IP: %s"):format(result.external_ip.address)); + if result.relayed_addresses then + for i, relayed_address in ipairs(result.relayed_addresses) do + print(("Relayed address %d: %s:%d"):format(i, relayed_address.address, relayed_address.port)); + end + end if result.external_ip_pong then print(("TURN external IP: %s"):format(result.external_ip_pong.address)); end |