Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Two moderate issues remain in special-token preservation and wildcard-aware UI toggle behavior.
Review effort: Lite
Findings: None
What changed in this PR
Adds wildcard-domain support to network bypass lists, including legacy %2a compatibility and PAC bypass precedence.
Changes:
- Normalize wildcard bypass domains.
- Prioritize bypass rules over AutoProxy rules.
- Add regression tests and update UI guidance.
| File | Summary | Status |
|---|---|---|
tests/network-bypass.test.mjs |
Tests wildcard normalization and PAC behavior. | Reviewed |
src/utils/network.ts |
Implements wildcard parsing and bypass precedence. | Changes required for special-token compatibility |
src/features/popup/NetworkPage.tsx |
Documents wildcard syntax and manages bypass toggles. | Changes required for wildcard-aware toggling |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+58
to
+59
| const hostname = normalizeHostPattern(url.hostname) | ||
| return hasSubdomainWildcard ? `*.${hostname.replace(/^(?:\*|%2a)\./i, '')}` : hostname |
Comment on lines
60
to
+61
| } catch { | ||
| const withoutScheme = value.replace(WILDCARD_SCHEME_RE, '').replace(URL_SCHEME_RE, '') | ||
| const host = withoutScheme.startsWith('[') | ||
| ? withoutScheme.slice(0, withoutScheme.indexOf(']') + 1 || undefined) | ||
| : withoutScheme.split(/[/?#]/)[0] | ||
| return host ? normalizeHostPattern(host) : null | ||
| return null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #28
*.guazi.com子域名直连,并恢复历史%2a编码规则验证:规则测试 5/5、
pnpm compile、ESLint、Prettier 通过。