shadowsocks / shadowsocks-nodejs

https://github.com/shadowsocks/shadowsocks
Other
1.25k stars 724 forks source link

remotePort get 0 some time #114

Closed chunpu closed 10 years ago

chunpu commented 10 years ago

hi:

https://github.com/clowwindy/shadowsocks-nodejs/blob/master/lib/shadowsocks/server.js#L186

I sometime find in this line, remotePort get several value = 0, so it will crash, is there some way to avoid the problem? Thanks so much

error msg:

net.js:837
      throw new RangeError('Port should be > 0 and < 65536');
            ^
RangeError: Port should be > 0 and < 65536
    at connect (net.js:837:13)
    at net.js:934:9
    at Object.asyncCallback [as callback] (dns.js:78:16)
    at Object.onlookup [as oncomplete] (dns.js:94:10)
clowwindy commented 10 years ago

Node.js itself is buggy. Use Python version instead. https://github.com/clowwindy/shadowsocks