MikhailMS/rust-radius

multiple dictionary from freeradius

rjjrbatarao opened this issue · 6 comments

any idea how to use multiple dictionary files on the server

@rjjrbatarao Hi there,

Would you be able to expand on this one? In my team we use just 1 dict file, so it is simple

Do you only mean a support for supplying multiple dictionary files? (in which case internally it would collide all dict files into 1 big Dictionary struct) or something else, ie actually having multiple Dictionary structs for a server?

yes multiple dictionaries were used on our current golang radius we thought of migrating to rust your library was our candidate unfortunately we cant use multiple dictionaries like in golang radius, is it possible to implement like server.add_dictionary("/huawei.dict"); server.add_dictionary("/mikrotik.dict"); like in the golang implementation?

haven't worked with Golang library, but if it then just single instance of Dictionary under the hood, then it could be implemented

Out of curiosity, while I am looking into the implementation options: is it the only thing that stops you from adopting this library or you haven't tried it in full yet? :)

Yes I haven't tried it yet, I was browsing the examples and It seems it only support single dictionary file. Does it support sending custom attributes? then its another way around to using custom dictionaries

Hello there @raddifytech

I've pushed updated code to new branch - the way it works is you create Dictionary instance via from_file and then call add_file with any extra dict files you have

Then supply that Dictionary instance to server and it should all work :)

You should be able to add that specific branch into your cargo.toml to experiment with
Let me know if that works for your use-case and if so I can make a new release with this feature added (otherwise I am open to further discussing this feature ofc)

Hi @MikhailMS I saw the implementation, I will try this on my end thank you.