Package org.apache.mina.proxy.handlers

Examples of org.apache.mina.proxy.handlers.ProxyRequest


        ProxyLogicHandler handler = proxyIoSession.getHandler();

        // This test prevents from loosing handler conversationnal state when
        // reconnection occurs during an http handshake.
        if (handler == null) {
            ProxyRequest request = proxyIoSession.getRequest();

            if (request instanceof SocksProxyRequest) {
                SocksProxyRequest req = (SocksProxyRequest) request;
                if (req.getProtocolVersion() == SocksProxyConstants.SOCKS_VERSION_4) {
                    handler = new Socks4LogicHandler(proxyIoSession);
View Full Code Here


        connector.setConnectTimeoutMillis(5000);

        URL url = new URL(args[2]);
        int port = url.getPort() == -1 ? url.getDefaultPort() : url.getPort();

        ProxyRequest req = null;

        if (args.length == 4) {
            if ("SOCKS4".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_4,
View Full Code Here

    public void proxySessionOpened(IoSession session) throws Exception {
        logger.debug("CLIENT - Session opened: " + session);
        ProxyIoSession proxyIoSession = (ProxyIoSession) session
                .getAttribute(ProxyIoSession.PROXY_SESSION);
        if (proxyIoSession != null) {
            ProxyRequest req = proxyIoSession.getRequest();

            byte[] c = null;
            if (req instanceof SocksProxyRequest && cmd != null) {
                logger.debug("Sending request to a SOCKS SESSION ...");
                c = cmd.getBytes(proxyIoSession.getCharsetName());
View Full Code Here

    public void proxySessionOpened(IoSession session) throws Exception {
        logger.debug("CLIENT - Session opened: " + session);
        ProxyIoSession proxyIoSession = (ProxyIoSession) session
                .getAttribute(ProxyIoSession.PROXY_SESSION);
        if (proxyIoSession != null) {
            ProxyRequest req = proxyIoSession.getRequest();

            byte[] c = null;
            if (req instanceof SocksProxyRequest && cmd != null) {
                logger.debug("Sending request to a SOCKS SESSION ...");
                c = cmd.getBytes(proxyIoSession.getCharsetName());
View Full Code Here

        ProxyLogicHandler handler = proxyIoSession.getHandler();

        // This test prevents from loosing handler conversationnal state when
        // reconnection occurs during an http handshake.
        if (handler == null) {
            ProxyRequest request = proxyIoSession.getRequest();

            if (request instanceof SocksProxyRequest) {
                SocksProxyRequest req = (SocksProxyRequest) request;
                if (req.getProtocolVersion() == SocksProxyConstants.SOCKS_VERSION_4) {
                    handler = new Socks4LogicHandler(proxyIoSession);
View Full Code Here

        ProxyLogicHandler handler = proxyIoSession.getHandler();

        // This test prevents from loosing handler conversationnal state when
        // reconnection occurs during an http handshake.
        if (handler == null) {
            ProxyRequest request = proxyIoSession.getRequest();

            if (request instanceof SocksProxyRequest) {
                SocksProxyRequest req = (SocksProxyRequest) request;
                if (req.getProtocolVersion() == SocksProxyConstants.SOCKS_VERSION_4) {
                    handler = new Socks4LogicHandler(proxyIoSession);
View Full Code Here

        connector.setConnectTimeoutMillis(5000);

        URL url = new URL(args[2]);
        int port = url.getPort() == -1 ? url.getDefaultPort() : url.getPort();

        ProxyRequest req = null;

        if (args.length == 4) {
            if ("SOCKS4".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_4,
View Full Code Here

        ProxyLogicHandler handler = proxyIoSession.getHandler();

        // This test prevents from loosing handler conversationnal state when
        // reconnection occurs during an http handshake.
        if (handler == null) {
            ProxyRequest request = proxyIoSession.getRequest();

            if (request instanceof SocksProxyRequest) {
                SocksProxyRequest req = (SocksProxyRequest) request;
                if (req.getProtocolVersion() == SocksProxyConstants.SOCKS_VERSION_4) {
                    handler = new Socks4LogicHandler(proxyIoSession);
View Full Code Here

    public void proxySessionOpened(IoSession session) throws Exception {
        logger.debug("CLIENT - Session opened: " + session);
        ProxyIoSession proxyIoSession = (ProxyIoSession) session
                .getAttribute(ProxyIoSession.PROXY_SESSION);
        if (proxyIoSession != null) {
            ProxyRequest req = proxyIoSession.getRequest();

            byte[] c = null;
            if (req instanceof SocksProxyRequest && cmd != null) {
                logger.debug("Sending request to a SOCKS SESSION ...");
                c = cmd.getBytes(proxyIoSession.getCharsetName());
View Full Code Here

        connector.setConnectTimeoutMillis(5000);

        URL url = new URL(args[2]);
        int port = url.getPort() == -1 ? url.getDefaultPort() : url.getPort();

        ProxyRequest req = null;

        if (args.length == 4) {
            if ("SOCKS4".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_4,
View Full Code Here

TOP

Related Classes of org.apache.mina.proxy.handlers.ProxyRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.