Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nguyenminh-phuc/ministun
High performance RFC#8489 STUN server
https://github.com/nguyenminh-phuc/ministun
c-plus-plus dpdk nat rfc-8489 seastar stun webrtc
Last synced: 4 months ago
JSON representation
High performance RFC#8489 STUN server
- Host: GitHub
- URL: https://github.com/nguyenminh-phuc/ministun
- Owner: nguyenminh-phuc
- License: mit
- Created: 2022-03-16T18:04:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-23T15:32:59.000Z (almost 3 years ago)
- Last Synced: 2023-10-08T09:32:48.167Z (over 1 year ago)
- Topics: c-plus-plus, dpdk, nat, rfc-8489, seastar, stun, webrtc
- Language: C++
- Homepage:
- Size: 72.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# High performance STUN server
## Introduction
- High-performance Shared-nothing Design - [SeaStar](http://seastar.io/): sharded, cooperative, non-blocking, micro-task scheduled design.
- Networking - [Intel DPDK](https://www.dpdk.org/): user-space TCP/IP stack, provide low-latency, high-throughput. Enjoy zero-copy, zero-lock, and zero-context-switch performance.
- STUN server: implement [RFC 8489](https://datatracker.ietf.org/doc/html/rfc8489), Prometheus metric reporting, long-term and short-term credential mechanisms, fingerprint mechanism, DNS discovery, IP rate limiting.
- STUN client.
- Tests: implement test vectors from [RFC 5769](https://datatracker.ietf.org/doc/html/rfc5769), [RFC 8489](https://datatracker.ietf.org/doc/html/rfc8489#appendix-B) and [RFC Errata 8489](https://www.rfc-editor.org/errata/rfc8489).TODO: write stuff here
## License
MIT License.
## Building STUN server
- (Optional) Install [DPDK](https://doc.dpdk.org/guides/linux_gsg/build_dpdk.html).
- Install [SeaStar](https://github.com/scylladb/seastar#building-seastar) (set `Seastar_DPDK` flag to enable DPDK support).
- Install OpenSSL package (libssl-dev on Ubuntu-based distros).
- Install [uriparser](https://uriparser.github.io/).
- Configure [HugePages](http://doc.dpdk.org/spp/setup/getting_started.html).
- Tune [aio-max-nr](https://www.kernel.org/doc/Documentation/sysctl/fs.txt) if using linux-aio reactor backend.
- Build ministun project with CMake.## Getting Started
### Run STUN server
```
./stunserver --log-level --config
```Log levels: "trace", "debug", "info", "warn" or "error".
To enable userspace network stack, add `--network-stack native --dpdk-pmd --dhcp true`.
### Run STUN client
```
./stunclient --local-ip --server
```server URI can be
stun://:
stun://:`stuns` scheme is not supported.
Other options:
```
stunclient options:
-h [ --help ] show help message
--help-seastar show help message about seastar options
--help-loggers print a list of logger names and exit
--log-level arg (=info) either "trace", "debug", "info", "warn" or "error"
--family arg (=4) either "4" or "6" to specify the usage of INET or
INET6
--protocol arg (=udp) either "udp" or "tcp"
--mechanism arg either "ShortTerm" or "LongTerm"
--username arg username
--username arg password
--local-ip arg local IP
--local-port arg local port
--server arg server URI
```### Run tests:
The project supports CTest.
## Sample config file
```xml
info
false
9180
ModuloRateLimiter
false
30
15
15
StaticLongTermAuthenticator
false
P@ssword!
example.com
true
true
3
user1
123456789
4
udp
3478
```