mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2934] [Feature Request] 希望加入对隐藏unix套接字支持 #2340
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#2340
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 @jaskle on GitHub (May 11, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2934
Originally assigned to: @blizard863 on GitHub.
Describe the feature request
如果使用隐藏的unix套接字,
plugin_unix_path=@webview_devtools_remote_25468
将无法访问
netstat -npla | grep @
能够看到这些隐藏的套接字(使用-a参数)
我需要将@改为0x00来使用它
我在源码中进行了修改,功能可用
Describe alternatives you've considered
源码上做了修改
`
func NewUnixDomainSocketPlugin(params map[string]string) (p Plugin, err error) {
unixPath, ok := params["plugin_unix_path"]
if !ok {
err = fmt.Errorf("plugin_unix_path not found")
return
}
// ++++++++++
unixPath = strings.Replace(unixPath, "@", "\x00", -1)
// ++++++++++
}
`
Affected area
@jaskle commented on GitHub (May 11, 2022):
提供一下相关的文献:
https://man7.org/linux/man-pages/man7/unix.7.html
sun_path[0] 部分
@koho commented on GitHub (May 11, 2022):
@ 应该只替换开头的
@blizard863 commented on GitHub (May 12, 2022):
I cannot reproduce your problem.
I test in
It just success.
I believe golang is compatible with this scenario
@jaskle commented on GitHub (May 12, 2022):
创建隐藏套接字也需要用0x00开头,netstat里会在开头显示@,
这个特性常被用到调试套接字,尤其在Android系统。
正常业务一般用不到。
@blizard863 commented on GitHub (May 12, 2022):
Can you tell me how to reproduce this problem ? Such as your frpc & frps total config, and your testing os. @jaskle
@koho commented on GitHub (May 12, 2022):
It seems that this case has been covered by golang:
17371eea25/src/syscall/syscall_linux.go (L517)@jaskle commented on GitHub (May 12, 2022):
看起来是个很有意思的话题,
我其实是为了调试4g手机用户web应用出现的bug,webview在调试模式将产生一个隐藏的域套接字,然后我通过frp映射到我的服务器。
你们不必在意,这个功能不重要。
@github-actions[bot] commented on GitHub (Jun 12, 2022):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.