diff --git a/wwwroot/assets/js/myip.js b/wwwroot/assets/js/myip.js new file mode 100644 index 0000000..745bf8b --- /dev/null +++ b/wwwroot/assets/js/myip.js @@ -0,0 +1,45 @@ +function getdefault() { + fetch('/api') + .then(function (response) { + return response.json(); + }) + .then(function (data) { + document.getElementById("defaultip").innerHTML=data.ip; + document.getElementById("serverdefault").innerHTML=data.server; + document.getElementById("node_as").innerHTML=data.node_as; + document.getElementById("node_location").innerHTML=data.node_location; + document.getElementById("node_id").innerHTML=data.node_id; + }) + +} + +function getipv4() { + fetch('http://172.20.0.81/api') + .then(function (response) { + return response.json(); + }) + .then(function (data) { + document.getElementById("ipv4").innerHTML=data.ip; + document.getElementById("serveripv4").innerHTML=data.server; + + }) + +} +function getipv6() { + fetch('http://[fd42:d42:d42:81::1]/api') + .then(function (response) { + return response.json(); + }) + .then(function (data) { + document.getElementById("ipv6").innerHTML=data.ip; + document.getElementById("serveripv6").innerHTML=data.server; + + }) + +} + +window.onload = function () { + getdefault(); + getipv4(); + getipv6(); +} diff --git a/wwwroot/index.html b/wwwroot/index.html index d865547..d1bb6e5 100644 --- a/wwwroot/index.html +++ b/wwwroot/index.html @@ -14,55 +14,10 @@ - - - +
@@ -77,9 +32,9 @@

Remote Node

- The node's ip address is fetching from api.
- The node's ipv4 address is fetching from api.
- The node's ipv6 address is fetching from api.
+ The node's ip address is fetching from api.
+ The node's ipv4 address is fetching from api.
+ The node's ipv6 address is fetching from api.
You have reached the myip.dn42 service of ASfetching from api. The server is located in fetching from api . The server has the ID/name fetching from api.