mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2742] 请问插件开发时,如何获取到frpc客户端的真实IP? #2191
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#2191
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 @zhizunbao84 on GitHub (Jan 9, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2742
Bug Description
首先非常感谢能有这么好的工具!!非常感谢。
我使用frps的时候,一开始什么认证也没设,然后使用的过程中发现除了我的内网机器(frpc 客户端),还有美国ip的frpc 客户端在连接我的frps。
我就想在frpc 客户端连接我的frps的时候验证一下是否是我的内网机器ip,如果是就放行,否则就拒绝。
我稍微研究了一下,frps的log文件中有frpc 客户端的ip,但是插件开发时,Login,NewProxy,NewWorkConn,NewUserConn这些过程中的json信息中没有frpc 客户端的信息。
还请多多指教?!
frpc Version
0.37.1
frps Version
0.37.1
System Architecture
windows/amd64
Configurations
NONE
Logs
No response
Steps to reproduce
...
Affected area
@fatedier commented on GitHub (Jan 9, 2022):
建议设置上 token,避免任何人都可以连接,也可以通过防火墙禁止某些 ip 段连接。
@hlpan commented on GitHub (Jan 10, 2022):
我也遇到这个问题了,能不能加上IP限制或类似功能。
@zhizunbao84 commented on GitHub (Jan 10, 2022):
我现在设置了,但是如果能设置IP限制什么的肯定更保险了。
@fatedier commented on GitHub (Jan 10, 2022):
可以考虑在 Login 的消息里附加上 frpc IP。