2024-01-07 03:57:21 +02:00
|
|
|
stund
|
|
|
|
=====
|
|
|
|
|
|
|
|
A minimal asynchronous STUN server implementation.
|
|
|
|
|
|
|
|
The server implements the minimal necessary functionality from
|
|
|
|
[RFC 8489](https://datatracker.ietf.org/doc/html/rfc8489), namely
|
|
|
|
the Binding Request.
|
|
|
|
|
2024-01-07 04:01:01 +02:00
|
|
|
The server is both IPv6 and IPv4 capable as well as operating in both TCP/UDP modes.
|
|
|
|
When listening on IPv6 address, the server is capable of handling IPv6/IPv4 clients.
|
2024-01-07 03:57:21 +02:00
|
|
|
|
|
|
|
Running
|
|
|
|
-------
|
|
|
|
|
|
|
|
To try out the server, just run:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ cargo run
|
|
|
|
```
|
|
|
|
|
2024-01-07 04:01:01 +02:00
|
|
|
By default, the server will receive requests from any network hosts using IPv6,
|
|
|
|
this can be adjusted by adding a `--no-ipv4` option to disable IPv6 or manually
|
|
|
|
specifying the `host:port` pair to listen on:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ cargo run -- 127.0.0.1:3478
|
|
|
|
```
|
|
|
|
|
2024-01-07 03:57:21 +02:00
|
|
|
Testing
|
|
|
|
-------
|
|
|
|
|
|
|
|
To verify the server functions properly, the following tools may be used:
|
|
|
|
|
|
|
|
* [Trickle ICE tester from WebRTC github samples](https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/)
|
|
|
|
* [IceTest.Info](https://icetest.info/)
|
|
|
|
* `stunclient` package from [stunprotocol.org](stunprotocol.org).
|
|
|
|
*Note: the server will report an error due to stunclient sending additional attributes not
|
|
|
|
recognized by this implementation*
|
2024-01-07 04:14:39 +02:00
|
|
|
|
2024-01-07 04:15:04 +02:00
|
|
|
Testings results are also recorded as Wireshark captures and are found in the `pcaps` directory.
|