mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #4697] Cannot pass through Http SSL, any issue for this configuration? #3710
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#3710
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 @sj7112 on GitHub (Mar 7, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4697
Bug Description
External Nginx(EN) => FRP => Internal Nginx(IN)
At the beginning, I use the architecture as below, everything works fine, except for the real IP address.
EN: http > server > 443 ssl proxy_pass to https://127.0.0.1:6949
FRP: direct pass (type=TCP; External 6949 - Internal 443)
IN: http > server > 443 ssl proxy_pass to http://internalServer:80
In order to reuse the domain by multi ports, get real IP address and simplify the SSL path-through, change to the new architecture as below.
EN (stream) => FRP (Transparent pass) => IN (SSL termination)
External nginx [ stream ]
frps / frpc: 0.61.1
Internal nginx [ http ]
Major differences between method 1 and method 2:
Add the statement: transport.proxyProtocolVersion = "v2"
listen 443 ssl; => listen 443 ssl proxy_protocol;
change the Real IP paramater to $proxy_protocol_addr;
other minor changes
issue: Only the proxy part is sent, no real contents show up!
anything may wrong with my configuration?
frpc Version
0.61.1
frps Version
0.61.1
System Architecture
debian12/ubuntu24
Configurations
See above
Logs
172.18.0.1 - - [06/Mar/2025:17:07:42 +0000] "PROXY TCP4 1xx.xx.xx.xxx 172.17.16.5 9067 6888" 400 157 "-" "-" "-"
172.18.0.1 - - [06/Mar/2025:17:08:22 +0000] "PROXY TCP4 1xx.xx.xx.xxx 172.17.16.5 9132 6888" 400 157 "-" "-" "-"
172.18.0.1 - - [06/Mar/2025:17:08:22 +0000] "PROXY TCP4 1xx.xx.xx.xxx 172.17.16.5 9131 6888" 400 157 "-" "-" "-"
Steps to reproduce
...
Affected area
@fatedier commented on GitHub (Mar 7, 2025):
From gpt-4.5-preview
Your issue is caused by the Proxy Protocol header being added twice, causing the internal Nginx to misinterpret the incoming request and resulting in the 400 errors you've observed.
Root Cause:
streammode) is already adding the Proxy Protocol header.transport.proxyProtocolVersion = "v2"is adding another Proxy Protocol header layer, causing duplication.Recommended Solution:
Remove the Proxy Protocol configuration from FRP to avoid double headers.
Update your FRP configuration as follows:
This ensures only External Nginx handles the Proxy Protocol header, and internal Nginx receives exactly one header, resolving your problem.
@github-actions[bot] commented on GitHub (Mar 22, 2025):
Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.