Package org.apache.mina.proxy.handlers.socks

Examples of org.apache.mina.proxy.handlers.socks.SocksProxyRequest


        // 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);
                } else {
                    handler = new Socks5LogicHandler(proxyIoSession);
                }
            } else {
View Full Code Here


        ProxyRequest req = null;

        if (args.length == 4) {
            if ("SOCKS4".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_4,
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
                        new InetSocketAddress(url.getHost(), port), USER);
            } else if ("SOCKS4a".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM, url
                                .getHost(), port, USER);
            } else if ("SOCKS5".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_5,
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
                        new InetSocketAddress(url.getHost(), port), USER);
                ((SocksProxyRequest) req).setPassword(PWD);
                ((SocksProxyRequest) req)
View Full Code Here

        // 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);
                } else {
                    handler = new Socks5LogicHandler(proxyIoSession);
                }
            } else {
View Full Code Here

        // 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);
                } else {
                    handler = new Socks5LogicHandler(proxyIoSession);
                }
            } else {
View Full Code Here

        ProxyRequest req = null;

        if (args.length == 4) {
            if ("SOCKS4".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_4,
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
                        new InetSocketAddress(url.getHost(), port), USER);
            } else if ("SOCKS4a".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM, url
                                .getHost(), port, USER);
            } else if ("SOCKS5".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_5,
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
                        new InetSocketAddress(url.getHost(), port), USER);
                ((SocksProxyRequest) req).setPassword(PWD);
                ((SocksProxyRequest) req)
View Full Code Here

        // 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);
                } else {
                    handler = new Socks5LogicHandler(proxyIoSession);
                }
            } else {
View Full Code Here

        ProxyRequest req = null;

        if (args.length == 4) {
            if ("SOCKS4".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_4,
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
                        new InetSocketAddress(url.getHost(), port), USER);
            } else if ("SOCKS4a".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM, url
                                .getHost(), port, USER);
            } else if ("SOCKS5".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_5,
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
                        new InetSocketAddress(url.getHost(), port), USER);
                ((SocksProxyRequest) req).setPassword(PWD);
                ((SocksProxyRequest) req)
View Full Code Here

        ProxyRequest req = null;

        if (args.length == 4) {
            if ("SOCKS4".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_4,
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
                        new InetSocketAddress(url.getHost(), port), USER);
            } else if ("SOCKS4a".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM, url
                                .getHost(), port, USER);
            } else if ("SOCKS5".equals(args[3])) {
                req = new SocksProxyRequest(
                        SocksProxyConstants.SOCKS_VERSION_5,
                        SocksProxyConstants.ESTABLISH_TCPIP_STREAM,
                        new InetSocketAddress(url.getHost(), port), USER);
                ((SocksProxyRequest) req).setPassword(PWD);
                ((SocksProxyRequest) req)
View Full Code Here

        // 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);
                } else {
                    handler = new Socks5LogicHandler(proxyIoSession);
                }
            } else {
View Full Code Here

TOP

Related Classes of org.apache.mina.proxy.handlers.socks.SocksProxyRequest

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.