From e33cf5dc17f76054c13e5fa4e0fe99358a578134 Mon Sep 17 00:00:00 2001 From: Balint Kovacs Date: Thu, 21 Apr 2011 07:26:35 +0200 Subject: [PATCH] Make sure the server socket only listens on localhost Signed-off-by: Balint Kovacs --- src/hu/blint/ssldroid/TcpProxy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hu/blint/ssldroid/TcpProxy.java b/src/hu/blint/ssldroid/TcpProxy.java index 66baddf..9dedb34 100644 --- a/src/hu/blint/ssldroid/TcpProxy.java +++ b/src/hu/blint/ssldroid/TcpProxy.java @@ -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) {