@Override public void onConnect(ConnectionSession session) { established = true; if (logLevel < LOG_DEBUG) { return; } String local = session.getLocalAddr() + ":" + session.getLocalPort(); String remote = session.getRemoteAddr() + ":" + session.getRemotePort(); if (reverse) { send = ", " + remote + " <= " + local; recv = ", " + remote + " => " + local; } else { send = ", " + local + " => " + remote; recv = ", " + local + " <= " + remote; } Log.d("Mux Connection Established" + (reverse ? recv : send)); }
@Override public void onConnect(ConnectionSession session) { established = true; if (logLevel < LOG_DEBUG) { return; } String local = session.getLocalAddr() + ":" + session.getLocalPort(); String remote = session.getRemoteAddr() + ":" + session.getRemotePort(); if (reverse) { send = ", " + local + " => " + remote; recv = ", " + local + " <= " + remote; } else { send = ", " + remote + " <= " + local; recv = ", " + remote + " => " + local; } Log.d("Mux Connection Established" + (reverse ? send : recv)); }
(session instanceof SSLConnectionSession ? MuxPacket.SESSION_SSL : 0)); System.arraycopy(localAddrBytes, 0, b, HEAD_SIZE + 1, localAddrBytes.length); Bytes.setShort(session.getLocalPort(), b, HEAD_SIZE + 1 + localAddrBytes.length); System.arraycopy(remoteAddrBytes, 0, b, HEAD_SIZE + 3 + localAddrBytes.length, localAddrBytes.length); return; String local = session.getLocalAddr() + ":" + session.getLocalPort(); String remote = session.getRemoteAddr() + ":" + session.getRemotePort(); send = ", " + remote + "<-" + local;
@Override public void onConnect(ConnectionSession session) { if (useClientMode) { host = session.getLocalAddr(); port = session.getLocalPort(); } else { host = session.getRemoteAddr(); port = session.getRemotePort(); } if (dumpFolder != null) { try { out = new PrintStream(getOutputStream(".txt"), true); outSent = getOutputStream("_sent.bin"); outRecv = getOutputStream("_recv.bin"); } catch (IOException e) { dumpFolder = null; } } printfln("[%s:%s Connected at %s]", host, "" + port, now()); // Dump Before Consume super.onConnect(session); }