{"id":20749304,"url":"https://github.com/vtramo/async-traceroute","last_synced_at":"2025-08-29T17:40:13.660Z","repository":{"id":241647492,"uuid":"807324573","full_name":"vtramo/async-traceroute","owner":"vtramo","description":"Async Traceroute library/command-line tool in Rust","archived":false,"fork":false,"pushed_at":"2024-09-15T17:01:47.000Z","size":4392,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T22:35:26.362Z","etag":null,"topics":["async-traceroute","asynchronous-programming","network-programming","rust","tokio-rs","traceroute"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/vtramo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-28T22:13:28.000Z","updated_at":"2024-10-09T13:49:24.000Z","dependencies_parsed_at":"2024-06-24T21:16:08.840Z","dependency_job_id":"6494f14e-f9e1-4ed7-9ce9-6dcbcaa96b45","html_url":"https://github.com/vtramo/async-traceroute","commit_stats":null,"previous_names":["vtramo/traceroute-rust"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vtramo/async-traceroute","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtramo%2Fasync-traceroute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtramo%2Fasync-traceroute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtramo%2Fasync-traceroute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtramo%2Fasync-traceroute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtramo","download_url":"https://codeload.github.com/vtramo/async-traceroute/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtramo%2Fasync-traceroute/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272733351,"owners_count":24984261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["async-traceroute","asynchronous-programming","network-programming","rust","tokio-rs","traceroute"],"created_at":"2024-11-17T08:22:10.705Z","updated_at":"2025-08-29T17:40:13.632Z","avatar_url":"https://github.com/vtramo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[crates-url]: https://crates.io/crates/async-traceroute\n[license-badge]: https://img.shields.io/crates/l/async-traceroute.svg\n[crates-badge]: https://img.shields.io/crates/v/async-traceroute.svg\n[github-url]: https://github.com/vtramo/async-traceroute\n\n# async-traceroute [![Crates.io][crates-badge]][crates-url] ![License][license-badge]\n\nAsync Traceroute library/command-line tool.\n## What is Traceroute\nTraceroute allows you to see the path an IP packet takes from one host to another. It uses the **TTL (Time To Live)** field\nin the IP packet to elicit an **ICMP Time to Live Exceeded** message from each router along the path. Each router that handles the\npacket decreases the TTL field, which effectively acts as a Hop Counter. When a router receives an IP datagram with the\nTTL field set to 0, it responds with an ICMP Time to Live Exceeded that reveals its IP address.\n\nSeveral traceroute probe methods exist. This diagram shows how the UDP-based traceroute method works.\n![traceroute.svg](traceroute.svg)\n## Usage\n```\nAsync Traceroute library/command-line tool\n\nUsage: traceroute [OPTIONS] \u003cHOST\u003e\n\nArguments:\n  \u003cHOST\u003e  \n\nOptions:\n  -m, --max-hops \u003cMAX_HOPS\u003e          Set the max number of hops (max TTL to be reached) [default: 30]\n  -q, --queries \u003cQUERIES\u003e            Set the number of probes per each hop [default: 3]\n  -w, --wait \u003cWAIT\u003e                  Wait for a probe no more than \u003cWAIT\u003e [default: 3s]\n  -N, --sim-queries \u003cSIM_QUERIES\u003e    Set the number of probes to be tried simultaneously [default: 16]\n  -P, --probe-method \u003cPROBE_METHOD\u003e  [default: udp] [possible values: udp, tcp, icmp]\n  -p, --port \u003cPORT\u003e                  This value changes semantics based on the probe method selected. It is either \n                                     initial udp port value for \"udp\" probe method (incremented by each probe,\n                                     default is 33434), or initial seq for \"icmp\" probe method (incremented as well, \n                                     default from 1), or destination port for \"tcp\" probe method (default is 80)\n  -n                                 Do not resolve IP addresses to their domain names\n  -i, --interface \u003cINTERFACE\u003e        Specify a network interface to operate with\n  -h, --help                         Print help\n  -V, --version                      Print version\n```\nYou can integrate `async-traceroute` into your project by using it as a library. Here is a code example showing how to\nperform a traceroute to google.com:\n```rust\nuse futures::pin_mut;\nuse futures_util::StreamExt;\n\nuse async_traceroute::TracerouteBuilder;\nuse async_traceroute::utils::dns::dns_lookup_first_ipv4_addr;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), String\u003e {\n    let ip_addr = match dns_lookup_first_ipv4_addr(\"google.com\").await {\n        None =\u003e return Err(String::from(\"Hostname not resolvable\")),\n        Some(ip_addr) =\u003e ip_addr,\n    };\n    \n    let traceroute = TracerouteBuilder::udp()\n        .destination_address(ip_addr)\n        .max_ttl(15)\n        .queries_per_hop(3)\n        .max_wait_probe(Duration::from_secs(3))\n        .simultaneous_queries(16)\n        .active_dns_lookup(true)\n        .initial_destination_port(33434)\n        .network_interface(\"eth0\")\n        .build();\n    \n    let traceroute_stream = match traceroute {\n        Ok(traceroute) =\u003e traceroute.trace(),\n        Err(error) =\u003e return Err(error),\n    };\n\n    pin_mut!(traceroute_stream);\n    \n    while let Some(probe_result) = traceroute_stream.next().await {\n        println!(\"{:?}\", probe_result);\n    }\n\n    Ok(())\n}\n\n```\n## Features (probe methods)\n- [x] IPv4 UDP\n- [x] IPv4 TCP\n- [x] IPv4 ICMPv4\n- [ ] IPv6 UDP \n- [ ] IPv6 TCP \n- [ ] IPv6 ICMPv6 \n## Install\nRun the following Cargo command in your project directory:\n```\ncargo add async-traceroute\n```\nOr add the following line to your Cargo.toml:\n```\nasync-traceroute = \"0.1.2\"\n```\n## Docker\nBuild image:\n```\ndocker build -t async-traceroute:${VERSION} .\n```\nDocker run:\n```\n$ docker run async-traceroute:${VERSION} --help\nAsync Traceroute library/command-line tool\n\nUsage: traceroute [OPTIONS] \u003cHOST\u003e\n...\n```\n## Important notes:\n- This library requires administrator privileges to create raw sockets\n- No Windows support","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtramo%2Fasync-traceroute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtramo%2Fasync-traceroute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtramo%2Fasync-traceroute/lists"}