diff --git a/lib/shadowsocks/local.js b/lib/shadowsocks/local.js index 22131b4..2434353 100644 --- a/lib/shadowsocks/local.js +++ b/lib/shadowsocks/local.js @@ -64,7 +64,7 @@ createServer = function(serverAddr, serverPort, port, key, method, timeout, local_address) { var getServer, server, udpServer; if (local_address == null) { - local_address = null; + local_address = '127.0.0.1'; } udpServer = udpRelay.createServer(local_address, port, serverAddr, serverPort, key, method, timeout, true); getServer = function() { diff --git a/src/local.coffee b/src/local.coffee index b9ee4e8..ccc17db 100644 --- a/src/local.coffee +++ b/src/local.coffee @@ -46,7 +46,7 @@ inetAton = (ipStr) -> connections = 0 -createServer = (serverAddr, serverPort, port, key, method, timeout, local_address=null) -> +createServer = (serverAddr, serverPort, port, key, method, timeout, local_address='127.0.0.1') -> udpServer = udpRelay.createServer(local_address, port, serverAddr, serverPort, key, method, timeout, true)