Skip to content

Conversation

@iamtheted
Copy link
Contributor

@iamtheted iamtheted commented Nov 25, 2025

Summary by CodeRabbit

  • Enhancements
    • Updated DNS configuration with simplified per-server setup.
    • Added Best Latency routing option for optimized connection selection.
    • Refined routing configuration for improved network handling.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Walkthrough

A DNS and outbound configuration restructuring for Sing Box: DNS entries convert from reference-based definitions to explicit per-server types; proxy selector outbound and direct outbound are redefined with proper structure; a new Best Latency urltest outbound is introduced; route configuration consolidates with a default domain resolver setting.

Changes

Cohort / File(s) Summary
Sing Box DNS and Outbound Reconfiguration
app/templates/singbox/default.json
Refactors DNS configuration by replacing abstract dns-remote/dns-local definitions with explicit server types (UDP for 8.8.8.8, local resolver); modifies proxy selector outbound from null to empty array; adds new Best Latency urltest outbound with URL test configuration; explicitly defines direct outbound object; removes override_android_vpn and adds default_domain_resolver to route config.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify DNS server addresses and resolver types are correctly configured
  • Confirm urltest URL and outbound array structures are valid Sing Box syntax
  • Validate that default_domain_resolver reference matches an existing resolver tag
  • Ensure removal of override_android_vpn does not impact Android VPN functionality

Poem

🐰 DNS flows like rivers pure,
Through UDP tunnels, clear and sure,
Best Latency burns so bright,
Configuration takes its flight—
Direct paths now crystallized right! 🔥

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the SingBox template configuration to align with the latest format specification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ImMohammad20000
Copy link
Contributor

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
app/templates/singbox/default.json (1)

10-11: DNS configuration uses hard-coded Google DNS server.

The dns-remote entry is configured with "server": "8.8.8.8" (Google Public DNS). While this is a reasonable default, consider whether this template should be more flexible or include comments guiding users to customize DNS servers per their region/privacy requirements.

Also applies to: 15-16

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6bbc087 and a42b141.

📒 Files selected for processing (1)
  • app/templates/singbox/default.json (3 hunks)
🔇 Additional comments (2)
app/templates/singbox/default.json (2)

42-50: Verify empty outbounds arrays in proxy selector and Best Latency entries.

The changes introduce empty outbounds: [] arrays in two places:

  • Line 43: Proxy selector outbound with empty outbounds
  • Line 49: Best Latency (urltest) outbound with empty outbounds

For a template, empty arrays may be intentional placeholders for users to populate. However, urltest outbounds typically require targets to test against. Confirm these empty arrays align with the latest Sing Box template format and that users understand they must be populated or that the configuration will function correctly in this state.


69-69: Verify default_domain_resolver reference is correct.

Line 69 sets "default_domain_resolver": "dns-remote", which correctly references the tag defined at line 9. This cross-reference is valid. Confirm this setting aligns with your intended DNS routing behavior for the template.

Also applies to: 9-9

@iamtheted
Copy link
Contributor Author

This template works for the latest Android client of SingBox but I didn't know SinBox hasn't updated it's iPhone client for 10 months, so you need to leave the PR open and merge it when SingBox updates it's iPhone client.

@ImMohammad20000
Copy link
Contributor

ImMohammad20000 commented Nov 26, 2025

i will merg this after ios version released

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