Differences

This shows you the differences between two versions of the page.

Link to this comparison view

irc:1460844000 [2017/05/27 13:44] (current)
Line 1: Line 1:
 +[08:48:01] *** ChanServ sets mode: +o temporal_
 +
 +[09:48:08] *** ChanServ sets mode: +o temporalfox
 +
 +[11:06:34] *** ChanServ sets mode: +o temporalfox
 +
 +[16:04:39] <​AlexLehm>​ temporalfox:​ hi Julien, I have implemented a first version of https proxy support based on the proxy support in Netty
 +
 +[16:05:12] <​temporalfox>​ AlexLehm great, however I would like to know how this can work with HTTP/1 and HTTP/2
 +
 +[16:05:24] <​temporalfox>​ i.e connect to a proxy via HTTP/1 and then either make HTTP/1 or HTTP/2 requests
 +
 +[16:05:46] <​temporalfox>​ same with connectin in hTTP/2 then make either HTTP/1 or HTTP/2
 +
 +[16:05:49] <​temporalfox>​ that's a scenario that should be possible I think
 +
 +[16:06:03] <​AlexLehm>​ I have almost no knowledge how http 2 works, for starters I have implemented it with the http 1.1 client
 +
 +[16:06:06] <​temporalfox>​ how does it work via netty ?
 +
 +[16:06:32] <​temporalfox>​ with HTTP/2 you also make CONNECT
 +
 +[16:06:42] <​temporalfox>​ the difference I think it's in the setup
 +
 +[16:06:43] <​AlexLehm>​ netty has a HttpProxyHandler class that does the proxy connection dialogue before doing the sslhandler
 +
 +[16:06:49] <​temporalfox>​ ok
 +
 +[16:06:50] <​AlexLehm>​ it might work with http/2 as well
 +
 +[16:07:12] <​temporalfox>​ can you try to make a test for this ?
 +
 +[16:07:19] <​temporalfox>​ in HttpTest class
 +
 +[16:07:38] <​temporalfox>​ I would look after at using the same handler with HTTP/2 protocol directly
 +
 +[16:07:46] <​temporalfox>​ but I think it would not work because of multiplexing
 +
 +[16:07:52] <​AlexLehm>​ i have thought some time about how to test that inside the vertx build, for now I am using a squid running on my computer, which doesn'​t work in general
 +
 +[16:08:20] <​temporalfox>​ ah I think you would write a test directly with a Netty server ?
 +
 +[16:08:32] <​AlexLehm>​ I think the easiest way would be to write a mock-proxy that does the connect and ssl, I have written something like that in a test project
 +
 +[16:08:42] <​temporalfox>​ or with an HttpServer that uses the toNetSocket ?
 +
 +[16:08:57] <​temporalfox>​ that's why it is for isnt it ?
 +
 +[16:08:58] <​AlexLehm>​ the test server should work with vert.x, basically its a http request that uses the NetSocket
 +
 +[16:09:12] <​temporalfox>​ ah yes that's what I meant
 +
 +[16:09:20] <​temporalfox>​ however it would only be able to test HTTP 1 easily
 +
 +[16:09:25] <​temporalfox>​ well also for HTTP/2
 +
 +[16:09:34] <​temporalfox>​ but it is framed protocol
 +
 +[16:09:38] <​temporalfox>​ not in clear
 +
 +[16:09:57] <​temporalfox>​ maybe we can have your work in a branch first
 +
 +[16:10:06] <​temporalfox>​ and see how to improve it for various case
 +
 +[16:11:03] <​temporalfox>​ and how about doing a real proxy ?
 +
 +[16:11:12] <​temporalfox>​ with two HTTP servers
 +
 +[16:11:44] <​AlexLehm>​ a real proxy would be possible as well, that just has to pump the data in both directions to the origin server
 +
 +[16:11:58] <​temporalfox>​ yes that would be easier for testing HTTP/2
 +
 +[16:12:12] <​AlexLehm>​ a connect proxy is basically a simple port forwarder anyway
 +
 +[16:12:18] <​temporalfox>​ yes
 +
 +[16:12:24] <​AlexLehm>​ https://​github.com/​alexlehm/​vert.x/​tree/​issues/​%231361-https-proxy
 +
 +[16:13:00] <​temporalfox>​ please provide a tests for http/1 with a proxy and a server
 +
 +[16:13:14] <​temporalfox>​ then I'll try to make an http 2 test after an http 1 connect
 +
 +[16:13:25] <​temporalfox>​ and see what is possible for HTTP/2 connect
 +
 +[16:16:32] <​AlexLehm>​ ok
 +
 +[16:21:19] <​temporalfox>​ actually the code inside the proxy
 +
 +[16:21:25] <​temporalfox>​ handler is quite easy
 +
 +[16:21:40] <​temporalfox>​ well anyway, I think what matters is testing :-)