https://github.com/thekuwayama/simple_nts_client
Simple NTS(Network Time Security) Client
https://github.com/thekuwayama/simple_nts_client
cli ntp nts ruby
Last synced: about 1 year ago
JSON representation
Simple NTS(Network Time Security) Client
- Host: GitHub
- URL: https://github.com/thekuwayama/simple_nts_client
- Owner: thekuwayama
- License: mit
- Created: 2019-07-11T21:44:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-21T22:24:07.000Z (almost 5 years ago)
- Last Synced: 2025-04-23T23:06:22.675Z (about 1 year ago)
- Topics: cli, ntp, nts, ruby
- Language: Ruby
- Homepage:
- Size: 68.4 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# simple_nts_client
[](https://badge.fury.io/rb/simple_nts_client)
[](https://github.com/thekuwayama/simple_nts_client/actions?workflow=CI)
[](https://codeclimate.com/github/thekuwayama/simple_nts_client/maintainability)
simple\_nts\_client is CLI that is simple NTS(Network Time Security) Client implementation.
This CLI prints the now timestamp got with NTS.
Current implementation is based on:
* https://datatracker.ietf.org/doc/html/rfc8915
## Installation
The gem is available at [rubygems.org](https://rubygems.org/gems/simple_nts_client). You can install it the following:
```sh-session
$ gem install simple_nts_client
```
## Usage
```sh-session
$ simple_nts_client --help
Usage: simple_nts_client [options]
-s, --server VALUE NTS-KE server name (default time.cloudflare.com)
-p, --port VALUE NTS-KE port number (default 4460)
-v, --verbose verbose mode (default false)
```
You can run it the following:
```sh-session
$ simple_nts_client
2020-10-30 20:00:00 +0900
```
If you need to access other NTS-KE server or port, you can run it the following:
```sh-session
$ simple_nts_client --server YOURSERVER --port YOURPORT
2020-10-30 20:00:00 +0900
```
## How "simple" client?
* The CLI supports only `AEAD_AES_SIV_CMAC_256` as AEAD algorithms to protect the NTPv4 packet.
* The CLI sends the first one of the received cookies via the response of the New Cookie for NTPv4 record and discards cookies that didn't send.
* The CLI just prints the timestamp adjusted by calculated system clock offset.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).