From 0c789ea458ed95c5878eb8afdd10b246f48c03cf Mon Sep 17 00:00:00 2001 From: clowwindy Date: Sun, 13 Apr 2014 15:29:20 +0800 Subject: [PATCH] change default local binding to 127.0.0.1 --- lib/shadowsocks/local.js | 2 +- src/local.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)