fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wake On LAN

extrafein opened this issue · comments

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
commented

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

[[proxies]]
name = "wol"
type = "udp"
localIP = "255.255.255.255"
localPort = 9
remotePort = 9

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

请问下,实验成功了吗?

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

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 ~]#
commented
tcpdump udp port 9

在 frpc