Git Product home page Git Product logo

vs-stun's People

Contributors

d-vova 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

Watchers

 avatar  avatar  avatar

vs-stun's Issues

use host property over address

currently, I have to do things like:

rinfo.host = rinfo.address;
responsePacket.append.mappedAddress(rinfo);
responsePacket.append.xorMappedAddress(rinfo);

If these functions took an object with the ip address as the host property of the argument object, I wouldn't need the first line. I suspect Node probably switched the name of these key value pairs at some point, but would make this lib's API nicer to work with. This is not a bug, just a small papercut.

failing to parse ipv6 addresses

I'm getting an error here: https://github.com/d-vova/vs-stun/blob/master/lib/attribute/address.js#L25-L26

It seems that the call to normalize: https://github.com/d-vova/vs-stun/blob/master/lib/attribute/address.js#L4

is not parsing ipv6 addresses correctly: https://github.com/d-vova/vs-stun/blob/master/lib/util.js#L20

does not match my ipv6 address of 2620:101:80fc:232:2acf:e9ff:fe1f:3939.

I'm wondering if https://nodejs.org/api/net.html#net_net_isip_input can be used instead?

problem when OTHER-ADDRESS is specified but times out

I love this library, but it is failing against the Coturn server (https://code.google.com/p/coturn/). Coturn is returning the OTHER-ADDRESS attribute in its initial response, which puts vs-stun into trying to map to OTHER-ADDRESS.

OTHER-ADDRESS in this case usually has a different port, but vs-stun sends its request to the new address but the old port. I don't know the STUN RFC inside and out, but I'm guessing that this line may be a bug:

var otser = { host: other.host, port: server.port }

In the normal case, the initial request and response are on port 3478, and the OTHER-ADDRESS is the same address but port 3479. The second request goes out to port 3478, and the second reply comes back from 3479, which will then get dropped or rejected by normal firewall rules. This causes vs-stun to timeout, saying that UDP is blocked, even though the initial binding response was fine.

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.