Browse Source

report listening ports and test if they are open (using an external site)

readme-update
Miguel Freitas 9 years ago
parent
commit
3b1428c441
  1. 14
      js/twister_network.js
  2. 22
      network.html

14
js/twister_network.js

@ -53,6 +53,20 @@ function requestNetInfo(cbFunc, cbArg) {
$(".userMenu-dhtindicator a").text(twisterDhtNodes); $(".userMenu-dhtindicator a").text(twisterDhtNodes);
$(".version").text(twisterDisplayVersion); $(".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); $(".dht-torrents").text(ret.dht_torrents);
$(".num-peers").text(ret.num_peers); $(".num-peers").text(ret.num_peers);
$(".peerlist-size").text(ret.peerlist_size); $(".peerlist-size").text(ret.peerlist_size);

22
network.html

@ -90,6 +90,28 @@
<label>Active DHT nodes: </label> <label>Active DHT nodes: </label>
<span class="dht-nodes">0</span> <span class="dht-nodes">0</span>
</li> </li>
<li class="not-using-proxy" style="display:none;">
<label>External IP: </label>
<span class="ext-ip"></span>
</li>
<li class="not-using-proxy" style="display:none;">
<label>External Port 1 (TCP): </label>
<span class="ext-port1"></span>
<a class="test-ext-port1">
<button>Test open port (external site)</button>
</a>
</li>
<li class="not-using-proxy" style="display:none;">
<label>External Port 2 (TCP+UDP): </label>
<span class="ext-port2"></span>
<a class="test-ext-port2">
<button>Test open port (external site)</button>
</a>
</li>
<li class="using-proxy" style="display:none;">
<label>Proxy: </label>
<span class="proxy"></span>
</li>
<li> <li>
<label>Force connection to peer:</label> <label>Force connection to peer:</label>
<input class="new-peer-addr" type="textbox" placeholder="peer address" size="20"/> <input class="new-peer-addr" type="textbox" placeholder="peer address" size="20"/>

Loading…
Cancel
Save