[GH-ISSUE #4209] Wake On LAN #3315

Closed
opened 2026-05-05 14:08:14 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @extrafein on GitHub (May 9, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4209

Describe the feature request

It would be great to have an option to trigger a command in case of accessing a client target host. one use case would be WakeOnLAN.

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @extrafein on GitHub (May 9, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4209 ### Describe the feature request It would be great to have an option to trigger a command in case of accessing a client target host. one use case would be WakeOnLAN. ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:08:14 -06:00
Author
Owner

@xqzr commented on GitHub (May 10, 2024):

说不定可以,这只是一个想法

[[proxies]]
name = "wol"
type = "udp"
localIP = "255.255.255.255"
localPort = 9
remotePort = 9
<!-- gh-comment-id:2104884668 --> @xqzr commented on GitHub (May 10, 2024): 说不定可以,这只是一个想法 ```toml [[proxies]] name = "wol" type = "udp" localIP = "255.255.255.255" localPort = 9 remotePort = 9 ```
Author
Owner

@github-actions[bot] commented on GitHub (Jun 1, 2024):

Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:2143173978 --> @github-actions[bot] commented on GitHub (Jun 1, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@wuai1024 commented on GitHub (Jun 5, 2024):

请问下,实验成功了吗?

<!-- gh-comment-id:2148972831 --> @wuai1024 commented on GitHub (Jun 5, 2024): 请问下,实验成功了吗?
Author
Owner

@xsrong commented on GitHub (Jun 21, 2024):

我试了,但是没有成功,不知道问题出在什么地方。

frps.toml
  bindPort = 7000

frpc.toml
  serverAddr = "47.109.**.**"
  serverPort = 7000

  [[proxies]]
  name = "Wake On Lan"
  type = "udp"
  localIP = "255.255.255.255"
  localPort = 9
  remotePort = 6001

服务器端和客户端能够正常启动

~ $ ./frpc -c [frpc.toml](http://frpc.toml/)
[2024-06-21 22](tel:2024-06-21 22):16:[07.611](tel:07.611) [I] [sub/[root.go:142](http://root.go:142/)] start frpc service for config file [[frpc.toml](http://frpc.toml/)]
[2024-06-21 22](tel:2024-06-21 22):16:[07.612](tel:07.612) [I] [client/[service.go:294](http://service.go:294/)] try to connect to server...
[2024-06-21 22](tel:2024-06-21 22):16:[07.656](tel:07.656) [I] [client/[service.go:286](http://service.go:286/)] [b[2733119](tel:2733119)e4d[13667](tel:13667)] login to server success, get run id [b[2733119](tel:2733119)e4d[13667](tel:13667)]
[2024-06-21 22](tel:2024-06-21 22):16:[07.656](tel:07.656) [I] [proxy/[proxy_manager.go:173](http://proxy_manager.go:173/)] [b[2733119](tel:2733119)e4d[13667](tel:13667)] proxy added: [Wake On Lan]
[2024-06-21 22](tel:2024-06-21 22):16:[07.668](tel:07.668) [I] [client/[control.go:168](http://control.go:168/)] [b[2733119](tel:2733119)e4d[13667](tel:13667)] [Wake On Lan] start proxy success
[2024-06-21 22](tel:2024-06-21 22):16:[08.216](tel:08.216) [I] [proxy/[udp.go:93](http://udp.go:93/)] [b[2733119](tel:2733119)e4d[13667](tel:13667)] [Wake On Lan] incoming a new work connection for udp proxy, [47.109.**.**:7000](http://47.109.**.**:7000/)

发送唤醒消息后服务器端没有任何反应。服务器端使用tcpdump监听6001端口发现能够收到唤醒消息的

[root@iZ2vcho1h20xnnnm63vknqZ ~]# tcpdump udp port 6001
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:01:36.375011 IP 113.248.19.78.43602 > iZ2vcho1h20xnnnm63vknqZ.6001: UDP, length 102
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel
[root@iZ2vcho1h20xnnnm63vknqZ ~]#
<!-- gh-comment-id:2182837833 --> @xsrong commented on GitHub (Jun 21, 2024): 我试了,但是没有成功,不知道问题出在什么地方。 ``` frps.toml bindPort = 7000 frpc.toml serverAddr = "47.109.**.**" serverPort = 7000 [[proxies]] name = "Wake On Lan" type = "udp" localIP = "255.255.255.255" localPort = 9 remotePort = 6001 ``` 服务器端和客户端能够正常启动 ``` ~ $ ./frpc -c [frpc.toml](http://frpc.toml/) [2024-06-21 22](tel:2024-06-21 22):16:[07.611](tel:07.611) [I] [sub/[root.go:142](http://root.go:142/)] start frpc service for config file [[frpc.toml](http://frpc.toml/)] [2024-06-21 22](tel:2024-06-21 22):16:[07.612](tel:07.612) [I] [client/[service.go:294](http://service.go:294/)] try to connect to server... [2024-06-21 22](tel:2024-06-21 22):16:[07.656](tel:07.656) [I] [client/[service.go:286](http://service.go:286/)] [b[2733119](tel:2733119)e4d[13667](tel:13667)] login to server success, get run id [b[2733119](tel:2733119)e4d[13667](tel:13667)] [2024-06-21 22](tel:2024-06-21 22):16:[07.656](tel:07.656) [I] [proxy/[proxy_manager.go:173](http://proxy_manager.go:173/)] [b[2733119](tel:2733119)e4d[13667](tel:13667)] proxy added: [Wake On Lan] [2024-06-21 22](tel:2024-06-21 22):16:[07.668](tel:07.668) [I] [client/[control.go:168](http://control.go:168/)] [b[2733119](tel:2733119)e4d[13667](tel:13667)] [Wake On Lan] start proxy success [2024-06-21 22](tel:2024-06-21 22):16:[08.216](tel:08.216) [I] [proxy/[udp.go:93](http://udp.go:93/)] [b[2733119](tel:2733119)e4d[13667](tel:13667)] [Wake On Lan] incoming a new work connection for udp proxy, [47.109.**.**:7000](http://47.109.**.**:7000/) ``` 发送唤醒消息后服务器端没有任何反应。服务器端使用tcpdump监听6001端口发现能够收到唤醒消息的 ``` [root@iZ2vcho1h20xnnnm63vknqZ ~]# tcpdump udp port 6001 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 21:01:36.375011 IP 113.248.19.78.43602 > iZ2vcho1h20xnnnm63vknqZ.6001: UDP, length 102 ^C 1 packet captured 1 packet received by filter 0 packets dropped by kernel [root@iZ2vcho1h20xnnnm63vknqZ ~]# ```
Author
Owner

@xqzr commented on GitHub (Jun 22, 2024):

tcpdump udp port 9

在 frpc

<!-- gh-comment-id:2183959707 --> @xqzr commented on GitHub (Jun 22, 2024): ```shell tcpdump udp port 9 ``` 在 frpc
Author
Owner

@github-actions[bot] commented on GitHub (Jul 14, 2024):

Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:2227150353 --> @github-actions[bot] commented on GitHub (Jul 14, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#3315
No description provided.