• Stars
    star
    15
  • Rank 1,371,379 (Top 28 %)
  • Language
    Elixir
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RADIUS Protocol on Elixir

elixir-radius

CI Hex.pm version

RADIUS protocol encoding and decoding

Example

#wrapper of gen_udp
{:ok,sk} = Radius.listen 1812

loop = fn(loop)->
  #secret can be a string or a function returning a string
  #{:ok,host,p} = Radius.recv sk,"123"
  {:ok,host,p} = Radius.recv sk,fn(_host) -> secret end

  IO.puts "From #{inspect host} : \n#{inspect p, pretty: true}"

  resp = %Radius.Packet{code: "Access-Reject", id: p.id, secret: p.secret}
  Radius.send_reply(sk, host, resp, p.auth)

  loop.(loop)
end
loop.(loop)

Dictionary configuration

Vendor specific dictionaries are compiled into a specific vendor module. Generic attributes and values are compiled into Radius.Dict. If you add the "cisco" dictionary you will get the module Radius.Dict.VendorCisco.

config :elixir_radius,
  included_dictionaries: ["rfc2865", "rfc2868", "rfc2869", "cisco"]

NOTE: By default, this library will compile all known vendors, which is quite slow, but had maxium compatibility with old versions. If you dont need them, please use above config to select what to be compiled.

You can also add your own dictionaries by providing the paths to :elixir_radius in :extra_dictionaries

config :elixir_radius,
  extra_dictionaries: ["path_to_your_dictionary"]

Macros

Radius.Dict exposes a set of macro's so you can construct AVPs and let the compiler confirm the attributes and save time during runtime.

More Repositories

1

RustCat

Another cute running cat animation on your windows taskbar, without runtime dependency
Rust
47
star
2

elixir-docker

Docker API bindings in Elixir
Elixir
29
star
3

learning-android-cn

<learning android>็ฟป่ฏ‘้กน็›ฎ
PHP
8
star
4

elixir-etcd

Etcd client in Elixir
Elixir
7
star
5

pptp2http

A Dockerfile to convert PPTP VPNs to HTTP proxy with squid3
Shell
5
star
6

tunnel-manager

HTTP API to manage PPTP2HTTP tunnels
Haskell
4
star
7

tdsrelay

tdsrelay is a MSSQL Server TDS Protocol Man-In-Middle attack tool with tproxy support
C
3
star
8

ffapicon

Fanfou API Console
JavaScript
2
star
9

ffapn

The missing push support for fanfou.com
CoffeeScript
2
star
10

node-etcd-promise

CoffeeScript
2
star
11

python-mmseg

Libmmseg for python
C++
2
star
12

ec2-ipam

An docker ipam driver for ec2 based ipvlan networks
CoffeeScript
2
star
13

daikon

Daikon is an agent keep watching docker server and sync instance information into etcd
CoffeeScript
2
star
14

Kinode

Nodejs librarys that runs on top of Amazon Kindle
C++
2
star
15

tiny_mcu

A tiny little 16bit risc mcu and other things, just my verilog playground
Verilog
1
star
16

OpenRACE_FW

Controller FW for open source KBT RACE I controller PCB: https://oshwhub.com/bearice/race-ctrl
C
1
star
17

cat-daily

ใ€Šๆฏๆ—ฅไธ€็Œซใ€‹ๅˆ่ฎขๆœฌ
Rust
1
star
18

redproxy

tproxy to HTTPS/Socks5
TypeScript
1
star
19

kumachan

Tiny web server
Erlang
1
star
20

kindleify.sh

A shell script helps converting kindle friendly manga
Shell
1
star
21

pping

large scale icmp pings
C
1
star
22

node-ws

Yet another dirty Web Socket implementation
1
star