Skip to content
Permalink
Browse files

Reword documentation and remove extraneous license bits

  • Loading branch information
Watson Ladd
Watson Ladd committed Oct 25, 2019
1 parent 41d96a1 commit 02a5305bad78e8191df77b1fd4a7dc299ca59f1c
Showing with 20 additions and 13 deletions.
  1. +5 −0 CONTRIBUTING.md
  2. +0 −4 LICENSE
  3. +15 −9 README.md
@@ -0,0 +1,5 @@
# Contributing

We welcome your contributions. Note that your contributions must be licensed under the BSD-style license found in LICENSE.

To make our lives as well as yours easier please indicate when a PR is a work in progress vs. ready for review.
@@ -1,4 +1,3 @@
All code outside of the vendor/ directory is
Copyright (c) 2019, Cloudflare. All rights reserved.

Redistribution and use in source and binary forms, with or without
@@ -25,6 +24,3 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Portions of this software found in the vendor/ directory retain the
copyright of their respective authors and the applicable license terms
found there.
@@ -1,25 +1,31 @@
# NTS-Rust
# cfnts

[![CircleCI](https://circleci.com/gh/cloudflare/nts-rust.svg?style=svg)](https://circleci.com/gh/cloudflare/nts-rust)

NTS-Rust is an implementation of the NTS protocol written in Rust.
cfnts is an implementation of the NTS protocol written in Rust.

**Prereqs**:
Rust is installed. Look up rust installation instructions: https://www.rust-lang.org/tools/install
Rust

In order to run the nts client that connects to a server that is already running on the Internet (for instance, `time.cloudflare.com`), run these on your terminal
**Building**:

1. `git clone https://github.com/cloudflare/nts-rust.git`
2. `cd nts-rust`
3. `cargo build --release`
4. Run the NTS client using `./target/release/cfnts client [--f | --s] [-p <server-port>] [-c <trusted-cert>] <server-hostname>`
We use cargo to build the software. `docker-compose up` will spawn several Docker containers that run tests.

**Running**
Run the NTS client using `./target/release/cfnts client [--4 | --6] [-p <server-port>] [-c <trusted-cert>] [-n <other name>] <server-hostname>`

Default port is `1234`.

Using `--f` forces the use of ipv4 for all connections to the server, and using `--s` forces the use of ipv6.
Using `-4` forces the use of ipv4 for all connections to the server, and using `--6` forces the use of ipv6.
These two arguments are mutually exclusive. If neither of them is used, then the client will use whichever one
is supported by the server (preference for ipv6 if supported).

To run a server you will need a memcached compatible server, together with a script based on fill-memcached.py that will write
a new random key into /nts/nts-keys/ every hour and delete old ones. Then you can run the ntp server and the nts server.

This split and use of memcached exists to enable deployments where a small dedicated device serves NTP, while a bigger server carries
out the key exchange.

**Examples**:

1. `./target/release/cfnts client time.cloudflare.com`

0 comments on commit 02a5305

Please sign in to comment.
You can’t perform that action at this time.