Make sure the server socket only listens on localhost

Signed-off-by: Balint Kovacs <blint@blint.hu>
This commit is contained in:
Balint Kovacs 2011-04-21 07:26:35 +02:00
parent f83d37f2ca
commit e33cf5dc17
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package hu.blint.ssldroid;
import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import android.util.Log;
@ -27,7 +28,7 @@ public class TcpProxy {
public void serve() throws IOException {
try {
ss = new ServerSocket(listenPort);
ss = new ServerSocket(listenPort, 50, InetAddress.getLocalHost());
Log.d("SSLDroid", "Listening for connections on port "
+ this.listenPort + " ...");
} catch (Exception e) {