HTTPS handling in Netty
Gabriel Landais
gabriel.landais at gmail.com
Thu Sep 22 10:59:39 EDT 2011
Have a look to my proxy
(svn<svn://scm.gforge.inria.fr/svn/gazelle/Maven/gazelle-proxy/trunk>),
it compiles using Maven 3.
The gazelle-proxy-netty module should be the most interesting part, you will
find some examples of the HTTP(s) proxy examples in
net.ihe.gazelle.proxy.netty.App. Anyway, you need some basic knowledge on
certificates before using anything related to TLS...
Gabriel
2011/9/22 ups <handsome.ups at gmail.com>
> Actually all I want is to receive the response from server when sending
> request of such type:
>
> CONNECT www.google.com:443 HTTP/1.1
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20100101
> Firefox/7.0
> Proxy-Connection: keep-alive
> Host: www.google.com
>
> Here is my code:
>
> ClientBootstrap bootstrap = new ClientBootstrap(factory);
> bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
>
> public ChannelPipeline getPipeline() throws Exception {
>
> return Channels.pipeline(new HttpResponseDecoder(), new
> HttpChunkAggregator(Integer.MAX_VALUE),
> new HttpRequestEncoder(), new
> ResponseHandler(container));
> }
> }
> });
> ChannelFuture channelFuture = bootstrap.connect(new
> InetSocketAddress(host, port));
>
> channelFuture.addListener(new ChannelFutureListener() {
>
> public void operationComplete(ChannelFuture future) throws
> Exception {
> future.getChannel().write(container.getRequest());
> }
> });
>
> --
> View this message in context:
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/HTTPS-handling-in-Netty-tp6815990p6819366.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110922/affd2f2a/attachment.html
More information about the netty-users
mailing list