Skip to content

Eventually a working RadSec Radius client for testing purposes

License

Notifications You must be signed in to change notification settings

vforteli/RadSec-Client

Repository files navigation

RadSecClient

Eventually a working RadSec Radius client for testing purposes

Usage

var dictionary = new RadiusDictionary(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\radius.dictionary");
var cert = new X509Certificate("clientCertificatePath", "certificatePassword");
var client = new RadSecClient(dictionary, cert);
var packet = new RadiusPacket(PacketCode.AccessRequest, 0, "xyzzy5461");
packet.AddAttribute("User-Name", "nemo");
packet.AddAttribute("User-Password", "arctangent");
packet.AddAttribute("NAS-IP-Address", IPAddress.Parse("192.168.1.16"));
packet.AddAttribute("NAS-Port", 3);
var responsePacket = await client.SendPacketAsync(packet, new IPEndPoint(IPAddress.Parse("127.0.0.1"), 2083));
Console.WriteLine(responsePacket.Code);

About

Eventually a working RadSec Radius client for testing purposes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages