mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #4584] [Feature Request] add support for https proxy (frpc -> httpsProxy -> frps) #3623
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3623
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ofirc on GitHub (Dec 15, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4584
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:8888rather thanhttp://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
goliband 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
@fatedier commented on GitHub (Dec 16, 2024):
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?
@ofirc commented on GitHub (Dec 16, 2024):
Yes, I will update this issue once I change the code and test it.
Thanks!
@xqzr commented on GitHub (Dec 17, 2024):
HTTPS 代理在 HTTP/1.1 版本下,只是添加了 TLS,即 HTTP+TLS
@ofirc commented on GitHub (Jan 22, 2025):
@fatedier I've forked golib and added a new commit to it:
6c2503ed9cLet 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!
@fatedier commented on GitHub (Jan 22, 2025):
You can directly submit a PR to the golib repository for easier review.
@github-actions[bot] commented on GitHub (Nov 21, 2025):
Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
@shani1998 commented on GitHub (Mar 25, 2026):
Hi @fatedier/ @blizard863 , the use case is still very relevant. Many on-prem environments rely on forward proxies that require TLS (i.e., https:// scheme proxies), and golib currently only handles http, socks5, and ntlm.
I've implemented HTTPS proxy support in golib PR, TLS handshake before CONNECT, with custom CA certificate support and will be opening a PR to fatedier/golib as you suggested in this thread.
Thanks to @ofirc for the initial groundwork.