Skip to content

binaryf0x/foxtime

Repository files navigation

Fox Time

An implementation of the Time over HTTPS Specification with a pretty front-end providing analog and digital clock displays synchronized using a simplified version of the NTP algorithm.

Demo site.

Usage

By default the server listens for local HTTP connections on port 8123.

TCP socket options

--listen-any

Listens for connections on all network interfaces instead of only localhost.

--port <PORT>

Listens for connections by binding to <PORT> instead of 8123.

UNIX socket options

--unix <PATH>

Creates a Unix domain socket at <PATH> to listen for connections.

--unix-owner <USER>

Set the owning user of the Unix domain socket to <USER>.

--unix-group <GROUP>

Set the owning group of the Unix domain socket to <GROUP>.

TLS options

--tls-cert

Enables support for HTTPS using the TLS certificate read from a PEM-encoded file at <PATH>. Requires --tls-key.

--tls-key

Enables support for HTTPS using the private key read for a PEM-encoded file at <PATH>. Requires --tls-cert.

QUIC options

If no TLS certificate is provided a self-signed certificate for "localhost" is automatically generated to enable WebTransport when testing locally.

--quic

Enables QUIC support, including support for WebTransport. Opens an additional UDP socket to listen for QUIC connections. Uses port 8123 by default.

--quic-port <PORT>

Listens for QUIC connections on <PORT> instead.

Dropping privileges

--user <USER>

Drop privileges to <USER> after loading certs and binding sockets.

--group <GROUP>

Drop privileges to <GROUP> after loading certs and binding sockets.

--chroot <PATH>

Chroot to <PATH> after loading certs and binding sockets.

Miscellaneous options

-h, --help

Prints help text.

-V, --version

Prints the application version.

Building

The frontend component is located in the web directory and must be built first using npm:

$ npm install
$ npm run build

The backend component can now be built with Cargo:

$ cargo build

When built in debug mode the frontend components are served live from the dist directory. When built in release mode they are included in the binary.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages