Code Monkey home page Code Monkey logo

ndt-server's Introduction

GoDoc Build Status Coverage Status Go Report Card

ndt-server

This repository contains a ndt5 and ndt7 server written in Go. This code may compile under many systems, including macOS and Windows, but is specifically designed and tested for running on Linux 4.17+.

Setup

Primary setup & running (Linux)

Prepare the runtime environment

install -d certs datadir

To run the server locally, generate local self signed certificates (key.pem and cert.pem) using bash and OpenSSL

./gen_local_test_certs.bash

build the docker container for ndt-server

docker build . -t ndt-server

enable BBR (with which ndt7 works much better)

sudo modprobe tcp_bbr

and run the ndt-server binary container

docker run --network=bridge                \
           --publish 443:4443              \
           --publish 80:8080               \
           --volume `pwd`/certs:/certs:ro  \
           --volume `pwd`/datadir:/datadir \
           --read-only                     \
           --user `id -u`:`id -g`          \
           --cap-drop=all                  \
           ndt-server                      \
           -cert /certs/cert.pem           \
           -key /certs/key.pem             \
           -datadir /datadir               \
           -ndt7_addr :4443                \
           -ndt7_addr_cleartext :8080

Alternate setup & running (Windows & MacOS)

These instructions assume you have Docker for Windows/Mac installed.

Note: NDT5 does not work on Docker for Windows/Mac as it requires using the host's network, which is only supported on Linux

docker-compose run ndt-server ./gen_local_test_certs.bash
docker-compose up

After making changes you will have to run docker-compose up --build to rebuild the ntd-server binary.

Accessing the service

Once you have done that, you should have a ndt5 server running on ports 3001 (legacy binary flavour), 3002 (WebSocket flavour), and 3010 (secure WebSocket flavour); a ndt7 server running on port 443 (over TLS and using the ndt7 WebSocket protocol); and Prometheus metrics available on port 9990.

Try accessing these URLs in your browser (for URLs using HTTPS, certs will appear invalid to your browser, but everything is safe because this is a test deployment, hence you should ignore this warning and continue):

Replace localhost with the IP of the server to access them externally.

ndt-server's People

Contributors

aweits avatar bassosimone avatar darkk avatar elevenfive avatar fulvius31 avatar gfr10598 avatar nkinkade avatar pboothe avatar robertodauria avatar ryanrolds avatar stephen-soltesz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.