this post was submitted on 30 Dec 2023
3 points (100.0% liked)

Modern Lightweight channEl Service

30 readers
2 users here now

All things related to Mles, Mles WebSocket, and their clients. See https://mles.io for more info about Mles (Modern Lightweight channEl Service) -protocol.

founded 1 year ago
MODERATORS
3
submitted 10 months ago* (last edited 10 months ago) by marsuplane to c/mles
 

In the previous post, we saw how to write a simple websocat client for Mles. But how to run the server itself?

To run a server, you'll need to follow below steps: - Acquire a public Internet server with a static IP + domain - Open TLS port 443 of firewall - Ensure that your wwwroot-directory has the static web pages under it e.g. static/your.domain - Run Mles server as root (due to port 443) with Let's Encrypt caching and debug logging enabled as shown below

RUST_LOG=debug mles --domains your.domain --cache . --wwwroot static

You can have several domains listed e.g. --domains your.domain --domains www.your.domain.

The full usage:

Usage: mles [OPTIONS] --domains  --wwwroot 

Options:
  -d, --domains   Domain(s)
  -e, --email       Contact info
  -c, --cache       Cache directory
  -l, --limit       History limit [default: 200]
  -w, --wwwroot   Www-root directory for domain(s) (e.g. /path/static where domain mles.io goes to static/mles.io)
  -s, --staging            Use Let's Encrypt staging environment (see https://letsencrypt.org/docs/staging-environment/)
  -p, --port         [default: 443]
  -h, --help               Print help

It is out already in crates.io mles v2.0.0, let me know how it works for you. Enjoy!

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here