From 3b1428c44198c9a18d92cc16f507abd2e96c6636 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Thu, 24 Dec 2015 13:46:07 -0200 Subject: [PATCH] report listening ports and test if they are open (using an external site) --- js/twister_network.js | 14 ++++++++++++++ network.html | 22 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/js/twister_network.js b/js/twister_network.js index f4cc255..9380588 100644 --- a/js/twister_network.js +++ b/js/twister_network.js @@ -53,6 +53,20 @@ function requestNetInfo(cbFunc, cbArg) { $(".userMenu-dhtindicator a").text(twisterDhtNodes); $(".version").text(twisterDisplayVersion); + if( ret.proxy !== undefined && ret.proxy.length ) { + $(".proxy").text(ret.proxy); + $(".using-proxy").show(); + $(".not-using-proxy").hide(); + } else { + $(".ext-ip").text(ret.ext_addr_net1); + $(".ext-port1").text(ret.ext_port1); + $(".ext-port2").text(ret.ext_port2); + $(".test-ext-port1").attr("href","http://www.yougetsignal.com/tools/open-ports/?port=" + ret.ext_port1); + $(".test-ext-port2").attr("href","http://www.yougetsignal.com/tools/open-ports/?port=" + ret.ext_port2); + $(".using-proxy").hide(); + $(".not-using-proxy").show(); + } + $(".dht-torrents").text(ret.dht_torrents); $(".num-peers").text(ret.num_peers); $(".peerlist-size").text(ret.peerlist_size); diff --git a/network.html b/network.html index 8325c44..6f27cb7 100644 --- a/network.html +++ b/network.html @@ -90,6 +90,28 @@ 0 + + + +