Skip to content

Commit 77b784f

Browse files
committed
add traceroute
1 parent e2bf237 commit 77b784f

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

starlink.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# - Add Starlink speed test
88
# - Upload test result to Cloudflare R2 buckets via Worker proxy
99

10-
VERSION="20260204.1"
10+
VERSION="20260204.2"
1111

1212
help () {
1313
echo -e "Usage:\n sudo bash $0 [--install | <interface>]"
@@ -265,7 +265,22 @@ dns () {
265265
cat "$DATA_DIR/dig.txt"
266266
}
267267

268-
trace () {
268+
traceroute_trace () {
269+
echo -e "###### Traceroute to Cloudflare"
270+
271+
OPTIONS="-I"
272+
if [ -n "$IFACE" ]; then
273+
OPTIONS="$OPTIONS -i $IFACE"
274+
fi
275+
traceroute 1.1.1.1 $OPTIONS > "$DATA_DIR/traceroute.txt"
276+
if [ "$IPV6_AVAILABLE" -eq 0 ]; then
277+
traceroute 2606:4700:4700::1111 $OPTIONS >> "$DATA_DIR/traceroute.txt"
278+
fi
279+
280+
cat "$DATA_DIR/traceroute.txt"
281+
}
282+
283+
mtr_trace () {
269284
echo -e "###### MTR to Cloudflare"
270285

271286
OPTIONS="-r -w -i 1 -c 10 -b --mpls"
@@ -358,7 +373,8 @@ run_once() {
358373
geoip
359374
cf_ray
360375
dns
361-
trace
376+
traceroute_trace
377+
mtr_trace
362378
obstruction_map
363379
ping_gw
364380
}

0 commit comments

Comments
 (0)