You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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:
External Nginx (stream mode) is already adding the Proxy Protocol header.
FRP with 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:
[[proxies]]
name = "pass-md-ssl-110"type = "tcp"localIP = "127.0.0.1"localPort = 443remotePort = 6949# Remove or comment out this line:# transport.proxyProtocolVersion = "v2"
This ensures only External Nginx handles the Proxy Protocol header, and internal Nginx receives exactly one header, resolving your problem.
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
The text was updated successfully, but these errors were encountered: