indutny / node-nat-upnp

NAT port mapping via UPnP
147 stars 59 forks source link

portMapping only accepts Number ports, not String #25

Closed pietrovismara closed 8 years ago

pietrovismara commented 8 years ago

This subtle difference made me waste several hours on debug. This is working:

natUpnpClient.portMapping({
    public: 50000,
    private: 50000,
    ttl: 0
});

This returns me errorCode 501 ActionFailed:

natUpnpClient.portMapping({
    public: "50000",
    private: "50000",
    ttl: 0
});

If ports are strings forwarding doesn't work.

Please fix or at least document it, thank you

indutny commented 8 years ago

Hello!

Thank you so much for raising this. Unfortunately, I'm buried in lots of things right now. I'll be really glad if you or anyone else could help me in resolving this.

Thanks again, Fedor.

pietrovismara commented 8 years ago

Ok, i think i can use some time this weekend to try to fix it, it looks like an easy fix. Wait for a pull request :)