indutny / node-nat-upnp

NAT port mapping via UPnP
147 stars 59 forks source link

add support for indefinite leases on port mapping #7

Closed lilyannehall closed 10 years ago

lilyannehall commented 10 years ago

Some routers - namely mine - do not support temporary leases. So, after a bit of research into UPNP, I discovered that you can request an indefinite lease by supplying the value ui4 as the NewLeaseDuration parameter - which I have no idea why or what that value even means.

So, now if you supply Infinity as the ttl value on portMapping(), you will request an indefinite lease.

indutny commented 10 years ago

LGTM!

indutny commented 10 years ago

Thank you!

indutny commented 10 years ago

Released in 0.2.11

lilyannehall commented 10 years ago

awesome! thank you!