diff --git a/src/dashboard_new.py b/src/dashboard_new.py
index 4ca58a6..0cc40f9 100644
--- a/src/dashboard_new.py
+++ b/src/dashboard_new.py
@@ -1346,6 +1346,43 @@ def API_ping_execute():
return ResponseObject(False, "Please provide ipAddress and count")
+@app.route('/api/traceroute/execute')
+def API_traceroute_execute():
+ if "ipAddress" in request.args.keys() and len(request.args.get("ipAddress")) > 0:
+ ipAddress = request.args.get('ipAddress')
+ try:
+ tracerouteResult = traceroute(ipAddress)
+ result = []
+ for hop in tracerouteResult:
+ if len(result) > 1:
+ skipped = False
+ for i in range(result[-1]["hop"] + 1, hop.distance):
+ result.append(
+ {
+ "hop": i,
+ "ip": "*",
+ "avg_rtt": "*",
+ "min_rtt": "*",
+ "max_rtt": "*"
+ }
+ )
+ skip = True
+ if skipped: continue
+ result.append(
+ {
+ "hop": hop.distance,
+ "ip": hop.address,
+ "avg_rtt": hop.avg_rtt,
+ "min_rtt": hop.min_rtt,
+ "max_rtt": hop.max_rtt
+ })
+ return ResponseObject(data=result)
+ except Exception as exp:
+ return ResponseObject(False, exp)
+ else:
+ return ResponseObject(False, "Please provide ipAddress")
+
+
'''
Sign Up
'''
diff --git a/src/static/app/src/components/configurationList.vue b/src/static/app/src/components/configurationList.vue
index 27841eb..eb50577 100644
--- a/src/static/app/src/components/configurationList.vue
+++ b/src/static/app/src/components/configurationList.vue
@@ -30,8 +30,9 @@ export default {
WireGuard Configurations
+
Configuration
-
+
diff --git a/src/static/app/src/components/navbar.vue b/src/static/app/src/components/navbar.vue
index 56f3f19..084ee40 100644
--- a/src/static/app/src/components/navbar.vue
+++ b/src/static/app/src/components/navbar.vue
@@ -44,8 +44,10 @@ export default {
diff --git a/src/static/app/src/router/index.js b/src/static/app/src/router/index.js
index df548fd..e79add3 100644
--- a/src/static/app/src/router/index.js
+++ b/src/static/app/src/router/index.js
@@ -16,6 +16,7 @@ import PeerList from "@/components/configurationComponents/peerList.vue";
import PeerCreate from "@/components/configurationComponents/peerCreate.vue";
import RestrictedPeers from "@/components/configurationComponents/restrictedPeers.vue";
import Ping from "@/views/ping.vue";
+import Traceroute from "@/views/traceroute.vue";
const checkAuth = async () => {
let result = false
@@ -57,6 +58,11 @@ const router = createRouter({
name: "Ping",
component: Ping,
},
+ {
+ path: '/traceroute',
+ name: "Traceroute",
+ component: Traceroute,
+ },
{
name: "New Configuration",
path: '/new_configuration',
diff --git a/src/static/app/src/views/ping.vue b/src/static/app/src/views/ping.vue
index eaa2d93..7ae954c 100644
--- a/src/static/app/src/views/ping.vue
+++ b/src/static/app/src/views/ping.vue
@@ -115,7 +115,7 @@ export default {
-
diff --git a/src/static/app/src/views/traceroute.vue b/src/static/app/src/views/traceroute.vue
new file mode 100644
index 0000000..836013a
--- /dev/null
+++ b/src/static/app/src/views/traceroute.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
Traceroute
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Hop |
+ IP Address |
+ Average / Min / Max Round Trip Time |
+
+
+
+
+ {{hop.hop}} |
+ {{hop.ip}} |
+ {{hop.avg_rtt}} / {{hop.min_rtt}} / {{hop.max_rtt}} |
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file