🗺️ A network utility that traces the journey of your packets and pinpoints their physical location at every hop.
🚀 Why Garu-Route?
Standard traceroute tells you the hops your data takes. But if you are nerd, you need to know more. We need to know where those hops are. Has network packet left the country? Are they reaching the right data center? garu-route is built to answer these questions.
✨ Features :
- Enriches each hop with city, country, region, and precise coordinates.
- Metrics: Accurately measures the round-trip time (RTT) for every hop.
- Hostname Resolution: Resolves IP addresses to their corresponding hostnames.
- Clean Output: Displays all critical information in a simple, readable, and tabular format.
🖥️ Example
- The data packets' journey to the
Japan Stock Exchange(JPX) inTokyofromHyderabad, India. - The journey begins by traveling through
Chennai, India. Chennai has aInternet Exchange Point(IXP) in India, acting as a gateway for much of the country's network traffic. - From
Chennai, the packets would then traverse vast distances across the Indian Ocean through undersea fiber optic cables, like the Tata IndicomIndia-SingaporeCable System (TIISCS). Singaporeitself is a major global telecommunications hub, with numerous international cable systems landing there. From Singapore, the packets would then take a couple more network hops, likely through other undersea cables, to finally reachJapan. TheSingapore India Gateway(SING) cable system also includes branches for connectivity toIndonesia,Thailand, andOman. The data would likely land in or aroundTokyo, the financial heart of Japan, and then travel onward to the Japan Stock Exchange located inOsaka.- This entire network path, involving multiple countries, IXPs, and undersea cables, highlights the intricate global infrastructure that underpins the interconnected digital world. Here's a trace of that journey via
garu-route:
❯ sudo ./target/debug/garu-route --domain jpx.jp
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| hop | ip_address | duration | city | country | region | org | hostname | location |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 1 | 192.168.29.1 | 2.509622ms | *** | *** | *** | *** | reliance.reliance | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 2 | 10.228.192.1 | 4.274329ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 3 | 172.16.5.8 | 11.097454ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 4 | 192.168.247.206 | 6.588196ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 5 | 192.168.230.213 | 7.799451ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 6 | 192.168.230.194 | 5.696099ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 7 | 192.168.59.116 | 5.065166ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 8 | *** | 0ns | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 9 | *** | 0ns | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 10 | 103.198.140.170 | 24.670384ms | Chennai | IN | Tamil Nadu | AS64049 Reliance Jio Infocomm Pte Ltd Singapore | *** | 13.0878,80.2785 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 11 | 103.198.140.83 | 253.890469ms | Singapore | SG | Singapore | AS64049 Reliance Jio Infocomm Pte Ltd Singapore | *** | 1.2897,103.8501 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 12 | 103.198.140.83 | 55.868696ms | Singapore | SG | Singapore | AS64049 Reliance Jio Infocomm Pte Ltd Singapore | *** | 1.2897,103.8501 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 13 | *** | 0ns | *** | *** | *** | *** | *** | *** |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 14 | 62.115.138.20 | 123.565577ms | Singapore | SG | Singapore | AS1299 Arelion Sweden AB | sng-b7-link.ip.twelve99.net | 1.2897,103.8501 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 15 | 62.115.140.15 | 123.08701ms | Tokyo | JP | Tokyo | AS1299 Arelion Sweden AB | tky-b7-link.ip.twelve99.net | 35.6895,139.6917 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 16 | 62.115.196.173 | 198.809928ms | Tokyo | JP | Tokyo | AS1299 Arelion Sweden AB | xservercloudinc-ic-389989.ip.twelve99-cust.net | 35.6895,139.6917 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 17 | 103.3.0.69 | 146.900226ms | Osaka | JP | Osaka | AS131965 Xserver Inc. | *** | 34.6938,135.5011 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 18 | 103.3.0.79 | 139.888674ms | Osaka | JP | Osaka | AS131965 Xserver Inc. | *** | 34.6938,135.5011 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
| 19 | 183.181.96.159 | 163.093494ms | Osaka | JP | Osaka | AS131965 Xserver Inc. | sv12798.xserver.jp | 34.6938,135.5011 |
+-----+-----------------+--------------+-----------+---------+------------+-------------------------------------------------+------------------------------------------------+------------------+
Here's a live look at garu-route tracing the path to whatsapp.com from the place where I live :
❯ sudo ./target/debug/garu-route --domain whatsapp.com
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| hop | ip_address | duration | city | country | region | org | hostname | location |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 1 | 192.168.29.1 | 7.657765ms | *** | *** | *** | *** | reliance.reliance | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 2 | 10.228.192.1 | 19.002059ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 3 | 172.16.5.10 | 11.232636ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 4 | 192.168.247.204 | 8.835089ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 5 | 192.168.230.213 | 16.778109ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 6 | 192.168.230.195 | 18.637856ms | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 7 | *** | 0ns | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 8 | *** | 0ns | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 9 | *** | 0ns | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 10 | 157.240.66.34 | 37.230085ms | Delhi | IN | Delhi | AS32934 Facebook, Inc. | ae13.pr03.del2.tfbnw.net | 28.6519,77.2315 |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 11 | 129.134.37.186 | 30.953011ms | Delhi | IN | Delhi | AS32934 Facebook, Inc. | po407.asw02.del1.tfbnw.net | 28.6519,77.2315 |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 12 | 129.134.94.170 | 30.596622ms | Delhi | IN | Delhi | AS32934 Facebook, Inc. | psw04.del2.tfbnw.net | 28.6519,77.2315 |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 13 | *** | 0ns | *** | *** | *** | *** | *** | *** |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
| 14 | 57.144.147.32 | 54.435689ms | Delhi | IN | Delhi | AS32934 Facebook, Inc. | whatsapp-cdn-shv-03-del2.fbcdn.net | 28.6519,77.2315 |
+-----+-----------------+-------------+-------+---------+--------+------------------------+------------------------------------+-----------------+
⚙️ Installation From Source
$ git clone https://github.com/your-username/garu-route.git
$ cd garu-route
$ cargo build --release🏃 UsageSince garu-route requires raw socket access to send and receive packets, it needs to be run with elevated privileges (sudo).
$ # Trace the path to a domain
$ sudo ./target/debug/garu-route --domain <domain_name>
🤝 Contributing Contributions are welcome! If you have a feature request, bug report, or want to contribute to the code, please feel free to open an issue or pull request on the GitHub repository.
