Crates.io | radius |
lib.rs | radius |
version | 0.4.0 |
source | src |
created_at | 2020-12-12 04:44:45.006706 |
updated_at | 2024-01-15 09:02:59.261251 |
description | An async/await native implementation of the RADIUS server and client for Rust. |
homepage | https://github.com/moznion/radius-rs |
repository | https://github.com/moznion/radius-rs |
max_upload_size | |
id | 322075 |
size | 325,229 |
An async/await native implementation of the RADIUS server and client for Rust. And this also can be used for parsing/constructing (i.e. decoding/encoding) purposes as a RADIUS library.
This RADIUS server and client implementation use tokio to support asynchronous operations natively. This implementation satisfies basic functions that are described in RFC2865.
Simple example implementations are here:
Those examples implement a quite simple Access-Request
processor. You can try those with the following commands.
$ RUST_LOG=debug cargo run --example server
$ RUST_LOG=debug cargo run --example client # in another shell
This supports the following RFC dictionaries at the moment:
Packet
struct represents request packet and response one.
rfc2865::lookup_user_name(packet)
Some(Result<String, AVPError>)
if the packet contains User-Name
attribute.None
.rfc2865::add_user_name(&mut packet, "user")
User-Name
AVP to the packet.RequestHandler<T, E>
interface.
$ make gen
code-generator
sub project has the responsibility to generate the Rust code according to
given RFC dictionary files. The dictionary files are in dicts
directory.
The format of the dictionary files respect the FreeRADIUS project's ones.
The original implementation and design of this are inspired by layeh/radius.
moznion (moznion@gmail.com)