Skip to content

feat(headers): add flclashx-closeconnections header to toggle auto-close#89

Open
UnderGut wants to merge 1 commit into
pluralplay:devfrom
UnderGut:pr/flclashx-closeconnections
Open

feat(headers): add flclashx-closeconnections header to toggle auto-close#89
UnderGut wants to merge 1 commit into
pluralplay:devfrom
UnderGut:pr/flclashx-closeconnections

Conversation

@UnderGut
Copy link
Copy Markdown

@UnderGut UnderGut commented May 2, 2026

Summary

Adds a new subscription response header flclashx-closeconnections that lets a provider toggle the "Auto close connections on server change" application setting (appSettingProvider.closeConnections).

Header

Name Values Effect
flclashx-closeconnections true / false (case-insensitive) Sets appSetting.closeConnections

Behavior

  • Honored only when flclashx-custom: add (new profile) or flclashx-custom: update (every refresh) — same gate as the other flclashx-* headers.
  • Skipped when the user has Override provider settings enabled.
  • Invalid values are logged and ignored (setting remains unchanged).
  • Header is auto-extracted by the existing universal flclashx-* parser in lib/models/profile.dart, so no parsing infrastructure changes are needed.

Files changed

  • lib/controller.dart — 19 lines added inside _applyProviderSettings.

Testing

Built locally on Windows via the existing CI workflow and verified against a Remnawave panel sending:
flclashx-custom: update
flclashx-closeconnections: true

After subscription refresh, the Автозакрытие соединений toggle in app settings flips accordingly. Logs:
Applied flclashx-closeconnections: closeConnections=true

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant