mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #5283] server: add proxy protocol support for bind and vhost HTTP/HTTPS listeners #5226
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#5226
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?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/5283
Author: @simplysoft
Created: 4/9/2026
Status: 🔄 Open
Base:
dev← Head:proxyprotocol📝 Commits (2)
11ac3e0server: add proxy protocol support for vhost HTTP/HTTPS listeners0d05e6dserver: add proxy protocol support for bind port listener📊 Changes
2 files changed (+28 additions, -0 deletions)
View changed files
📝
pkg/config/v1/server.go(+14 -0)📝
server/service.go(+14 -0)📄 Description
Add vhostHTTPSProxyProtocol and vhostHTTPProxyProtocol config options that enable PROXY protocol (v1/v2) parsing on the bind and vhost listeners.
When enabled, the real client IP is extracted from the PROXY protocol header sent by an upstream load balancer and used as the source address for proxied connections. The IP flows through the existing StartWorkConn.SrcAddr mechanism to frpc, making it available in X-Forwarded-For headers (https2http/https2https plugins) and via transport.proxyProtocolVersion for raw TCP proxies.
Uses the existing github.com/pires/go-proxyproto dependency (already used by frpc for sending proxy protocol to local services).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.