I've written a simple http proxy server which redirects all connections to another https proxy server. It is available here: GitHub - OverShifted/proxymix: Converts a https proxy to a local http proxy
It works fine when making requests via curl. It even works fine when I run multiple "curls" at the same time. But it has two
(or three?) major problems:
- Telegram desktop can't connect to it (It can ping through my proxy, but keeps disconnecting from it)
When I set it as my browser's proxy and open up a few tabs, It consumes almost all of my CPU time.(Fixed)
- (This one is not really a problem, but its strange) I get random panics when I'm reading from a channel on my "curl" task (see below) which should not occur because that task is aborted right after the writing end of the channel is dropped.
The inner working of it is pretty simple. I use libcurl to connect to the remote proxy. The "curl object" is owned by a tokio task which communicates with two other tasks via two channels. One of those tasks, reads from the client and the other one writes to it.
Any help will be appreciated.