Skip to content

Expand Vole client protocols, routing, DNS and HTTP processing - #8

Merged
yiguodev merged 447 commits into
mainfrom
feat/core-protocol-expansion
Nov 3, 2026
Merged

yiguodev merged 447 commits into
mainfrom
feat/core-protocol-expansion

Conversation

@yiguodev

@yiguodev yiguodev commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator
  • Add provider generations, automatic proxy groups, richer routing rules and live Controller configuration.
  • Extend encrypted DNS, persistent fake-IP mappings and GeoData support.
  • Add HTTP CONNECT, WireGuard, TrustTunnel, Mieru and MASQUE outbounds; expand TLS/ECH and transport compatibility.
  • Add separately configured H1/H2 MITM and URL, header and body rewriting.
  • Improve UDP association reuse, TCP delivery and H2/H3 scheduling while keeping memory bounded.
  • Add Linux TUN route and system DNS management, MPTCP and TCP Brutal.
  • Replace vendored dependencies with upstream libraries, update and pin Boring 5.4.0, and fix cross-platform builds and CI feature checks.

yiguo added 30 commits October 17, 2026 01:10
Reuse the official ChaCha cipher per association instead of populating the upstream ciphertext-keyed thread cache for each response. Keep authenticated response, address, timestamp, session and replay checks.

Lower default HY2 connection receive credit to 2 MiB while preserving explicit windows. Pure-memory regressions pass. Real TUN 10-second diagnostics reduce ChaCha UDP peak RSS from 104 MiB to 31 MiB and HY2 TCP from 52-73 MiB to 34 MiB. Throughput and UDP loss still require further optimization and full 60-second acceptance.
Mihomo may defer a successful TCP response until origin data arrives. Applying the expired setup timer during established writes truncated uploads after ten seconds. Keep setup bounded, then parse the delayed response over the admitted stream without carrying that timer into business IO.

The paused-clock regression fails before the fix and passes afterward. All four memory-only stream tests pass. A real TUN 60-second 1 Gbps pure TCP window delivers complete checked data at 997.43 Mbps and 35.52 MiB peak RSS.
Preserve a pending carrier read when consuming a nonfull queue. Notify TX only from empty and RX only when full capacity reopens; queued output retains its existing immediate progress condition. Keep packet limits, cancellation and stop barriers unchanged.

The attached-carrier regression fails before the fix and passes afterward. All ten scoped in-memory QUIC regressions pass, including coalesced TX, full queue recovery, pending wakeups and owned receive storage. Actual TUN diagnostics remain bounded; full rate acceptance continues separately.
A continuously ready sender can monopolize a runtime worker and burst into the peer. Yield before encoding the next packet, preserving packet ID and cancellation semantics. Eight memory regressions and matched 1/3 Gbps TUN UDP/mixed windows pass with the verified protocol-peer receive-buffer profile.
Reduce redundant H3 drivers under parallel packet-up/download traffic. Keep zero implicit idle entries and preserve explicit reuse settings. The actual memory-driver lifecycle regression passes, and a 60-second 3 Gbps raw-IP TUN check stays below 45 MiB.
Separate the 1 MiB receive and 256 KiB send DATAGRAM budgets. Default the message ceiling to the existing 1400-byte path cap and intersect it with the negotiated limit. Memory/configuration regressions and TUN frame/loss diagnostics validate the change. Correct the pre-existing response-queue inventory value to the unchanged live 256 entries.
Lease an already protected send path so a pending write or pacer does not suspend receiving. Use the existing polled receive seam and drain ready Quinn receive batches while retaining queue and shutdown bounds.

Validate blocked-send progress, FIFO receive, budget enforcement and lease release before close with memory regressions; locked CLI and FFI Clippy passes.
Process ready raw IP packets before application wakeups. A full TUN handoff gets one cooperative turn and one retry, while persistent pressure keeps UDP, DNS and cancellation live without enlarging queues.

Validated with 70 netstack tests, transient and persistent TUN backpressure regressions, and locked CLI/FFI Clippy.
Default each stream to 64 KiB and aggregate receive credit to 4 MiB. Request a best-effort 2 MiB receive buffer through the existing protected UDP Dialer and retain explicit window overrides.

Document the high-RTT single-stream tradeoff. Four configuration regressions pass; both BBR and native Brutal TCP candidates delivered complete payloads above 998 Mbps in 60-second TUN windows.
Serialize UDP fragments in the existing connection owner. Reuse two source-stable authenticated sessions for explicit bandwidth modes, share wire credits and partition receive declarations and datagram buffers without growing node budgets. Preserve cancellation, the one-byte rate boundary and synchronous shutdown.
Accept empty descriptions in the official sing and Meta MMDB schemas while retaining complete metadata, index, separator and data validation. Restore original bytes after validation and cover corrupt inputs with focused regressions.
Release the verified file buffer after building smaller selected-category CIDRs, retaining Reader fallback and existing reload semantics. Validate GeoData regressions and matched 1/3 Gbps TUN memory.
Build initialized request preludes over the official CryptoStream, keep pending writes stable and bind authenticated replies to the request salt. Encode empty UDP packets in bounded initialized storage without changing third-party dependencies.
Remove the temporary address allocation while preserving wire bytes, payload bounds and resumable sends. Document why VLESS omits GlobalID and align the codec test with explicit close after cancellation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43d0e87f43

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/dns/runtime.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89425f2403

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/runtime/health.rs Resolved
@yiguodev

yiguodev commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0f074ec76

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/resource/cache.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: b0f074ec76

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/controller.rs Resolved
yiguo added 4 commits November 3, 2026 03:20
Use the test-only descriptor adapter for every Unix socketpair fixture,
including configured MTU. Keep real TUN adoption and packet forwarding
unchanged. Preserve complete session comparisons and update two stale
expectations to include immutable ingress snapshots captured before sniffing.

Validation: 77 Linux ARM64 and 78 macOS ARM64 memory/socketpair tests pass;
the former Linux constructor path reproduces ENOTTY. No host IP listener
or real-device validation was run.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc5ff444ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/dns/runtime.rs Resolved
yiguo added 2 commits November 3, 2026 04:23
Reuse a previous fake-IP pool only when it exists and its existing mode,
ranges and IPv6 settings match. Preserve the newly allocated pool when
DNS was previously disabled, without adding restart restrictions.

Memory regressions exercise actual A/AAAA answers, DNS enable transitions,
existing mappings/cursors, pool identity and incompatible pool isolation.
The original behavior returns a real address in the synthetic-answer test.
Enable the existing standalone Mieru admission test and matching recovery request gates. Keep the CI nonempty test check unchanged.
@yiguodev

yiguodev commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 0d4dbc279d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 0d4dbc279d

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/controller/unix.rs Resolved
yiguo added 2 commits November 3, 2026 05:24
Create the filesystem socket with owner-only permissions and revalidate its captured path around permission restoration before listening. Keep local authentication and bounded controller behavior unchanged.
Give the second source scenario its own RoutingContext and expire the completed decision to catch accidental budget reuse. Keep the production match budget unchanged.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0abe48c9e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/runtime.rs Resolved
Comment thread src/runtime.rs Resolved
yiguo added 2 commits November 3, 2026 05:54
Match inherited pools by their actual address families and open persistent storage only when no persistent owner was retained. Cover DNS toggles and durable mapping/cursor restoration through the runtime builder.
Require tun for the ignored physical TUN gate and use the smux module's feature condition for its XHTTP timing fixture. Keep standalone VLESS admission and the remaining memory regressions enabled.
@yiguodev

yiguodev commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 81df0a9fc0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 81df0a9fc0

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@yiguodev
yiguodev merged commit f870ffe into main Nov 3, 2026
25 checks passed
@yiguodev
yiguodev deleted the feat/core-protocol-expansion branch November 3, 2026 00:22
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.

2 participants