Multi-network IPv4/IPv6 server for the Nex protocol, written in Rust. https://crates.io/crates/nexy
Find a file
2025-06-25 12:34:17 +03:00
.github rename workflow 2025-06-25 12:25:05 +03:00
src group sort members 2025-06-25 12:34:17 +03:00
.gitignore initial commit 2025-06-24 03:59:55 +03:00
Cargo.toml implement CLF option 2025-06-25 06:34:27 +03:00
LICENSE Initial commit 2025-06-24 03:52:32 +03:00
README.md rename workflow 2025-06-25 12:25:05 +03:00

Nexy - Multi-network server for the Nex protocol

Linux Dependencies crates.io

Features

  • Run IPv4/IPv6 server accessible to Internet, Yggdrasil, Mycelium, and other networks simultaneously, as many as desired;
  • Optimized for streaming large files (in chunks) without memory overload on buffering the data;
  • Supports the CLF access log, which is compatible with analytics tools such as GoAccess, GoatCounter or just htcount;
  • Custom templates for various server response types;
  • See the Options section for a complete list of other features.

Install

  1. git clone https://github.com/yggverse/nexy.git && cd nexy
  2. cargo build --release
  3. sudo install target/release/nexy /usr/local/bin/nexy

Usage

nexy -p /path/to/public_dir
  • by default, server starts on localhost; change it with the --bind option(s)

Options

-a, --access-log <ACCESS_LOG>
        Absolute path to the access log file

-b, --bind <BIND>
        Bind server(s) `host:port` to listen incoming connections

        * use `[host]:port` notation for IPv6

        [default: 127.0.0.1:1900 [::1]:1900]

-d, --debug <DEBUG>
        Debug level

        * `e` - error * `i` - info

        [default: ei]

-p, --public <PUBLIC>
        Absolute path to the public files directory

--template-access-denied <TEMPLATE_ACCESS_DENIED>
        Absolute path to the `Access denied` template file

        * this template file can be in binary format (e.g. image)

--template-internal-server-error <TEMPLATE_INTERNAL_SERVER_ERROR>
        Absolute path to the `Internal server error` template file

        * this template file can be in binary format (e.g. image)

--template-not-found <TEMPLATE_NOT_FOUND>
        Absolute path to the `Not found` template file

        * this template file can be in binary format (e.g. image)

--template-welcome <TEMPLATE_WELCOME>
        Absolute path to the `Welcome` template file. Unlike `template-index`, this applies only to the `public` location

        * this template file expects pattern and cannot be in binary format

        **Patterns** * `{list}` - entries list for the `public` directory

--template-index <TEMPLATE_INDEX>
        Absolute path to the `Index` template file for each directory

        * this template file expects pattern and cannot be in binary format

        **Patterns** * `{list}` - entries list for the current directory

--list-dir-count
        Show files count in dir (as the alternative text for navigation links)

--list-dir-accessed
        Show directory accessed time

--list-dir-created
        Show directory created time

--list-dir-modified
        Show directory modified time

--list-dir-sort-accessed
        Sort dirs by time accessed (name by default)

--list-dir-sort-created
        Sort dirs by time created (name by default)

--list-dir-sort-modified
        Sort dirs by time modified (name by default)

--list-dir-sort-count
        Sort dirs by count (name by default)

--list-dir-reverse
        Sort directories in list DESC (ASC by default)

--list-file-size
        Show file size in list (as the alternative text for navigation links)

--list-file-accessed
        Show file accessed time

--list-file-created
        Show file created time

--list-file-modified
        Show file modified time

--list-file-sort-accessed
        Sort files by time accessed (name by default)

--list-file-sort-created
        Sort files by time created (name by default)

--list-file-sort-modified
        Sort files by time modified (name by default)

--list-file-sort-size
        Sort files by size (name by default)

--list-file-reverse
        Sort files in list DESC (ASC by default)

--list-time-format <LIST_TIME_FORMAT>
        Time format for listing items

        * use escape notation for `%` e.g. `"%%Y-%%m-%%d %%H:%%M:%%S"`

        [default: "%Y-%m-%d %H:%M:%S"]

-r, --read-chunk <READ_CHUNK>
        Optimize memory usage on reading large files or stream

        [default: 1024]

-h, --help
        Print help (see a summary with '-h')

-V, --version
        Print version