Commit Graph

2291 Commits

Author SHA1 Message Date
世界
2cf2ff3f33 Rename cloudflare-tunnel type to cloudflared 2026-03-31 15:32:56 +08:00
世界
af2afc529b cloudflare: require remote-managed tunnels 2026-03-31 15:32:56 +08:00
世界
a95f56cdea cloudflare: enforce socks-proxy ip_rules 2026-03-31 15:32:56 +08:00
世界
e54707cfe9 Return v3 registration protocol errors 2026-03-31 15:32:56 +08:00
世界
2340db6fcf Report unreachable cloudflare v3 registrations 2026-03-31 15:32:56 +08:00
世界
e6a7efc49a Cover direct cloudflare origin services 2026-03-31 15:32:56 +08:00
世界
d7b8689b26 Serve cloudflare hello world over TLS 2026-03-31 15:32:56 +08:00
世界
2321e941e0 Route cloudflare control plane through configurable dialer 2026-03-31 15:32:56 +08:00
世界
d017cbe008 Stabilize cloudflare edge transport fallback 2026-03-31 15:32:56 +08:00
世界
289101fc56 Enforce cloudflare access on all ingress services 2026-03-31 15:32:56 +08:00
世界
1ea083cd6f Apply cloudflare origin proxy transport options 2026-03-31 15:32:56 +08:00
世界
ed6be9b078 Validate cloudflare access protected origins 2026-03-31 15:32:56 +08:00
世界
854718992f Honor cloudflare warp active flow limits 2026-03-31 15:32:56 +08:00
世界
25a94ac5b6 Support router-backed cloudflare stream services 2026-03-31 15:32:56 +08:00
世界
4579ca9ecc Add cloudflare tunnel bastion and socks special services 2026-03-31 15:32:56 +08:00
世界
71c7a585ef Route cloudflare tunnel ICMP through sing-box router 2026-03-31 15:32:56 +08:00
世界
b3cad021b8 Apply origin request SNI selection 2026-03-31 15:32:56 +08:00
世界
124379fc1d Support regional cloudflare edge selection 2026-03-31 15:32:56 +08:00
世界
01a8405069 Implement router-backed cloudflare tunnel ingress config 2026-03-31 15:32:56 +08:00
世界
87a2f4c336 Fix cloudflared registration parameter inconsistencies
- Set QUIC InitialPacketSize per IP family (IPv4: 1252, IPv6: 1232)
- Set MaxIncomingStreams/MaxIncomingUniStreams to 1<<60
- Populate OriginLocalIP from local socket address in both QUIC and HTTP/2
- Pass NumPreviousAttempts from retry counter to registration
- Include version number in client version string
- Use OS_GOARCH format for Arch field
2026-03-31 15:32:56 +08:00
世界
b68f4670b0 Add cloudflare tunnel inbound 2026-03-31 15:32:56 +08:00
世界
ebf8a213b6 Bump version v1.14.0-alpha.8 2026-03-31 00:38:42 +08:00
世界
ab323e0eb9 Add BBR profile and hop interval randomization for Hysteria2 2026-03-31 00:38:42 +08:00
nekohasekai
2132e68d3a Refactor ACME support to certificate provider 2026-03-30 23:21:50 +08:00
世界
47742abe93 cronet-go: Update chromium to 145.0.7632.159 2026-03-30 23:21:50 +08:00
世界
77e51035bd documentation: Update descriptions for neighbor rules 2026-03-30 23:21:50 +08:00
世界
eeb5dead2a Add macOS support for MAC and hostname rule items 2026-03-30 23:21:50 +08:00
世界
45339d101b Add Android support for MAC and hostname rule items 2026-03-30 23:21:50 +08:00
世界
04c0490992 Add MAC and hostname rule items 2026-03-30 23:21:50 +08:00
世界
7ffdc48b49 Bump version v1.13.5 2026-03-30 23:03:43 +08:00
世界
e15bdf11eb sing: Minor fixes 2026-03-30 22:58:11 +08:00
世界
e3bcb06c3e platform: Add HTTPResponse.WriteToWithProgress 2026-03-30 22:42:36 +08:00
世界
84d2280960 quic: Fix protocol client close & Sync hysteria bbr fix 2026-03-30 22:42:36 +08:00
世界
4fd2532b0a Fix naive quic error message 2026-03-30 22:42:36 +08:00
Zhengchao Ding
02ccde6c71 fix(rpm): add vendor field to fpm config to avoid (none) vendor
Co-authored-by: Hyper <hypar@disroot.org>
2026-03-30 22:09:54 +08:00
世界
e98b4ad449 Fix WireGuard shutdown race crashing
Stop peer goroutines before closing the TUN device to prevent
RoutineSequentialReceiver from calling Write on a nil dispatcher.
2026-03-26 16:33:21 +08:00
世界
d09182614c Bump version v1.13.4 2026-03-26 13:28:33 +08:00
世界
6381de7bab route: Fix query_type never matching in rule_set headless rules 2026-03-26 13:26:18 +08:00
世界
b0c6762bc1 route: merge rule_set branches into outer rules
Treat rule_set items as merged branches instead of standalone boolean
sub-items.

Evaluate each branch inside a referenced rule-set as if it were merged
into the outer rule and keep OR semantics between branches. This lets
outer grouped fields satisfy matching groups inside a branch without
introducing a standalone outer fallback or cross-branch state union.

Keep inherited grouped state outside inverted default and logical
branches. Negated rule-set branches now evaluate !(...) against their
own conditions and only reapply the outer grouped match after negation
succeeds, so configs like outer-group && !inner-condition continue to
work.

Add regression tests for same-group merged matches, cross-group and
extra-AND failures, DNS merged-branch behaviour, and inverted merged
branches. Update the route and DNS rule docs to clarify that rule-set
branches merge into the outer rule while keeping OR semantics between
branches.
2026-03-25 14:00:29 +08:00
世界
7425100bac release: Refactor release tracks for Linux packages and Docker
Support 4 release tracks instead of 2:
- sing-box / latest (stable release)
- sing-box-beta / latest-beta (stable pre-release)
- sing-box-testing / latest-testing (testing branch)
- sing-box-oldstable / latest-oldstable (oldstable branch)

Track is detected via git branch --contains and git tag,
replacing the old version-string hyphen check.
2026-03-24 15:03:43 +08:00
世界
d454aa0fdf route: formalize nested rule_set group-state semantics
Before 795d1c289, nested rule-set evaluation reused the parent rule
match cache. In practice, this meant these fields leaked across nested
evaluation:

- SourceAddressMatch
- SourcePortMatch
- DestinationAddressMatch
- DestinationPortMatch
- DidMatch

That leak had two opposite effects.

First, it made included rule-sets partially behave like the docs'
"merged" semantics. For example, if an outer route rule had:

  rule_set = ["geosite-additional-!cn"]
  ip_cidr  = 104.26.10.0/24

and the inline rule-set matched `domain_suffix = speedtest.net`, the
inner match could set `DestinationAddressMatch = true` and the outer
rule would then pass its destination-address group check. This is why
some `rule_set + ip_cidr` combinations used to work.

But the same leak also polluted sibling rules and sibling rule-sets.
A branch could partially match one group, then fail later, and still
leave that group cache set for the next branch. This broke cases such
as gh-3485: with `rule_set = [test1, test2]`, `test1` could touch
destination-address cache before an AdGuard `@@` exclusion made the
whole branch fail, and `test2` would then run against dirty state.

795d1c289 fixed that by cloning metadata for nested rule-set/rule
evaluation and resetting the rule match cache for each branch. That
stopped sibling pollution, but it also removed the only mechanism by
which a successful nested branch could affect the parent rule's grouped
matching state.

As a result, nested rule-sets became pure boolean sub-items against the
outer rule. The previous example stopped working: the inner
`domain_suffix = speedtest.net` still matched, but the outer rule no
longer observed any destination-address-group success, so it fell
through to `final`.

This change makes the semantics explicit instead of relying on cache
side effects:

- `rule_set: ["a", "b"]` is OR
- rules inside one rule-set are OR
- each nested branch is evaluated in isolation
- failed branches contribute no grouped match state
- a successful branch contributes its grouped match state back to the
  parent rule
- grouped state from different rule-sets must not be combined together
  to satisfy one outer rule

In other words, rule-sets now behave as "OR branches whose successful
group matches merge into the outer rule", which matches the documented
intent without reintroducing cross-branch cache leakage.
2026-03-24 15:03:43 +08:00
世界
a3623eb41a tun: Fix system stack rewriting TUN subnet destinations to loopback 2026-03-23 19:38:55 +08:00
世界
72bc4c1f87 Fix DNS transport returning error for empty AAAA response
Closes #3925
2026-03-23 19:21:55 +08:00
世界
9ac1e2ff32 Match package_name in process_path rule on Android 2026-03-23 18:57:35 +08:00
世界
0045103d14 Fix package_name shared uid matching 2026-03-23 18:57:35 +08:00
世界
d2a933784c Optimize Darwin process finder 2026-03-23 18:57:35 +08:00
世界
3f05a37f65 Optimize Linux process finder 2026-03-23 18:57:35 +08:00
世界
b8e5a71450 Add process information cache to avoid duplicate lookups
PreMatch and full match phases each created a fresh InboundContext,
causing process search (expensive OS syscalls) to run twice per
connection. Use a freelru ShardedLRU cache with 200ms TTL to serve
the second lookup from cache.
2026-03-23 14:26:45 +08:00
世界
c13faa8e3c tailscale: Only set ProcessLocalIPs/ProcessSubnets for fake TUN 2026-03-23 14:16:40 +08:00
世界
7623bcd19e Fix DialerForICMPDestination 2026-03-23 13:58:55 +08:00