frp: add UCI service enable switches - #30489
Conversation
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
525eeff"frp: add UCI service enable switches" — "abort startup on include validation errors" reads as new behaviour, but_TOML_ERRraised by_append_conf_filewas already caught by the pre-existing[ "$_TOML_ERR" = "0" ] || return 1after the_emit_conf_section/_emit_http_pluginblock, and nothing between the two points has side effects outside$CONF_FILE. The added check only moves the abort a few lines earlier — reword so it does not claim a fix that already existed.
Generated by Claude Code
|
Also I think if can enable and disable anytime, keep defualt no check more good than check, as can turn on anytime, and the defualt setting save resource for these want keep frp feature but not always trun on routers. This is my first version, default is no check enable, but for the already bulid before version frp router, if change default to uncheck, how keep the before status(before same as now check)? because want keep same default result as before version so I have to change default enable now, but I dont think this is a good way. If can set defualt disable, but if it is a upgrade router then auto check enable, the new router keep default disable will more good. |
|
Okay, based on everyone’s suggestions, I’ve changed it so that the feature is disabled by default. This change will not affect the enabled status in existing users’ configuration profiles. |
|
When I use immortalwrt luci https://github.com/immortalwrt/luci , which pull from here, if reset router seting to default, and first time to frpc or frps set pages, if do nothing else but save config, find have 3 default seting deleted, that meanse the defaut reset para not same as first save para, can fix this problem? |
|
This is perfectly normal—LuCI and the Packages need to match. Once all the code here has been merged, ImmortalWrt will work properly after syncing with these sources. Until then, you can only handle it manually yourself, or install the files I compiled. |
e1b84b3 to
6dac037
Compare
|
After change frpc.init and frps.init to linux format LF, no other problem to switch enable and disable the 2 servers, but if keep default, can chanage the checkbox and can keep the checkbox after reboot, but never can startup |
Add an `enabled` option to the UCI init sections for `frpc` and `frps`, allowing the two services to be enabled or disabled independently. New default configurations set `enabled` to `0`, so both services are disabled by default on new installations. During configuration migration, if an existing legacy configuration does not contain an `enabled` option, initialize it to `1` to preserve the previous startup behavior. Do not override explicitly configured user values. When a service is disabled, skip both TOML generation and procd instance registration. Also stop configuration generation earlier when include validation fails, before emitting any remaining TOML sections. Align whitespace in frps.config with frpc.config by removing blank separators between options. Bump `PKG_RELEASE` to 2. Co-Authored-by: Kissinger Zhou <kissinger@foxmail.com> Signed-off-by: Roc Lai <laipeng668@qq.com>



📦 Package Details
Maintainer: N/A
Description:
Add an
enabledoption to the UCI init sections forfrpcandfrps,allowing the two services to be enabled or disabled independently.
New default configurations set
enabledto0, so both services aredisabled by default on new installations. During configuration migration,
if an existing legacy configuration does not contain an
enabledoption,initialize it to
1to preserve the previous startup behavior. Do notoverride explicitly configured user values.
When a service is disabled, skip both TOML generation and procd instance
registration.
Also stop configuration generation earlier when include validation
fails, before emitting any remaining TOML sections.
Align whitespace in frps.config with frpc.config by removing
blank separators between options.
Bump
PKG_RELEASEto 2.Depends on: openwrt/luci#9013
🧪 Run Testing Details
✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.