[Feature Request] add support for https proxy (frpc -> httpsProxy -> frps)
Describe the feature request
I saw both in the README.md, the frpc.toml sample, and the golib code itself (link1, link2) that we only support: socks5, http and ntlm:
var supportedDialProxyTypes = []string{"socks5", "http", "ntlm"}
But what if I have an https proxy, e.g. https://my.proxy.server.com:8888 rather than http://my.proxy.server.com:8888?
Was wondering why isn't it supported and what would it take to support an HTTPS proxy?
For the sake of clarity, I don't care about MitM (man-in-the-middle) proxies, I'm talking about a scenario where the frpc (frp client) connects to frps (frp server) through a proxy with an https:// protocol scheme.
I'm guessing that from the user's perspective we'd need to (1) pass a custom CA (as most likely it's a local proxy with a private PKI), (2) add TLS handshake support to golib and the rest should be the same, i.e. pass a CONNECT to frps over that established connection.
I know that it might not make a lot of sense to everyone to actually use an https proxy, but nevertheless wondering what's the dev effort / design considerations that were led to not supporting it.
Thanks! Ofir
Describe alternatives you've considered
No response
Affected area
- [ ] Docs
- [ ] Installation
- [ ] Performance and Scalability
- [ ] Security
- [ ] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [ ] Client Plugin
- [ ] Server Plugin
- [ ] Extensions
- [ ] Others
I personally haven’t used an HTTPS proxy much myself, but if the behavior is similar to that of an HTTP proxy, we should be able to support it. Would you be able to help modify the code and test/verify it?
Yes, I will update this issue once I change the code and test it. Thanks!
if the behavior is similar to that of an HTTP proxy, we should be able to support it.
HTTPS 代理在 HTTP/1.1 版本下,只是添加了 TLS,即 HTTP+TLS
@fatedier I've forked golib and added a new commit to it: https://github.com/ofirc/golib/commit/6c2503ed9c1271e76a6af6634a533d7c5b342014
Let me know what you think of the semantics of the change. I'm going to test it against stunnel + tinyproxy using this project: https://github.com/ofirc/go-mtls-proxy
It's going to be interesting to see it working in practice :-)
I'll contribute it back to the repo once it's working. Appreciate your feedback!
You can directly submit a PR to the golib repository for easier review.
Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.