nim-chronos icon indicating copy to clipboard operation
nim-chronos copied to clipboard

proxy implementation in httpclient

Open zer0pwned opened this issue 3 years ago • 2 comments

First of all, thank you guys so much for putting effort this amazing project. I really enjoy using it and learning how to make the NIM project clean and organized. I was wondering, does the httpclient support regular http/https proxy, just like NIM std httpclient library? I went through the code and I didn't find code can realize this functionality but just want to make sure.

If not I think it should be easy to implement and I can try to do that then make PR. The only thing worries me that is you have very well defined test cases and I don't have anything on top of my head how to make a robust test case for the http proxy (mainly to find a long lifetime public proxy server).

zer0pwned avatar May 23 '21 23:05 zer0pwned

Indeed. The way to write a test case would be to implement a small proxy server in the test case and validate through there that the client is sending the proper content (and consequently getting the right responses) - one way to get examples is to record a proxy session with wireshark for example.

arnetheduck avatar May 26 '21 08:05 arnetheduck

That's a great idea! Thank you for the suggestion! Apparently cheatfate is the main contributor of the httpclient code. Not sure if he is already implementing this part but will start to work on this on my side anyway. : )

zer0pwned avatar May 28 '21 16:05 zer0pwned