Lua script context API - RADIUS Proxy sub-context
radiusproxy
RADIUS proxy request/response data.
Fields
| Field | Type | Description |
|---|---|---|
request | packet | Proxy request packet |
reply | packet | Proxy reply packet |
server | server? | Proxy server info |
Server Object
| Field | Type | Description |
|---|---|---|
name | string | Proxy server name |
tls | boolean | Is TLS connection? |
Packet Methods
The packet methods are identical to radius packets:
| Method | Parameters | Returns | Description |
|---|---|---|---|
attr(name, tag?) | attribute name, optional tag | value? | Get first attribute value |
attr_last(name, tag?) | attribute name, optional tag | value? | Get last attribute value |
attr_all(name, tag?) | attribute name, optional tag | values? | Get all attribute values |
attrs() | - | table | Get all attributes as table |
append_attr(name, tag?, value) | name, tag, value | - | Append attribute (reply only) |
append_attrs(name, tag?, values) | name, tag, values | - | Append multiple values (reply only) |
set_attr(name, tag?, value) | name, tag, value | - | Set attribute if not exists (reply only) |
set_attrs(name, tag?, values) | name, tag, values | - | Set multiple values (reply only) |