Giter Site home page Giter Site logo

Comments (5)

reigelgallarde avatar reigelgallarde commented on July 29, 2024 2

It took me a while, but I've found the answer to my question.
For the benefit of those who are looking for the same, I'm putting this simple code.

var radius = require('radius');
var dgram = require("dgram");
var server = dgram.createSocket("udp4");
var encoded = radius.encode({
    code: 'Disconnect-Request',
    secret: 'testing123',
    attributes: [
        ['User-Name', 'test-user'],
    ]
});

server.on('listening', () => {
    server.send(encoded, 0, encoded.length, '3799', '127.0.0.1', (err, bytes) => {
        if (err) {
            console.log('Error sending response to ');
            console.log(err);
        }
        console.log(bytes);
        server.close();
    });
});

server.bind({
  address: '127.0.0.1',
  port: 1812
});

encoded above is the minimal packet that needs to be sent to CoovaChilli.
With this the device with a username test-user will get disconnected.

from node-radius.

psanford avatar psanford commented on July 29, 2024

I'm not familiar with the CoA workflow. I assume you are talking about RFC5176?

Based on a cursory skim of that RFC it looks like it uses pretty normal radius payloads. node-radius already has definitions in its code map for CoA-Request, CoA-ACK and CoA-NAK. If it doesn't work today the changes required to support it would probably be fairly minimal.

Unfortunately, since I'm not familiar with CoA I'm afraid I'm not going to be of much help providing a working example. I would suggest reading through the relevant sections of RFC5176 and then examining a packet capture of an existing working system sending CoA messages.

from node-radius.

lirantal avatar lirantal commented on July 29, 2024

thanks for sharing @reigelgallarde

from node-radius.

reigelgallarde avatar reigelgallarde commented on July 29, 2024

hello @lirantal, Are you in some way doing the same or have a project like this?
If you have a github of it, I would love to check it out. Or I might be of help in some parts.

Regards!

from node-radius.

lirantal avatar lirantal commented on July 29, 2024

Not really. I'm silently following along but not maintaining daloradius anymore.

from node-radius.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.