Skip to content

Conversation

@shenlaoshen
Copy link

No description provided.

7Sageer and others added 30 commits June 16, 2025 17:36
- Change custom rule field types from arrays to comma-separated strings
- Update field names: sites->site, ips->ip, outbound->name
- Fix all URL examples to match actual implementation
- Resolves inconsistency between docs and code behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Implement YAML proxy configuration parsing with automatic detection
- Add config override system to respect user-defined proxy-groups and rules
- Enhance proxy type conversion with comprehensive field mapping
- Support Hysteria2, TUIC, VLESS, Trojan, and VMess YAML formats
- Add ALPN, fast-open, hop-interval, and reality-opts parameter handling
- Improve base64 detection and subscription content processing
- Refactor parser architecture with shared conversion utilities
Add complete test suite with README guide and automated test runner to validate YAML configuration parsing functionality including proxy detection, Base64 decoding, and error handling scenarios
The remote YAML configuration override feature could inadvertently break the
final output if the remote config defined core sections like `proxies`,
`proxy-groups`, `rules`, or `rule-providers`.

This change blacklists these keys from the override process, ensuring
that they are always dynamically generated by the application. This
prevents misconfigurations and ensures a valid final config is
always produced.
This commit introduces the necessary logic to handle the 'anytls' proxy protocol type for Clash configurations.

- In `ProxyParsers.js`, a new parser is added to convert 'anytls' proxies from Clash YAML format into the internal standardized object representation.
- In `ClashConfigBuilder.js`, a corresponding builder is implemented to convert the internal 'anytls' proxy object back into the Clash YAML format.
feat: add Clash YAML subscription support, merge remote config, fix hysteria2 skip-cert-verify; add local tests
Adds a new test case to validate the parsing of the `anytls` proxy type. This test verifies key parameters such as SNI, ALPN, client-fingerprint, and idle session settings.

The local test runner is enhanced to support detailed, field-level validation on specific proxies. This allows for more precise assertions using dot notation for nested properties (e.g., `tls.alpn`).
This commit updates the `package.json` to enforce a minimum Node.js version of 18. This is necessary to ensure compatibility with modern language features and dependencies used in the project.

The local `sublink-plus` dependency has also been removed as it is no longer needed.

BREAKING CHANGE: The project now requires Node.js version 18 or later.
Allows the `proxy-groups` section from an input Clash YAML to be parsed and merged into the final generated configuration.

To support this, the builder will no longer add its default groups (e.g., 'Auto Select', 'Node Select') if a group with the same name is already provided in the input.

A new sanitization step has been added to ensure the integrity of the final config. The `proxies` array within each proxy-group is now filtered to:
- Remove any references to proxies or groups that do not exist.
- Remove duplicate entries while preserving the original order.
This introduces a new URL parameter `group_by_country=true` which enables automatic grouping of proxy nodes based on their country.

- A new utility `parseCountryFromNodeName` is added to intelligently detect country information from various node name formats (e.g., flags, country codes, names in Chinese/English).
- For both Clash and Surge configs, this feature creates a new "select" group for each country (e.g., "🌍 United States").
- These country-specific groups are then added to the main "Node Select" group for convenient selection.

Additionally, this commit refactors proxy-group handling in the Clash config builder to be more robust by trimming whitespace from group and proxy names before comparisons. This prevents issues with duplicate groups and incorrect filtering of proxies.
The "Group by Country" feature could add duplicate proxy groups if the base config already contained groups with the same name. This could also lead to duplicate entries in the main "Node Select" group.

This commit improves the logic to:
- Check for existing group names before creating a new country group.
- Sort country groups alphabetically for a consistent user experience.
- De-duplicate the final list of proxies/groups in the "Node Select" group for both Clash and Surge.
…t groups

This commit significantly refactors the "Group by Country" feature to provide a more structured and user-friendly proxy group configuration for both Clash and Surge.

- A new "Manual Switch" group is introduced, which contains a flat list of all individual proxy nodes for direct selection.
- Country-specific groups are now generated as `url-test` type (instead of `select`), enabling automatic selection of the lowest latency node within that region.
- Group names for countries now include flag emojis for better visual identification, facilitated by a refactor of the country parsing utility.
- The primary "Node Select" group and all other policy groups are now populated with a hierarchical structure: "Auto Select", "Manual Switch", and all the generated country groups.

Additionally, this commit includes:
- A feature to allow overriding the vmess node name via a URL fragment (e.g., vmess://...#MyNodeName).
- New local tests to validate the enhanced country grouping logic.
The 'group by country' option was not being applied to the generated URLs for Xray and Sing-box clients.

This commit ensures the `groupByCountryParam` is included in the `xrayUrl` and `singboxUrl`, making the feature consistent across all supported client types.
Add proxy-group passthrough and optional country-based grouping
FIX `ERR_PNPM_OUTDATED_LOCKFILE` error
@vercel
Copy link

vercel bot commented Jan 1, 2026

@shenlaoshen 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.

5 participants