Skip to content

feat: add per-country-group strategy selection (url-test/select/fallback)#328

Open
7Sageer wants to merge 4 commits intomainfrom
feat/country-group-type
Open

feat: add per-country-group strategy selection (url-test/select/fallback)#328
7Sageer wants to merge 4 commits intomainfrom
feat/country-group-type

Conversation

@7Sageer
Copy link
Copy Markdown
Owner

@7Sageer 7Sageer commented Feb 23, 2026

Summary

Allow users to choose the strategy type for country groups instead of hardcoding url-test.

Supports: url-test (auto speed test), select (manual), fallback.

Changes

  • Add country_group_type query parameter to /singbox, /clash, /surge routes
  • Pass countryGroupType through all builder constructors to addCountryGroups()
  • SingBox maps: url-testurltest, selectselector, fallbackurltest
  • Frontend: dropdown appears when "Group by Country" is enabled
  • i18n: zh/en translation keys added
  • localStorage + URL param persistence

API

?group_by_country=true&country_group_type=select

Values: url-test (default), select, fallback

Closes #327

…ack)

Allow users to choose the strategy type for country groups instead of
hardcoding url-test. Supports url-test, select, and fallback.

- Add country_group_type query parameter to all routes
- Pass countryGroupType through builder constructors
- Add dropdown UI (visible when group-by-country is enabled)
- Add i18n keys for zh/en

Closes #327
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sublink-worker Ready Ready Preview, Comment Feb 23, 2026 8:58am

- Add whitelist validation for country_group_type query parameter
- Remove redundant || 'url-test' in Clash/Surge builders (already defaulted in BaseConfigBuilder)
- Add comment clarifying sing-box fallback→urltest mapping
- Add x-transition to country group type dropdown
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