vforteli / Flexinets.Radius.RadiusServer

Radius server for .Net. Packets handled in pluggable IPacketHandlers
MIT License
45 stars 22 forks source link

Add/remove IPs dynamically #8

Closed JoshClose closed 6 years ago

JoshClose commented 6 years ago

I need a way to modify the list of IPs that are being watched while the server is running. I don't think this is currently possible.

I was thinking that there could be a handler for checking if an IP address is valid. It could just return a bool for accept or reject. Ideally I could just hit my own cache to get the list of valid IPs instead of the internal one. I'll be using a Redis server I think. I think I just need to implement HandlePacket on my own.

If I'm venturing too far off your vision of this project, I can always write this myself, or even submit a pull request if you want. This library (not including the other 2) is pretty manageable.

JoshClose commented 6 years ago

Also, just looking for your advice on this as you've used this in production more than I have.

vforteli commented 6 years ago

This is something that I have intended to implement, but havent gotten around to yet. I think the best option would be to just create an interface for the packet handler lookup. Then it would be easier to for example load the configuration from a db.

vforteli commented 6 years ago

Something like this maybe https://github.com/vforteli/Flexinets.Radius.RadiusServer/commit/3001583459ad421821df24d82f5b5340d66ef399

JoshClose commented 6 years ago

I thought I replied 5 days ago... apparently not. lol I think that should work for me.

vforteli commented 6 years ago

Well I am in no rush :) It is merged now and the package is updated on nuget