/Flexinets.Radius.RadiusServer

Radius server for .Net. Packets handled in pluggable IPacketHandlers

Primary LanguageC#MIT LicenseMIT

RadiusServer library for .Net.

This project can be used to create a Radius server in for example a Windows Service.

Packets are handled in multiple threads without running several instances. This can be useful when packet handlers do something slow, like lookups from external dependencies.

Pluggable packet handlers for different remote IPs. Conditionally compliant with RFCs
https://tools.ietf.org/html/rfc2865
https://tools.ietf.org/html/rfc2866
https://tools.ietf.org/html/rfc5997

Build status

RadiusServer usage

See https://github.com/vforteli/RadiusServerService/tree/Base for an example implementation

var path = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory) + "\\radius.dictionary";
var dictionary = new RadiusDictionary(path);
var authenticationServer = new RadiusServer(new IPEndPoint(IPAddress.Any, 1812), dictionary, RadiusServerType.Authentication);                
var packetHandler = new TestPacketHandler();
authenticationServer.AddPacketHandler(IPAddress.Parse("127.0.0.1"), "secret", packetHandler);
authenticationServer.Start();

The packet handler should implement IPacketHandler

https://www.nuget.org/packages/Flexinets.Radius.RadiusServer/