{"id":28403318,"url":"https://github.com/pendulum-project/network-time-pester","last_synced_at":"2025-10-23T22:51:04.413Z","repository":{"id":210024345,"uuid":"724550211","full_name":"pendulum-project/network-time-pester","owner":"pendulum-project","description":"A tool to pester NTP servers with weird requests and check their responses","archived":false,"fork":false,"pushed_at":"2024-05-02T14:40:30.000Z","size":59,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-15T17:09:07.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pendulum-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2023-11-28T10:05:02.000Z","updated_at":"2025-10-03T22:30:23.000Z","dependencies_parsed_at":"2025-10-15T18:42:53.509Z","dependency_job_id":null,"html_url":"https://github.com/pendulum-project/network-time-pester","commit_stats":null,"previous_names":["pendulum-project/network-time-pester"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pendulum-project/network-time-pester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pendulum-project%2Fnetwork-time-pester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pendulum-project%2Fnetwork-time-pester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pendulum-project%2Fnetwork-time-pester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pendulum-project%2Fnetwork-time-pester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pendulum-project","download_url":"https://codeload.github.com/pendulum-project/network-time-pester/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pendulum-project%2Fnetwork-time-pester/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280706796,"owners_count":26376971,"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-10-23T02:00:06.710Z","response_time":142,"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":[],"created_at":"2025-06-01T17:36:22.275Z","updated_at":"2025-10-23T22:51:04.368Z","avatar_url":"https://github.com/pendulum-project.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Network Time Pester\n\nA work-in-progress test tool for Network Time Protocol implementations. Use at your own risk and feel free to contribute your own tests or suggest ideas!\n\n## Usage\n\nTo run the tests against a server, run:\n```bash\n$ cargo run -- [SERVER_ADDRESS]\n```\n\nFor example:\n```bash\n$ cargo run -- [::1]:123\n# or with IPv4\n$ cargo run -- 127.0.0.1:123\n```\n\n### Options\n| Short | Long      | Description                                                                                                                                                                                                 |\n|-------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| -p    | --port    | The port to use for NTP, default `123`, can not be used with NTS, where the port is detected from the NTS-KE server.                                                                                        |\n| -t    | --timeout | The maximum time to wait for a response before concluding there never will be one. Default 100ms.                                                                                                           |\n| -s    | --nts     | Use Network Time Security (NTS). This will enable more tests that assume the server is NTS capable.                                                                                                         |\n|       | --ke-port | Port that should be used for the NTS key establishment protocol. Default `4460`.                                                                                                                            |\n| -c    | --ca-file | Path to a `.pem` file that contains the public key of the trusted CA. For an example of how to generate a CA for testing see the [ntpd-rs docs](https://docs.ntpd-rs.pendulum-project.org/development/ca/). |\n| -h    | --help    | Display a brief description of the available options                                                                                                                                                        |\n\nFor example:\n```bash\n# Run against a local NTP server listening on port 1123, and only wait 10ms for a reply\n$ cargo run -- --port 1123 --timeout 10ms localhost\n```\n\nOr with NTS:\n```bash\n$ cargo run -- --nts --ca-file ca-data/ca.pem ntpd-rs.test\n```\n\nSince NTS uses TLS it requires a hostname instead of an IP. This can be done by adding a line to `/etc/hosts` or \nsimilar. See [ntpd-rs docs](https://docs.ntpd-rs.pendulum-project.org/development/ca/) for an example.\n\n## Output\nThe test report is printed as the tests are executed. The first part lists one test result and test case name per line.\nFollowed by statistics on how many results happend.\n\nFor example:\n```text\n$ cargo run -- localhost\n    Finished dev [unoptimized + debuginfo] target(s) in 0.02s\n     Running `target/debug/network-time-pester localhost`\n✅ tests::basic::test_responds_to_version_4\n❌ tests::basic::test_ignores_version_5\n ↳ After test: Server did no longer reply to normal poll\n✅ tests::extensions::test_unknown_extensions_are_ignored\n❓ tests::extensions::test_unique_id_is_returned:\n ↳ Can not connect to 127.0.0.1:123 from 0.0.0.0:0: Network is unreachable (os error 101)\n⏩ tests::nts::happy\n⏩ tests::nts_ke::happy\n⏩ tests::nts_ke::error_on_unknown_next_protocol\n⏩ tests::nts_ke::ignore_unknown_extra_protocols\n⏩ tests::nts_ke::error_on_unknown_aead\n⏩ tests::nts_ke::ignore_unknown_extra_aead\n⏩ tests::nts_ke::empty_message_resolves_in_error\n\n✅ Passed: 2\n❌ Failed: 1\n❓ Errored: 1\n⏩ Skipped: 7\n```\n\n### Results\n| Symbol | Name    | Description                                                                                                                                                      |\n|--------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ✅      | Passed  | The test was executed and all checks passed.                                                                                                                     |\n| ❌      | Failed  | During execution one of the checks failed. A description of the failure is added on a new line.                                                                  |\n| ❓      | Error   | During execution an error occurred, this could mean that the server did not behave as expected or another issue occured. (e.g. the network connection was lost). |\n| ⏩      | Skipped | The test was not executed because it needed a different connection. (e.g. when running without the `--nts` flag.                                                 |\n\n*Note:* Symbols might appear different depending on the terminal font.\n\n### Tests names\nThe tests are named after their Rust module paths. For example `tests::basic::test_responds_to_version_4` can be found \nin [`src/tests/basic.rs`](src/tests/basic.rs) in the function `test_responds_to_version_4`.\n\n# Contributing\nThis tool is a work in progress that was developed to test edge cases of NTP implementations. If you have any\n**thoughts**, **ideas for tests**, or **test implementations** feel free to \n[open an issue](https://github.com/pendulum-project/ntpd-rs/issues/new) on this repository.\n\nFor an example of a small test case see [`tests::extensions::test_unknown_extensions_are_ignored`](src/tests/extensions.rs).\nThe existing test cases use the [`ntp-proto`](https://crates.io/crates/ntp-proto) crate, but packets can also just be constructed byte-by-byte.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpendulum-project%2Fnetwork-time-pester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpendulum-project%2Fnetwork-time-pester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpendulum-project%2Fnetwork-time-pester/lists"}