This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
radiusdesk:radius_clients:disconnect [2023/01/03 08:01] admin [Mikrotik] |
radiusdesk:radius_clients:disconnect [2023/01/03 08:25] (current) admin |
||
|---|---|---|---|
| Line 43: | Line 43: | ||
| * You can select and disconnect listed users in those sub-tabs. | * You can select and disconnect listed users in those sub-tabs. | ||
| {{: | {{: | ||
| + | |||
| + | ===== Add Support for additional types ===== | ||
| + | * This section is a technical section for those who wants to introduce new RADIUS Client types. | ||
| + | * The list in the drop-down is specified in the following file: /// | ||
| + | <code php> | ||
| + | //Define nas types | ||
| + | $config[' | ||
| + | $config[' | ||
| + | $config[' | ||
| + | </ | ||
| + | * Then when selecting an active user in **Activity Monitor** to disconnect behind the scenes the code will determine the type of RADIUS | ||
| + | * This all happens inside the /// | ||
| + | * Thus adding support for additional types will involve adding additional sections to the PHP code. | ||
| + | * See the snippet below. | ||
| + | <code php> | ||
| + | //First we try to locate the client under dynamic_clients | ||
| + | $dc = $this-> | ||
| + | -> | ||
| + | -> | ||
| + | -> | ||
| + | |||
| + | if($dc){ | ||
| + | // | ||
| + | if($dc-> | ||
| + | |||
| + | //We have a convention of nasidentifier for meshdesk => mcp_< | ||
| + | if(preg_match('/ | ||
| + | $this-> | ||
| + | } | ||
| + | |||
| + | if(preg_match('/ | ||
| + | $this-> | ||
| + | } | ||
| + | sleep(1); //Give MQTT time to do its thing.... | ||
| + | } | ||
| + | |||
| + | // | ||
| + | |||
| + | </ | ||
| + | * That's the only things involved in disconnecting an active RADIUS user. | ||
| + | * The FUP implementation also utilizes this mechanism so this also serve as a core component for the FUP implementation to be successful. | ||
| + | |||