GithubHelp home page GithubHelp logo

node-turn's People

Contributors

atiertant avatar johnmclear avatar kakaroto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-turn's Issues

TURN server failing after a minute

I managed to finally get my AT&T cellphone connection to connect to my wifi through simple peer using node-turn. Sadly, it seems after a minute or so the connection failed. This is what consistently shows in the log:

relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273 relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273 relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273 relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273 Receiving UDP: from IPV4://166.177.121.0:12273 to IPV4://shrek.best:3478 refresh request TransactionID: 2b7569575a2b355632304b57 lifetime: 0 username: user realm: shrek.best nonce: 16f6398d044aba5381cedde7309fdb4c message-integrity: ee8f931a1dc5899d1e5c414e5ce2502e0cf93fb1 Sending UDP: from IPV4://shrek.best:3478 to IPV4://166.177.121.0:12273 refresh success TransactionID: 2b7569575a2b355632304b57 lifetime: 0 software: node-turn message-integrity: d12e0880dcd3dfe7ca37541f20cd02076b20f1e9 relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273 relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273 relaying data fromIPV4://97.121.170.121:60183 over channelNumber 16387 to IPV4://166.177.121.0:12273

Any insight? Here is my configuration
var turn = new Turn({ // set options listeningIps : ['shrek.best'], authMech: 'long-term', credentials: { user: 'pass', }, defaultAllocatetLifetime : 600000, maxAllocateLifetime : 600000, debugLevel : 'ALL', realm : 'shrek.best', });

does this turn server run on windows?

Hi
i was using free turn server and video call was working fine
then i have install this turn server on windows and run the cmd without error and it show node turn start and node start
but no video call can made
connection.iceServers.push({
url: 'turn:publicip:port',
credential: '',
username: ''
i did not set any username or password

RangeError [ERR_INVALID_OPT_VALUE]

RangeError [ERR_INVALID_OPT_VALUE]: The value "-507861878" is invalid for option "value".

It's make when i set listeningIps 192.168.0.200.

Config:

var Turn = require('node-turn');
var server = new Turn({
  // set options
  authMech: 'none',
  listeningIps: ["127.0.0.1", "192.168.0.200"],
});
server.start();

Log (added here: https://github.com/Atlantis-Software/node-turn/blob/master/lib/attribute.js#L352 )

attribute this.value address { family: 1, address: '192.168.0.200', port: 48551 }
attribute this.msg.magicCookie 554869826
attribute xorAddress  -507861878
buffer.js:1274
    throw new errors.RangeError('ERR_INVALID_OPT_VALUE', 'value', value);
    ^

Doesn't run on Windows10

When I do, server.start();, I got the below error. It looks like node-turn found three IP addresses as listeningIps. One of them is "::1". It looks like node-turn is trying to bind 3478 port number onto the "::1" address and failed. Please help me on this?

This happens right after the below line at 19 in network.js.
const udpSocket = dgram.createSocket('udp4');

Error: bind EINVAL ::1:3478
address: "::1"
code: "EINVAL"
errno: "EINVAL"
message: "bind EINVAL ::1:3478"
port: 3478
stack: "Error: bind EINVAL ::1:3478
at state.handle.lookup (dgram.js:301:18)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:56:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:880:11)
at internal/main/run_main_module.js:21:11"
syscall: "bind"
proto: Object {constructor: , name: "Error", message: "", …}

In the node-turn instance, listningIps: Array(3) ["10.243.22.33", "::1", "127,0,0,1"]

turn client

I am looking for a similar library for building turn client side : which would let me create allocations, permissions and communication with peer

can node-turn be used to build clients ?
if not, any recommendation ?

configuration for server behind NAT - please help

I am running turn server as nodejs library.

this my current TURN options

server = new Turn({
      // set options
      authMech: 'long-term',
      credentials: {
        username: "password"
      },
      debugLevel: "ALL"
      listeningPort: port
    });

I am getting this output
Server is listening on 127.0.0.1:9660
Server is listening on ::1:9660
Server is listening on 172.17.28.34:9660

I want server to listen to public IP, what should be my TURN options?

Please help

Please provide step by step installation guide on WINDOWS.
Because some command is not working on windows or did not know the equivalent command on windows .

Thank you!

Support tcp turn

Hi!

As you know, some network doesn't support or drop UDP packet forcely. At that time we need tcp turn server.

Is there any plan to support tcp turn relay server?

mobile browser disconnect video

i used to TURN server with long-term authentication but when i start conference with mobile browser,
video are closed after about 40 second ?

Servers are not opening up in default as well as port 80

Port 80

{ Error: bind EINVAL ::1:80
at state.handle.lookup (dgram.js:242:18)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
errno: 'EINVAL',
code: 'EINVAL',
syscall: 'bind',
address: '::1',
port: 80 }
{ Error: bind EINVAL fe80::24cf:241b:39c1:4cee:80
at state.handle.lookup (dgram.js:242:18)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
errno: 'EINVAL',
code: 'EINVAL',
syscall: 'bind',
address: 'fe80::24cf:241b:39c1:4cee',
port: 80 }

// Default Port

{ Error: bind EINVAL ::1:3478
at state.handle.lookup (dgram.js:242:18)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
errno: 'EINVAL',
code: 'EINVAL',
syscall: 'bind',
address: '::1',
port: 3478 }
{ Error: bind EINVAL fe80::24cf:241b:39c1:4cee:3478
at state.handle.lookup (dgram.js:242:18)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
errno: 'EINVAL',
code: 'EINVAL',
syscall: 'bind',
address: 'fe80::24cf:241b:39c1:4cee',
port: 3478 }

permission fail

Hi

[2022.08.23 20:04:26.537] [0077] DEBUG Receiving
[2022.08.23 20:04:26.538] [0033] TRACE relaying data from transactionID 70645332662f724254316f61 to IPV4://x.x.x.x:52983
[2022.08.23 20:04:26.591] [0077] DEBUG Receiving
[2022.08.23 20:04:26.591] [0033] TRACE relaying data from transactionID 472f76575569542b34744774 to IPV4://y.y.y.y:52983
[2022.08.23 20:04:26.639] [0077] DEBUG Receiving
[2022.08.23 20:04:26.640] [0033] TRACE relaying data from transactionID 2f546b56597239494650795a to IPV4://s.s.s.s:63111
[2022.08.23 20:04:26.640] [0035] TRACE permission fail for IPV4://s.s.s.s:59123 at s.s.s.s:63111
...

RTCIceConnectionStateFailed

please help me.
what should I do?

Does not node-turn work on Windows?

When I npm run start, the following logs are output.

[2018-05-06T00:51:38.119] [FATAL] DESKTOP-K8LVLHP - { Error: bind EINVAL fe80::c917:20d5:12d3:3771:3478
    at _handle.lookup (dgram.js:266:18)
    at process._tickCallback (internal/process/next_tick.js:114:19)
    at Function.Module.runMain (module.js:692:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:666:3
  errno: 'EINVAL',
  code: 'EINVAL',
  syscall: 'bind',
  address: 'fe80::c917:20d5:12d3:3771',
  port: 3478 }
[2018-05-06T00:51:38.125] [FATAL] DESKTOP-K8LVLHP - { Error: bind EINVAL ::1:3478
    at _handle.lookup (dgram.js:266:18)
    at process._tickCallback (internal/process/next_tick.js:114:19)
    at Function.Module.runMain (module.js:692:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:666:3
  errno: 'EINVAL',
  code: 'EINVAL',
  syscall: 'bind',
  address: '::1',
  port: 3478 }
[2018-05-06T00:51:38.129] [FATAL] DESKTOP-K8LVLHP - { Error: bind EINVAL 2001:0:9d38:6abd:1810:14be:c4f9:772f:3478
    at _handle.lookup (dgram.js:266:18)
    at process._tickCallback (internal/process/next_tick.js:114:19)
    at Function.Module.runMain (module.js:692:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:666:3
  errno: 'EINVAL',
  code: 'EINVAL',
  syscall: 'bind',
  address: '2001:0:9d38:6abd:1810:14be:c4f9:772f',
  port: 3478 }
[2018-05-06T00:51:38.130] [FATAL] DESKTOP-K8LVLHP - { Error: bind EINVAL fe80::1810:14be:c4f9:772f:3478
    at _handle.lookup (dgram.js:266:18)
    at process._tickCallback (internal/process/next_tick.js:114:19)
    at Function.Module.runMain (module.js:692:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:666:3
  errno: 'EINVAL',
  code: 'EINVAL',
  syscall: 'bind',
  address: 'fe80::1810:14be:c4f9:772f',
  port: 3478 }

Does not node-turn work on Windows?

turn server relay faild.

This is node server's-123.56.177.185:3478 ips:

本地候选 远程候选 组件 ID ICE 统计 优先级 已提名 已选定 已发送字节 已接收字节
192.168.126.1:62720/udp(host) 192.168.1.103:34856/udp(host) 1 inprogress 9115005270282338000 false false 0 0
192.168.0.19:62719/udp(host) 192.168.1.103:34856/udp(host) 1 inprogress 9114723795305628000 false false 0 0
192.168.74.1:62721/udp(host) 192.168.1.103:34856/udp(host) 1 inprogress 9114442320328917000 false false 0 0
192.168.126.1:52265/tcp(host) 192.168.1.103:64901/tcp(host) 1 inprogress 9043088413699310000 false false 0 0
192.168.0.19:60684/tcp(host) 192.168.1.103:64901/tcp(host) 1 inprogress 9042877307466744000 false false 0 0
192.168.74.1:53738/tcp(host) 192.168.1.103:64901/tcp(host) 1 inprogress 9042595832490033000 false false 0 0
192.168.126.1:62720/udp(host) 124.202.206.114:34856/udp(serverreflexive) 1 inprogress 7241541910156673000 false false 0 0
192.168.0.19:62719/udp(host) 124.202.206.114:34856/udp(serverreflexive) 1 inprogress 7241541910156542000 false false 0 0
192.168.74.1:62721/udp(host) 124.202.206.114:34856/udp(serverreflexive) 1 inprogress 7241541910156411000 false false 0 0

This is coturn(a open source turn server)-59.110.15.178:3478 ips:

本地候选 远程候选 组件 ID ICE 统计 优先级 已提名 已选定 已发送字节 已接收字节
59.110.15.178:60849/udp(relayed-udp) 124.202.206.114:35595/udp(serverreflexive) 1 succeeded 395787901192781800 true true 998359 1953085
192.168.126.1:62512/udp(host) 192.168.1.103:35595/udp(host) 1 failed 9115005270282338000 false false 0 0
192.168.0.19:62511/udp(host) 192.168.1.103:35595/udp(host) 1 failed 9114723795305628000 false false 0 0
192.168.74.1:62513/udp(host) 192.168.1.103:35595/udp(host) 1 failed 9114442320328917000 false false 0 0
192.168.126.1:51758/tcp(host) 192.168.1.103:55579/tcp(host) 1 failed 9043088413699310000 false false 0 0
192.168.0.19:54307/tcp(host) 192.168.1.103:55579/tcp(host) 1 failed 9042877307466744000 false false 0 0
192.168.74.1:61332/tcp(host) 192.168.1.103:55579/tcp(host) 1 failed 9042595832490033000 false false 0 0
192.168.126.1:62512/udp(host) 124.202.206.114:35595/udp(serverreflexive) 1 failed 7241541910156673000 false false 0 0
192.168.0.19:62511/udp(host) 124.202.206.114:35595/udp(serverreflexive) 1 failed 7241541910156542000 false false 0 0
192.168.74.1:62513/udp(host) 124.202.206.114:35595/udp(serverreflexive) 1 failed 7241541910156411000 false false 0 0
59.110.15.178:60849/udp(relayed-udp) 192.168.1.103:35595/udp(host) 1 failed 395787902065181200 false false 0 0

Unsuccessful using Node-turn as a library

Hi, the turn server is working with the standalone approach. However, the library approach is not working. I slightly modified the sample code provided in the README. Here's my code

var Turn = require('node-turn');
var server = new Turn({
// set options
authMech: 'long-term',
credentials: {
username: "password"
}
});
console.log('Attempting to start TURN server...');

server.start(() => {
console.log('TURN server started');
});

The output only shows "Attempting to start TURN server..." and then it hangs

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.