Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A zero dependency STUN server

License

NotificationsYou must be signed in to change notification settings

noahlevenson/ministun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit tests

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.

Requirements

Node.js >= 12.14.0

Installation

npm i ministun

Usage

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();}

Configuration

  • udp4:bool (Default:true)
    Support UDP over IPv4?

  • udp6:bool (Default:true)
    Support UDP over IPv6?

  • port:number (Default:3478)
    Port number

  • log:function || null (Default:console.log)
    Log messages will be passed to this function as arg 0, null = no message logging

  • err:function || null (Default:console.err)
    Error messages will be passed to this function as arg 0, null = no error logging

  • sw:bool (Default:true)
    Send the SOFTWARE attribute with response messages?

TODO

Better test coverage


[8]ページ先頭

©2009-2025 Movatter.jp