SagerNet / SagerNet/sing-box

FR: Tun ip_is_private routing

Open
#2,858 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
38.2k
Forks
4.6k
Avg merge
19d 15h
Merged PRs (30d)
1

Description

Currently the Tun inbound allows for specifying rulesets to include or exclude, which makes it quite efficient at bypassing domestic destinations. In most use cases, private destinations are not meant to be proxied and routing them through the Tun interface and then using a rule to use direct outbound is pointless, it would be much better if there were options like route_exclude_private_ip and route_include_private_ip which would add the private ip cidrs to the nftables/firewall rules so that they would be routed more efficiently.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Tun inbound routing implementation and the nftables/firewall rule handling; the issue names no specific files or tests. Trace how include and exclude rulesets are applied, then verify that private IP route options produce the intended direct routing without unnecessary Tun proxying.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.