- Notifications
You must be signed in to change notification settings - Fork3
A zero dependency STUN server
License
noahlevenson/ministun
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
STUN (Session Traversal Utilities for NAT) is a simple protocol. A STUN implementation should be simple too.
ministun is azero dependency STUN server for Node.js. It implements "Basic Server Behavior" as defined bysection 13 ofRFC 5389, including backwards compatibility withRFC 3489.
Node.js >= 12.14.0
npm i ministun
constMinistun=require("ministun");constconfig={udp4:true,udp6:true,port:3478,log:console.log,err:console.err,sw:true};constserver=newMinistun(config);asyncfunctionstartServer(){awaitserver.start();}asyncfunctionstopServer(){awaitserver.stop();}
udp4:bool (Default:
true
)
Support UDP over IPv4?udp6:bool (Default:
true
)
Support UDP over IPv6?port:number (Default:
3478
)
Port numberlog:function || null (Default:
console.log
)
Log messages will be passed to this function as arg 0, null = no message loggingerr:function || null (Default:
console.err
)
Error messages will be passed to this function as arg 0, null = no error loggingsw:bool (Default:
true
)
Send the SOFTWARE attribute with response messages?
Better test coverage
About
A zero dependency STUN server