{"id":13526689,"url":"https://github.com/zartbot/ztrace","last_synced_at":"2026-01-12T07:36:02.357Z","repository":{"id":50470902,"uuid":"396685359","full_name":"zartbot/ztrace","owner":"zartbot","description":"Traceroute in Go","archived":false,"fork":false,"pushed_at":"2022-07-31T14:17:20.000Z","size":48127,"stargazers_count":88,"open_issues_count":1,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-01T08:36:40.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zartbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-16T07:58:39.000Z","updated_at":"2025-03-03T20:38:09.000Z","dependencies_parsed_at":"2022-09-26T21:20:15.367Z","dependency_job_id":null,"html_url":"https://github.com/zartbot/ztrace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zartbot/ztrace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zartbot%2Fztrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zartbot%2Fztrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zartbot%2Fztrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zartbot%2Fztrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zartbot","download_url":"https://codeload.github.com/zartbot/ztrace/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zartbot%2Fztrace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:33.221Z","updated_at":"2026-01-12T07:36:02.352Z","avatar_url":"https://github.com/zartbot.png","language":"Go","funding_links":[],"categories":["命令行工具"],"sub_categories":[],"readme":"# ztrace\n\nTraceroute in Go\n\n![](https://github.com/zartbot/ztrace/blob/main/ztrace.png?raw=true)\n\n## Motivation\nMost network engineers need fast traceroute result and correlate it with service provider information and Geo locations.\n\nztrace is a go based solution to leverage multithread capability which could get the result in just one second.\n\nThe ztrace is a common lib for traceroute service, you can use it as a probe and export the stats result to 3rd party database.\n\nThe example is just output them to the console.\n\n## How to build\n\n```bash\ngit clone https://github.com/zartbot/ztrace\ncd example \nmake\ncd build/ztrace\nsudo ./ztrace_linux_x86 www.cisco.com\n```\n\u003e The build target only support MAC and linux with both arm/x86 platform. you could load and run it on a Cisco Router.\n\n## Usage\n\n\n```\nUsage:\n  ./ztrace [-src source] [-proto protocol] [-ttl ttl] [-rate packetRate] [-wide Widescreen mode] [-path NumOfECMPPath] host\nExample:\n ./ztrace www.cisco.com\n ./ztrace -ttl 30 -rate 1 -path 8 -wide www.cisco.com\nOption:\n  -lat float\n    \tLatitude (default 31.02)\n  -long float\n    \tLongitude (default 121.1)\n  -p int\n    \tMax ECMP Number (default 16)\n  -path int\n    \tMax ECMP Number (default 16)\n  -proto string\n    \tProtocol[icmp|tcp|udp] (default \"udp\")\n  -r float\n    \tPacket Rate per second (default 1)\n  -rate float\n    \tPacket Rate per second (default 1)\n  -src string\n    \tSource \n  -ttl int\n    \tMax TTL (default 64)\n  -w\tWidescreen mode\n  -wide\n    \tWidescreen mode\n\n```\n\u003e Linux platform support all the traceroute protocol, The MAC raw socket can only listen ICMP/UDP, TCP is not supported.\n\n```bash\n[www.cisco.com]Traceroute Report\n\n+-------+-----------------------+--------------------------------+------------------+------------------+------------+--------------------------------+-----------------+----------------+------------+------------+-------+\n| TTL   |        Server         |              Name              |       City       |     Country      |    ASN     |               SP               | Distance[tRTT]  |      p95       |  Latency   |   Jitter   | Loss  |\n+-------+-----------------------+--------------------------------+------------------+------------------+------------+--------------------------------+-----------------+----------------+------------+------------+-------+\n|     1 | 192.168.101.1         | zartRT                         |                  |                  | 0          |                                |                 |         3.25ms |     1.48ms |     0.98ms |  0.0% |\n|     2 | 192.168.1.1           |                                |                  |                  | 0          |                                |                 |         6.48ms |     3.69ms |     1.70ms |  0.0% |\n|     3 | 100.65.0.1            |                                |                  |                  | 0          |                                |                 |        34.69ms |    25.52ms |     6.92ms |  0.0% |\n|     4 | 61.152.54.125         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 12ms] |        34.03ms |    15.81ms |     9.30ms |  0.0% |\n|       | 61.152.53.149         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 12ms] |        31.60ms |    17.86ms |     8.41ms |  0.0% |\n|     5 | 61.152.25.66          |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        31.71ms |    20.10ms |     6.22ms |  0.0% |\n|       | 61.152.25.190         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        30.96ms |    22.67ms |     7.75ms | 25.0% |\n|       | 61.152.24.110         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        32.14ms |    21.01ms |     9.02ms |  0.0% |\n|       | 61.152.24.118         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        34.29ms |    20.10ms |    10.47ms |  0.0% |\n|       | 61.152.25.18          |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        30.95ms |    21.97ms |     8.66ms | 25.0% |\n|       | 61.152.25.174         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        31.87ms |    22.24ms |     9.08ms | 25.0% |\n|       | 61.152.25.98          |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        31.73ms |    22.17ms |     9.03ms | 25.0% |\n|       | 101.95.88.126         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        33.79ms |    19.35ms |    10.38ms | 25.0% |\n|       | 61.152.24.142         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        24.99ms |    17.72ms |     5.29ms | 25.0% |\n|       | 101.95.88.122         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        25.97ms |    17.69ms |     6.43ms | 25.0% |\n|       | 61.152.24.242         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        16.80ms |    14.05ms |     2.21ms | 25.0% |\n|       | 61.152.24.226         |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        31.93ms |    22.25ms |     8.77ms | 25.0% |\n|       | 61.152.25.30          |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        25.21ms |    19.20ms |     5.34ms | 25.0% |\n|       | 61.152.25.50          |                                | Shanghai         | China            | 4812       | China Telecom Group            |     29km[ 15ms] |        31.96ms |    22.95ms |     8.33ms | 25.0% |\n|     6 | 202.97.24.138         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 29ms] |        32.28ms |    23.04ms |     8.50ms | 25.0% |\n|       | 202.97.57.145         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 29ms] |        31.94ms |    18.64ms |     7.69ms |  0.0% |\n|       | 202.97.50.154         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 29ms] |        31.73ms |    22.79ms |     8.15ms | 25.0% |\n|       | 202.97.57.25          |                                |                  | China            | 4134       | Chinanet                       |    805km[ 29ms] |        32.11ms |    23.05ms |     8.22ms | 25.0% |\n|       | 202.97.94.237         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 29ms] |        19.93ms |    13.78ms |     5.27ms | 25.0% |\n|       | 202.97.61.6           |                                |                  | China            | 4134       | Chinanet                       |    805km[ 29ms] |        30.82ms |    22.95ms |     7.23ms | 25.0% |\n|     7 | 202.97.83.22          |                                |                  | China            | 4134       | Chinanet                       |    805km[ 32ms] |        31.86ms |    20.36ms |     7.55ms |  0.0% |\n|       | 202.97.83.62          |                                |                  | China            | 4134       | Chinanet                       |    805km[ 32ms] |        30.87ms |    22.38ms |     8.13ms | 25.0% |\n|       | 202.97.51.161         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 32ms] |        31.96ms |    18.99ms |     9.75ms |  0.0% |\n|       | 202.97.83.18          |                                |                  | China            | 4134       | Chinanet                       |    805km[ 32ms] |        32.25ms |    23.22ms |     7.91ms | 25.0% |\n|       | 202.97.74.1           |                                |                  | China            | 0          |                                |    805km[ 32ms] |        32.11ms |    23.32ms |     7.48ms |  0.0% |\n|       | 202.97.85.34          |                                |                  | China            | 4134       | Chinanet                       |    805km[ 32ms] |        33.88ms |    23.23ms |     8.58ms |  0.0% |\n|       | 202.97.83.38          |                                |                  | China            | 4134       | Chinanet                       |    805km[ 32ms] |        34.08ms |    18.92ms |    10.19ms |  0.0% |\n|       | 202.97.12.197         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 32ms] |        33.91ms |    21.14ms |     7.98ms |  0.0% |\n|     8 | 202.97.27.210         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       167.09ms |   160.08ms |     3.19ms |  0.0% |\n|       | 202.97.41.202         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       163.98ms |   157.39ms |     7.49ms |  0.0% |\n|       | 202.97.59.170         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       167.17ms |   163.51ms |     3.47ms |  0.0% |\n|       | 202.97.90.222         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       180.62ms |   176.79ms |     2.92ms | 25.0% |\n|       | 202.97.99.154         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       140.76ms |   136.22ms |     3.26ms | 25.0% |\n|       | 202.97.52.178         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       143.87ms |   142.53ms |     0.95ms | 25.0% |\n|       | 202.97.71.194         |                                |                  | China            | 0          |                                |    805km[ 35ms] |       166.01ms |   162.73ms |     2.67ms | 25.0% |\n|       | 202.97.27.218         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       167.76ms |   164.88ms |     2.17ms | 25.0% |\n|       | 202.97.89.142         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       173.84ms |   167.85ms |     4.40ms | 25.0% |\n|       | 202.97.59.153         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       147.65ms |   141.30ms |     4.00ms |  0.0% |\n|       | 202.97.58.170         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 35ms] |       150.41ms |   144.69ms |     5.47ms | 25.0% |\n|     9 | 202.97.83.242         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 38ms] |       172.10ms |   145.78ms |    11.39ms |  0.0% |\n|       | 202.97.92.37          |                                |                  | China            | 4134       | Chinanet                       |    805km[ 38ms] |       180.61ms |   162.57ms |    10.29ms |  0.0% |\n|       | 202.97.50.78          |                                |                  | China            | 4134       | Chinanet                       |    805km[ 38ms] |       198.09ms |   184.91ms |     7.71ms |  0.0% |\n|    10 | 218.30.53.109         |                                |                  | China            | 4134       | Chinanet                       |    805km[ 41ms] |       183.84ms |   160.34ms |    10.52ms |  0.0% |\n|       | 129.250.9.73          | ae-63.a01.snjsca04.us.bb.gin.n |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[182ms] |       183.42ms |   179.63ms |     3.52ms |  0.0% |\n|    11 | 129.250.2.105         | ae-7.r24.lsanca07.us.bb.gin.nt |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[185ms] |       186.21ms |   147.38ms |    14.07ms |  0.0% |\n|       | 129.250.3.162         | ae-8.r25.snjsca04.us.bb.gin.nt |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[185ms] |       178.40ms |   161.49ms |     8.80ms |  0.0% |\n|    12 | 129.250.7.68          | ae-7.r20.dllstx14.us.bb.gin.nt |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[188ms] |       195.09ms |   173.26ms |    10.37ms |  0.0% |\n|       | 129.250.4.155         | ae-8.r21.dllstx14.us.bb.gin.nt |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[188ms] |       210.32ms |   202.74ms |     3.85ms |  0.0% |\n|    13 | 129.250.4.117         | ae-11.r22.atlnga05.us.bb.gin.n |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[191ms] |       226.28ms |   219.00ms |     5.45ms | 25.0% |\n|       | 129.250.3.55          | ae-1.r21.dllstx14.us.bb.gin.nt |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[191ms] |       205.43ms |   183.17ms |    10.01ms |  0.0% |\n|    14 | 129.250.4.117         | ae-11.r22.atlnga05.us.bb.gin.n |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[194ms] |       214.90ms |   195.51ms |     7.42ms |  0.0% |\n|       | 129.250.5.201         | ae-9.r04.atlnga05.us.bb.gin.nt |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[194ms] |       224.31ms |   219.58ms |     4.14ms | 25.0% |\n|    15 | 129.250.5.201         | ae-9.r04.atlnga05.us.bb.gin.nt |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[197ms] |       217.47ms |   197.44ms |     8.71ms |  0.0% |\n|       | 128.241.8.127         | ae-3.akamai.atlnga05.us.bb.gin |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[197ms] |       272.28ms |   259.82ms |     6.66ms |  0.0% |\n|    16 | 128.241.8.127         | ae-3.akamai.atlnga05.us.bb.gin |                  | United States    | 2914       | NTT-COMMUNICATIONS-2914        |  11366km[200ms] |       270.39ms |   245.43ms |    13.80ms |  0.0% |\n|       | 23.203.144.195        | ae2.datasite-atl2.netarch.akam |                  | United States    | 20940      | Akamai International B.V.      |  11366km[200ms] |      2371.35ms |  2371.35ms |     0.00ms | 75.0% |\n|    17 | 23.203.144.195        | ae2.datasite-atl2.netarch.akam |                  | United States    | 20940      | Akamai International B.V.      |  11366km[203ms] |      2049.29ms |  2045.02ms |     2.36ms |  0.0% |\n+-------+-----------------------+--------------------------------+------------------+------------------+------------+--------------------------------+-----------------+----------------+------------+------------+-------+\n+-------+-----------------------+--------------------------------+------------------+------------------+------------+--------------------------------+-----------------+----------------+------------+------------+-------+\n| Probe |        Server         |              Name              |       City       |     Country      |    ASN     |               SP               | Distance[tRTT]  |      p95       |  Latency   |   Jitter   | Loss  |\n+-------+-----------------------+--------------------------------+------------------+------------------+------------+--------------------------------+-----------------+----------------+------------+------------+-------+\n| TCP   | 104.102.227.49:80     |                                | Atlanta          | United States    | 16625      | AKAMAI-AS                      |  12333km[194ms] |       261.88ms |   243.37ms |    12.55ms | 25.0% |\n|       | 104.102.227.49:443    |                                | Atlanta          | United States    | 16625      | AKAMAI-AS                      |  12333km[194ms] |      1271.75ms |   370.10ms |   271.74ms | 12.5% |\n+-------+-----------------------+--------------------------------+------------------+------------------+------------+--------------------------------+-----------------+----------------+------------+------------+-------+\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzartbot%2Fztrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzartbot%2Fztrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzartbot%2Fztrace/lists"}