utls
utls copied to clipboard
feat: sketch out utls http.RoundTripper
We have experimental OONI code that is similar to an http.RoundTripper for utls
as described in https://github.com/refraction-networking/utls/issues/16. So, I choose to spend some time to make one. If you like the concept, then I can also write and add unit tests to this PR. (The same code is also at https://github.com/bassosimone/utlstransport where it can be tried out with a test client.)
Thanks for the quick first round of review! :-)
Okay, @sergeyfrolov, I've gone through the comments, and it seems to me the bottom line here is that there is an opportunity for refactoring to avoid side effects, the need to reorganize locking in CloseIdleConnections
and a bunch of nitpicks. Will do that!
@bassosimone any luck moving this forwards? Do you have an idea of whether you'll have the time to do this or whether it might be worthwhile for someone (maybe me???) to pick it up?
@max-b thanks for asking! I think I am unlikely to have time anytime soon because with OONI we choose in the end to use another approach to solve this problem (https://github.com/ooni/oohttp). So, if you or anyone else wants to move this patch forward, please do that! Please, feel free to ping me if you need any clarification regarding this code.