Package io.netty.handler.codec.socksx.v4

Examples of io.netty.handler.codec.socksx.v4.Socks4CmdRequest.host()


                    .channel(NioSocketChannel.class)
                    .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10000)
                    .option(ChannelOption.SO_KEEPALIVE, true)
                    .handler(new DirectClientHandler(promise));

            b.connect(request.host(), request.port()).addListener(new ChannelFutureListener() {
                @Override
                public void operationComplete(ChannelFuture future) throws Exception {
                    if (future.isSuccess()) {
                        // Connection established use handler provided results
                    } else {
View Full Code Here


                    .channel(NioSocketChannel.class)
                    .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10000)
                    .option(ChannelOption.SO_KEEPALIVE, true)
                    .handler(new DirectClientHandler(promise));

            b.connect(request.host(), request.port()).addListener(new ChannelFutureListener() {
                @Override
                public void operationComplete(ChannelFuture future) throws Exception {
                    if (future.isSuccess()) {
                        // Connection established use handler provided results
                    } else {
View Full Code Here

            if (!authenticate(ctx, req)) {
                res = new Socks4CmdResponse(Socks4CmdStatus.IDENTD_AUTH_FAILURE);
            } else {
                res = new Socks4CmdResponse(Socks4CmdStatus.SUCCESS);
                intermediaryDestination = new InetSocketAddress(req.host(), req.port());
            }

            ctx.write(res);
            ctx.pipeline().remove(Socks4MessageEncoder.class);
View Full Code Here

            Socks4CmdResponse res;
            boolean sendGreeting = false;
            if (!authzSuccess) {
                res = new Socks4CmdResponse(Socks4CmdStatus.IDENTD_AUTH_FAILURE);
            } else if (!req.host().equals(destination.getHostString()) ||
                       req.port() != destination.getPort()) {
                res = new Socks4CmdResponse(Socks4CmdStatus.REJECTED_OR_FAILED);
            } else {
                res = new Socks4CmdResponse(Socks4CmdStatus.SUCCESS);
                sendGreeting = true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.