Skip to content

feat(subscription): add external custom configs - #738

Open
mustfqyl wants to merge 1 commit into
PasarGuard:devfrom
mustfqyl:feature/683-external-custom-config
Open

feat(subscription): add external custom configs#738
mustfqyl wants to merge 1 commit into
PasarGuard:devfrom
mustfqyl:feature/683-external-custom-config

Conversation

@mustfqyl

@mustfqyl mustfqyl commented Aug 2, 2026

Copy link
Copy Markdown

Summary

Adds support for appending externally managed share links to generated subscriptions.

  • Adds an External Configurations field to subscription settings.
  • Supports multiple external links, one per line.
  • Appends external links to plain-text and Base64 subscriptions.
  • Supports subscription template variables such as {USERNAME}.
  • Preserves backward compatibility with the EXTERNAL_CONFIG environment variable.
  • Adds English, Persian, Russian, and Chinese translations.

Closes #683

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / cleanup
  • Documentation
  • Tests / CI

Checklist

  • I tested the change locally or explained why it cannot be tested.
  • I added or updated tests for behavior changes.
  • I updated documentation, translations, or examples if needed.
  • I checked database migrations when models or schema changed.
  • I did not include secrets, tokens, private keys, or unrelated changes.

Testing

  • uv run pytest -q tests/test_subscription_external_config.py — 3 passed.
  • Ruff checks passed for the changed backend and test files.
  • TypeScript type checking completed successfully.
  • JSON validation passed for all four modified locale files.
  • A full dashboard build could not be completed in the validation environment because the installed @pasarguard/core-kit package did not contain its expected dist output.

No database migration is required because this setting is stored in the existing JSON settings structure.

Screenshots

Not available. The change adds a multiline External Configurations field to the existing subscription settings form.

Notes for reviewers

External links are intentionally appended only to links and links_base64 outputs. Raw share links cannot safely be appended directly to structured Xray, Clash, or Sing-box JSON/YAML outputs.

Existing installations using the EXTERNAL_CONFIG environment variable remain supported.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 186152c6-dbb6-4549-96a9-5b189abf19ed

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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