Skip to content

frp: add enable switch - #30484

Open
kissingers wants to merge 3 commits into
openwrt:masterfrom
kissingers:frp-add-enable-switch
Open

frp: add enable switch#30484
kissingers wants to merge 3 commits into
openwrt:masterfrom
kissingers:frp-add-enable-switch

Conversation

@kissingers

Copy link
Copy Markdown

Add feature to support uci enable config option

📦 Package Details

Maintainer: @kissingers

Description:
Add UCI configuration options to enable or disable frpc and frps
services independently.
This allows users to control service startup via /etc/config/frpc
and /etc/config/frps without modifying init scripts manually.


🧪 Run Testing Details

  • OpenWrt Version:laster bulid
  • OpenWrt Target/Subtarget:MediaTek MT7986A
  • OpenWrt Device:Xiaomi Redme AX6000

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

Add uci config options to enable/disable frpc and frps services
independently. This allows users to control service startup via
/etc/config/frpc and /etc/config/frps without modifying
init scripts manually.

Signed-off-by: Kissinger Zhou <kissinger@foxmail.com>
Add UCI configuration options to enable or disable frpc and frps
services independently.
This allows users to control service startup via /etc/config/frpc
and /etc/config/frps without modifying init scripts manually.

Signed-off-by: Kissinger Zhou <kissinger@foxmail.com>
@kissingers

Copy link
Copy Markdown
Author
image image

After the pr, luci can add the switch option.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • fd5489d "frp: add enable switch" — body describes adding the UCI enable/disable options, but the diff only bumps PKG_RELEASE to 2. Squash it into c040f46, which carries the actual change and is missing the release bump.

Generated by Claude Code

Comment thread net/frp/files/frpc.init
config_foreach _find_init_section init

if [ -n "$init_cfg" ]; then
config_list_foreach "$init_cfg" conf_inc _append_conf_file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_append_conf_file appends to $CONF_FILE, and this loop now runs before mkdir -p /var/etc (line 940) and before : > "$CONF_FILE" (line 946) truncates it, so every conf_inc include is silently dropped from the generated TOML. The _TOML_ERR=0 reset at line 941 also clears any path-validation error this loop raised, so a rejected include no longer aborts startup either. Hoist only the config_get_bool/config_get reads and leave config_list_foreach "$init_cfg" conf_inc _append_conf_file at its original spot after the _emit_common block; same problem at frps.init:705.


Generated by Claude Code

Comment thread net/frp/files/frps.init
Comment on lines 721 to 722

config_foreach _find_init_section init

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: leftover blank run from the moved block; same at lines 743-745. frpc.init did not pick these up.

Suggested change
config_foreach _find_init_section init

Generated by Claude Code

@laipeng668

Copy link
Copy Markdown
Contributor

I understand your feature requirements, but there are still a few minor issues with the current changes, and the code in the LuCI repository also needs to be updated accordingly.

I will take over and complete the remaining work for you. Please be patient and wait.

@laipeng668

Copy link
Copy Markdown
Contributor

Please follow up on these two PRs (#30489 )(openwrt/luci#9013 )and test the off-the-shelf software package.
https://github.com/laipeng668/openwrt-ci-roc/releases/tag/Packages

@kissingers

Copy link
Copy Markdown
Author

Please follow up on these two PRs (#30489 )(openwrt/luci#9013 )and test the off-the-shelf software package. https://github.com/laipeng668/openwrt-ci-roc/releases/tag/Packages

Thanks, the PRs (#30489 )(openwrt/luci#9013 ) almost same as my bulid, so I think It will work fine. I will keep this active to check the different until #30489 into master.

@openwrt

openwrt Bot commented Sep 11, 2026

Copy link
Copy Markdown

Formality Check: Failed

We checked this pull request against the contribution guidelines. Here is what needs your attention:

🛑 CRITICAL ERRORS

Commit 173747f - Merge branch 'openwrt:master' into frp-add-enable-switch:

  • Author name format is invalid ('kissingers'). Please set your full name (first and last, e.g. 'Jane Doe').
  • Author email must not be a GitHub noreply address ('33601959+kissingers@users.noreply.github.com'). Please use a real email address that is linked to your GitHub account.
  • Merge commits are not allowed within the pull request
  • Commit subject must start with <package name or prefix>:
  • Commit description body is empty or contains only trailers (e.g. Signed-off-by). Please provide a meaningful description of what this change does and why
  • Missing 'Signed-off-by:' line. Please add a line at the end of the commit message in the format 'Signed-off-by: Your Name your@email.com', matching your commit author or committer identity.

Tip

Do not close this pull request to make corrections. Instead, modify your existing commits (e.g. git commit --amend) and update the branch using git push --force-with-lease --force-if-includes. The checks will re-run automatically.


Something broken? Consider reporting an issue.
Running version 059e3de deployed on 2026-09-09 11:53:18 CEST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants