Skip to content

feat: add optional country flags to node names#387

Open
pengzhendong wants to merge 2 commits into
7Sageer:mainfrom
pengzhendong:feature/country-flags
Open

feat: add optional country flags to node names#387
pengzhendong wants to merge 2 commits into
7Sageer:mainfrom
pengzhendong:feature/country-flags

Conversation

@pengzhendong
Copy link
Copy Markdown

@pengzhendong pengzhendong commented May 4, 2026

Summary

This PR adds optional country flag support for generated subscription configs and improves country grouping coverage/localization.

Changes

  • Add show_flags=true support to prefix detected node names with country/region flag emoji.
  • Add a UI toggle for showing flags in node names.
  • Preserve existing node names by default when show_flags is not enabled.
  • Avoid duplicating flags when node names already contain a flag emoji.
  • Expand country/region detection from the previous limited list to 249 ISO country/region codes.
  • Generate flag emoji from country/region codes instead of hardcoding every flag.
  • Localize generated country group names based on the selected link language, for example 🇫🇮 芬兰 in Chinese and 🇫🇮 Finland in English.
  • Add explicit lang parameter to generated links so downloaded configs keep the same language as the page instead of depending on client request headers.

Tests

  • Added tests for country flag prefixing.
  • Added coverage for Taiwan, Finland, and Hungary detection.
  • Updated country grouping tests for localized names and full ISO coverage.
  • Verified with:
npm test
npm run build

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

@pengzhendong is attempting to deploy a commit to the 7sageer's projects Team on Vercel.

A member of the Team first needs to authorize it.

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