# stunturncheck

> Check WebRTC STUN and TURN connectivity

Latest version **1.0.2** (published 2014-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install stunturncheck
pnpm add stunturncheck
yarn add stunturncheck
bun add stunturncheck
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2014-08-12 |
| First published | 2014-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Philipp Hancke |
| Maintainers | fippo |
| Keywords | WebRTC, RTCPeerConnection |

## Links

- npm: https://www.npmjs.com/package/stunturncheck
- Repository: https://github.com/fippo/stunturncheck
- Issues: https://github.com/fippo/stunturncheck/issues
- npm.io page: https://npm.io/package/stunturncheck

## Dependencies (2)

- [webrtcsupport](https://npm.io/package/webrtcsupport.md) ^1.0.0
- [sdp-jingle-json](https://npm.io/package/sdp-jingle-json.md) 1.x

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2014-08-12
- 1.0.1 — 2014-08-01
- 1.0.0 — 2014-08-01
- 0.0.2 — 2014-03-17
- 0.0.1 — 2014-03-17

## README

# STUN and TURN check
Tests connectivity with a STUN or TURN server using WebRTC.

## How to use it

```js
var stunturncheck = require('stunturncheck');

stunturncheck({url: 'stun:stun.l.google.com:19302'}, function(err, res) { 
    if (err) {
        // some kind of error occurred
        return;
    }
    if (res > 0) {
        // a stun server could be reached and the local description
        // contains srflx (for stun) or relay (for turn) candidates.
    } else {
        // stun server could not be reached, port may be blocked.
    }
});
```
The first argument to stunturncheck follows the same convention as the 

To test a TURN/TCP server you would pass something along the lines of
```js
{url: 'turn:some.host:3478?transport=tcp', username: 'user', credential: 'secret'}
```
as first argument.

## License

MIT

## Credits
If you like this, follow: [@HCornFlower](http://twitter.com/hcornflower) on twitter.

---
_Source: https://npm.io/package/stunturncheck · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
