mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2766] 啟用 https 後, X-Forward-For 和 Proxy Protocol 都無法抓取到正確的真實ip ,但採 http 就能抓到正確的用戶 ip #2213
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#2213
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 @markku636 on GitHub (Jan 18, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2766
Bug Description
啟用 https 後, X-Forward-For 和 Proxy Protocol 都無法抓取到正確的真實ip ,但採 http 就能抓到正確的用戶 ip
開發環境
frps 0.38 => 架設在 google cloud ubuntu 上
frpc 0.38 windows (win 10)
frpc Version
0.38 =
frps Version
0.38 =
System Architecture
windows/amd64
Configurations
[Comma.Admin]
type = https
local_port = 5201
custom_domains = works-admin.markkulab.net
plugin = https2http
plugin_local_addr = 127.0.0.1:5201
proxy_protocol_version = v2
HTTPS 证书相关的配置
plugin_crt_path = ./markkulab.net/fullchain.pem
plugin_key_path = ./markkulab.net/privkey.pem
plugin_header_X-From-Where = frp
@Becods commented on GitHub (Jan 21, 2022):
请把https放在后端
并且需要启用Proxy Protocol解析
listen 443 ssl proxy_protocol;@markku636 commented on GitHub (Jan 21, 2022):
謝謝你的建議,
我後來解決了,
我後來發現 net core 的 web server 不支援 Proxy Protocol ,
需要額外透過 nginx 在轉發一層。
@github-actions[bot] commented on GitHub (Feb 21, 2022):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.