mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1176] proposal - reload config file on save #919
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#919
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 @YanB25 on GitHub (Apr 4, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1176
abstract
I'd like to contribute to this project by adding a new feature. I wish to support reloading the config files automatically on save.
details
Users can enable this feature in
frpc.iniand whenever the config file is written, a
reloadis automatically triggered.implementation details
I would use https://github.com/fsnotify/fsnotify(Cross-platform file system notifications for Go) to watch the config files and use
go's channelto pass the information asynchronously.motivation
It's more natural for users (including me) to
sshto the client and change the config file. AdminUI is great butsshis better.A reload on save would be helpful.
@fatedier commented on GitHub (Apr 4, 2019):
I'm glad for your upcoming contribution.
Can we use
reload_on_updateinstead ofreload_on_save?The repo
https://github.com/fsnotify/fsnotifymaybe has some problem on macos like missing some events.@YanB25 commented on GitHub (Apr 5, 2019):
Okay.
The repo has some problems causing extra events on files (this issue). Users may find extra reload triggered in the log file. I couldn't find a stable library to watch a file on MacOS currently.
If extra reloads on MacOS is not acceptable, maybe we have to close this issue.
@fatedier commented on GitHub (Apr 5, 2019):
Double events is ok. The problem is missing events.
You can try to test it or at least reload conf at a fixed interval ?
@YanB25 commented on GitHub (Apr 6, 2019):
Yes, I can get the
last modified timeat a fixed interval and reload on necessary, if you prefer to use polling.I go through the issues and only find this one related to losing events. There's no further information about it. Only double events bug is confirmed.
BTW, I have MacOS environment and I can have a test about it if necessary.
@fatedier commented on GitHub (Jul 25, 2019):
@YanB25 No progress?
@zyfdegh commented on GitHub (Jan 2, 2020):
Any update?
@fatedier commented on GitHub (Mar 20, 2026):
This has been open for a long time — thanks for the suggestion. Since then, frpc has added a web dashboard with config editing, a reload API, and a store API for dynamic proxy/visitor management at runtime. These cover the original use case, so closing this.