mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #3970] 求助几个关于安全性和真实IP的问题 #3150
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#3150
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 @chrisuhg on GitHub (Feb 1, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/3970
Bug Description
对于网络知识没有很过关,问GPT也没问出个结果来,希望有大佬可以帮忙解答一下子~
我部署的环境是搬瓦工的VPS,穿透的应用是黑群晖,通过VPS上的面板使用nginx反向代理开启强制https访问frp的二级域名
🙋提问:
在开启双向认证的情况下,群晖-> Frps之间的通讯是否还有必要启用https?
如何在VPS中使用nginx反代配置真实IP?
(我在网上寻求答案看到的都是直接在群晖中配置Nginx反代,有尝试将其应用到VPS的Nginx中,结果无法访问)
在穿透后的域名中,外网可以直接访问,回到内网的情况下我在尝试在路由中配置了DNS劫持为内网IP地址提高响应速度,网页可以直接访问,但是群晖App在内外网切换后必须要重新登录才可以连接,我猜想是证书不一致导致的,这个问题有没有大佬研究过的,求个思路或者研究方向!
以下是配置文件:
frpc Version
0.52
frps Version
0.52
System Architecture
linux/amd64
Configurations
Logs
No response
Steps to reproduce
...
Affected area
@xqzr commented on GitHub (Feb 8, 2024):
1、不需要
2、frp 可能对 X-Forwarded-For 进行了 覆写、追加
看起来,需要修改 群晖 的 Nginx
参考:https://www.alainlam.cn/?p=403
@chrisuhg commented on GitHub (Feb 18, 2024):
感谢回答!
我尝试根据参考链接在NAS上配置Nginx转发,但是不管是用https还是http的frpc配置都无法通过subdomain访问(403)。然后我又尝试直接指定域名(customDomain),网页返回的结果为
未发送任何数据。ERR_EMPTY_RESPONSE也许是我的访问路径比较复杂,配置没有成功,不管怎么样,感谢你提出的建议!
@AlainLam commented on GitHub (Feb 24, 2024):
虽然...但是...
看起来你似乎是在VPS中仍然有其他服务或者网站,而期望所有网站都使用的都是443/80端口。
我的建议是
实际上我们NAS并不会使用443端口进行通讯,而是使用高位端口来减少扫描,如果你乐意使用高位端口,我们直接使用TCP+proxy_protocol后根据文章中的内容配置即可(当然还是得修改群晖的nginx,同时还解决你密码的问题)
如果你一定要使用443端口的话,且如果FRP会修改X-Forwarded-For(我没验证),那么就有点复杂了。可以像下面一样将443/80都启用proxy_protocol,(当然还是的修改群晖的nginx)。以下配置如果不存在于你VPS中的网站都会往frp走。
至于群晖的反向代理,如果你不想修改群晖的系统文件,你也可以选择启用一个docker,或者局域网中的任意nginx来进行反代,原理是一样的。
@github-actions[bot] commented on GitHub (Mar 20, 2024):
Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.