[GH-ISSUE #2950] 日志中 hostname 永远为空 #2353

Closed
opened 2026-05-05 13:31:02 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @weilinfox on GitHub (May 24, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2950

Bug Description

frpc 登陆部分的日志中, hostname 字段一直为空,形如 hostname [] ,看了其他 issue 贴上来的日志好像也是这样诶
貌似在登陆部分的代码中没有也没有对 Hostname 赋值来着 https://github.com/fatedier/frp/blob/dev/client/service.go#L311

frpc Version

0.42.0

frps Version

0.42.0

System Architecture

linux/amd64

Configurations

frps 配置:
[common]
bind_port = 9005
allow_ports = 50035-50049
max_pool_count = 20
token = token

frpc配置:
[common]
server_addr = server_addr
server_port = 9005
token = token

Logs

5月 23 17:10:49 inuyasha-netfront frps[18662]: 2022/05/23 17:10:49 [I] [control.go:307] [7db10355edf2caa1] control writer is closing
5月 23 17:10:49 inuyasha-netfront frps[18662]: 2022/05/23 17:10:49 [I] [control.go:396] [7db10355edf2caa1] client exit success
5月 23 17:39:10 inuyasha-netfront frps[18662]: 2022/05/23 17:39:10 [I] [service.go:450] [1006f657d08a7873] client login info: ip [113.225.99.133:7736] version [0.42.0] hostname [] os [linux] arch [amd64]

Steps to reproduce

正常运行即可复现。

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @weilinfox on GitHub (May 24, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2950 ### Bug Description frpc 登陆部分的日志中, hostname 字段一直为空,形如 ``hostname []`` ,看了其他 issue 贴上来的日志好像也是这样诶 貌似在登陆部分的代码中没有也没有对 ``Hostname`` 赋值来着 https://github.com/fatedier/frp/blob/dev/client/service.go#L311 ### frpc Version 0.42.0 ### frps Version 0.42.0 ### System Architecture linux/amd64 ### Configurations frps 配置: [common] bind_port = 9005 allow_ports = 50035-50049 max_pool_count = 20 token = token frpc配置: [common] server_addr = server_addr server_port = 9005 token = token ### Logs 5月 23 17:10:49 inuyasha-netfront frps[18662]: 2022/05/23 17:10:49 [I] [control.go:307] [7db10355edf2caa1] control writer is closing 5月 23 17:10:49 inuyasha-netfront frps[18662]: 2022/05/23 17:10:49 [I] [control.go:396] [7db10355edf2caa1] client exit success 5月 23 17:39:10 inuyasha-netfront frps[18662]: 2022/05/23 17:39:10 [I] [service.go:450] [1006f657d08a7873] client login info: ip [113.225.99.133:7736] version [0.42.0] hostname [] os [linux] arch [amd64] ### Steps to reproduce 正常运行即可复现。 ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [X] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (May 24, 2022):

恩,目前是有意这么做的。
因为考虑 hostname 会涉及到一些隐私信息,所以目前没有使用以及上报这个字段。

<!-- gh-comment-id:1135833506 --> @fatedier commented on GitHub (May 24, 2022): 恩,目前是有意这么做的。 因为考虑 hostname 会涉及到一些隐私信息,所以目前没有使用以及上报这个字段。
Author
Owner

@weilinfox commented on GitHub (May 24, 2022):

恩,目前是有意这么做的。 因为考虑 hostname 会涉及到一些隐私信息,所以目前没有使用以及上报这个字段。

这个能否作为 frpc 配置文件中的一个可选的字段呢,这样应该就不会有隐私问题了。

<!-- gh-comment-id:1135878881 --> @weilinfox commented on GitHub (May 24, 2022): > 恩,目前是有意这么做的。 因为考虑 hostname 会涉及到一些隐私信息,所以目前没有使用以及上报这个字段。 这个能否作为 frpc 配置文件中的一个可选的字段呢,这样应该就不会有隐私问题了。
Author
Owner

@fatedier commented on GitHub (May 25, 2022):

没有这方面的考虑,如果有需要,可以自行修改源码编译。

<!-- gh-comment-id:1137299939 --> @fatedier commented on GitHub (May 25, 2022): 没有这方面的考虑,如果有需要,可以自行修改源码编译。
Author
Owner

@weilinfox commented on GitHub (May 25, 2022):

没有这方面的考虑,如果有需要,可以自行修改源码编译。

哦哦这样,好的

<!-- gh-comment-id:1137323213 --> @weilinfox commented on GitHub (May 25, 2022): > 没有这方面的考虑,如果有需要,可以自行修改源码编译。 哦哦这样,好的
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2353
No description provided.