mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2443] 客户端新增一个线程监听配置文件,当配置文件发生变化时重启客户端服务 #1942
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#1942
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 @breeze12x on GitHub (Jun 8, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2443
The solution you want
客户端新增一个线程监听配置文件,当配置文件发生变化时重启客户端服务
Alternatives considered
客户端启动后只提供连接鉴权等信息,所有的链接信息都在服务器上配置(这个工作量太大了。。。),然后实现热更新
How to implement this function
1.获得客户端启动的配置文件
2.用一个线程去监听这个文件
3.当文件发生变化时,校验配置是否正确,如果正确重启服务
Application scenarios of this function
现在想要修改映射连接需要修改配置文件,并且杀掉进程再重新启动。如果主动监听配置文件变化然后重启服务则可以减少重复操作
@fatedier commented on GitHub (Jun 8, 2021):
这个问题和 https://github.com/fatedier/frp/issues/1176 重复了。
@QQ2017 commented on GitHub (Jun 20, 2021):
你不知道可以reload吗?