Commit 7abae45a authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Removed a bit of logging

parent 6d85289a
...@@ -256,12 +256,10 @@ public class DNSTCPProxy extends DNSProxy{ ...@@ -256,12 +256,10 @@ public class DNSTCPProxy extends DNSProxy{
} }
private void sendPacketToUpstreamDNSServer(DatagramPacket outgoingPacket, IpPacket ipPacket){ private void sendPacketToUpstreamDNSServer(DatagramPacket outgoingPacket, IpPacket ipPacket){
LogFactory.writeMessage(vpnService, LOG_TAG,"Writing packet to upstream: " + outgoingPacket);
try{ try{
Socket socket = SocketChannel.open().socket(); Socket socket = SocketChannel.open().socket();
vpnService.protect(socket); //The sent packets shouldn't be handled by this class vpnService.protect(socket); //The sent packets shouldn't be handled by this class
outgoingPacket.setPort(upstreamServers.get(outgoingPacket.getAddress().getHostAddress())); outgoingPacket.setPort(upstreamServers.get(outgoingPacket.getAddress().getHostAddress()));
LogFactory.writeMessage(vpnService, LOG_TAG, "Connecting to " + outgoingPacket + "(PORT: " + outgoingPacket.getPort() + ")");
socket.connect(outgoingPacket.getSocketAddress(),timeout); socket.connect(outgoingPacket.getSocketAddress(),timeout);
byte[] data = ipPacket == null ? new byte[0] : outgoingPacket.getData(); byte[] data = ipPacket == null ? new byte[0] : outgoingPacket.getData();
DataOutputStream outputStream = new DataOutputStream(socket.getOutputStream()); DataOutputStream outputStream = new DataOutputStream(socket.getOutputStream());
...@@ -274,7 +272,6 @@ public class DNSTCPProxy extends DNSProxy{ ...@@ -274,7 +272,6 @@ public class DNSTCPProxy extends DNSProxy{
} }
}catch(IOException exception){ }catch(IOException exception){
if(!(exception instanceof SocketTimeoutException)){ if(!(exception instanceof SocketTimeoutException)){
LogFactory.writeStackTrace(vpnService, LOG_TAG, exception);
handleUpstreamDNSResponse(ipPacket, outgoingPacket.getData()); handleUpstreamDNSResponse(ipPacket, outgoingPacket.getData());
} }
} }
...@@ -288,7 +285,6 @@ public class DNSTCPProxy extends DNSProxy{ ...@@ -288,7 +285,6 @@ public class DNSTCPProxy extends DNSProxy{
handleUpstreamDNSResponse(parsedPacket, data); handleUpstreamDNSResponse(parsedPacket, data);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
LogFactory.writeStackTrace(vpnService, LOG_TAG, e);
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment