/** * Sends an HTTP request. * * @param nextFilter the next filter * @param request the request to write * @throws ProxyAuthException If we get an error during the proxy authentication */ protected void writeRequest(final NextFilter nextFilter, final HttpProxyRequest request) throws ProxyAuthException { logger.debug(" sending HTTP request"); ((AbstractHttpLogicHandler) proxyIoSession.getHandler()).writeRequest(nextFilter, request); }
/** * Sends an HTTP request. * * @param nextFilter the next filter * @param request the request to write * @throws ProxyAuthException If we get an error during the proxy authentication */ protected void writeRequest(final NextFilter nextFilter, final HttpProxyRequest request) throws ProxyAuthException { logger.debug(" sending HTTP request"); ((AbstractHttpLogicHandler) proxyIoSession.getHandler()).writeRequest(nextFilter, request); }
/** * Sends an HTTP request. * * @param nextFilter the next filter * @param request the request to write * @throws ProxyAuthException */ protected void writeRequest(final NextFilter nextFilter, final HttpProxyRequest request) throws ProxyAuthException { logger.debug(" sending HTTP request"); ((AbstractHttpLogicHandler) proxyIoSession.getHandler()).writeRequest( nextFilter, request); }
/** * Get the {@link ProxyLogicHandler} for a given session. * * @param session the session object * @return the handler which will handle handshaking with the proxy */ private ProxyLogicHandler getProxyHandler(final IoSession session) { ProxyLogicHandler handler = ((ProxyIoSession) session.getAttribute(ProxyIoSession.PROXY_SESSION)).getHandler(); if (handler == null) { throw new IllegalStateException(); } // Sanity check if (handler.getProxyIoSession().getProxyFilter() != this) { throw new IllegalArgumentException("Not managed by this filter."); } return handler; }
/** * Get the {@link ProxyLogicHandler} for a given session. * * @param session the session object * @return the handler which will handle handshaking with the proxy */ private ProxyLogicHandler getProxyHandler(final IoSession session) { ProxyLogicHandler handler = ((ProxyIoSession) session.getAttribute(ProxyIoSession.PROXY_SESSION)).getHandler(); if (handler == null) { throw new IllegalStateException(); } // Sanity check if (handler.getProxyIoSession().getProxyFilter() != this) { throw new IllegalArgumentException("Not managed by this filter."); } return handler; }
/** * Get the {@link ProxyLogicHandler} for a given session. * * @param session the session object * @return the handler which will handle handshaking with the proxy */ private ProxyLogicHandler getProxyHandler(final IoSession session) { ProxyLogicHandler handler = ((ProxyIoSession) session .getAttribute(ProxyIoSession.PROXY_SESSION)).getHandler(); if (handler == null) { throw new IllegalStateException(); } // Sanity check if (handler.getProxyIoSession().getProxyFilter() != this) { throw new IllegalArgumentException("Not managed by this filter."); } return handler; }
/** * Hooked session opened event. * * @param session the io session */ @Override public final void sessionOpened(IoSession session) throws Exception { ProxyIoSession proxyIoSession = (ProxyIoSession) session.getAttribute(ProxyIoSession.PROXY_SESSION); if (proxyIoSession.getRequest() instanceof SocksProxyRequest || proxyIoSession.isAuthenticationFailed() || proxyIoSession.getHandler().isHandshakeComplete()) { proxySessionOpened(session); } else { logger.debug("Filtered session opened event !"); } } }
/** * Hooked session opened event. * * @param session the io session */ @Override public final void sessionOpened(IoSession session) throws Exception { ProxyIoSession proxyIoSession = (ProxyIoSession) session.getAttribute(ProxyIoSession.PROXY_SESSION); if (proxyIoSession.getRequest() instanceof SocksProxyRequest || proxyIoSession.isAuthenticationFailed() || proxyIoSession.getHandler().isHandshakeComplete()) { proxySessionOpened(session); } else { logger.debug("Filtered session opened event !"); } } }
/** * Hooked session opened event. * * @param session the io session */ @Override public final void sessionOpened(IoSession session) throws Exception { ProxyIoSession proxyIoSession = (ProxyIoSession) session .getAttribute(ProxyIoSession.PROXY_SESSION); if (proxyIoSession.getRequest() instanceof SocksProxyRequest || proxyIoSession.isAuthenticationFailed() || proxyIoSession.getHandler().isHandshakeComplete()) { proxySessionOpened(session); } else { logger.debug("Filtered session opened event !"); } } }
ProxyLogicHandler handler = proxyIoSession.getHandler();
ProxyLogicHandler handler = proxyIoSession.getHandler();
ProxyLogicHandler handler = proxyIoSession.getHandler();
if (proxyIoSession.getHandler().isHandshakeComplete()) { evt.deliverEvent(); } else {
if (proxyIoSession.getHandler().isHandshakeComplete()) { evt.deliverEvent(); } else {
if (proxyIoSession.getHandler().isHandshakeComplete()) { evt.deliverEvent(); } else {