SagerNet / SagerNet/sing-box

detour behavior in tailscale endpoint

Open
#2,743 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

detour+domain_resolver is suitable for simple proxy where there is only one per-configured remote server address.

Maybe it's better to replace detour+domain_resolver to a second tag for the original internet-facing side of endpoints like tailscale. This sencond tags serves like a "loopback" inbound, allowing singbox to route the HTTPS control_url / HTTPS DERPs traffic using existing rules.

Some uses cases include

  1. send the domain of control_url/DERPs to proxy outbound for remote resolving instead of resolving it locally for better security and faster speed.

  2. route tailscale control_url/DERPs to different outbounds according to select/speedtest or rules .

  3. use singbox rules to have hard-coded tailnode.log.tailscale.io login.tailscale.com blocked to avoid telemetry.

  4. routing UDP packets via proxies outbounds for further obfuscation(https://github.com/net4people/bbs/issues/88,
    https://github.com/ClusterM/wg-obfuscator). At the moment, this can only be used in wireguard endpoint. Port of tailscale in sing-box is not configurable and there is no easy way to distinguish traffic of multiple tailscale endpoints.

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 with the tailscale endpoint behavior described around detour+domain_resolver, the control_url and DERPs traffic, and the existing WireGuard endpoint comparison. Determine how a second tag or loopback inbound would interact with current routing and domain resolution rules; done means the proposed traffic can be distinguished, resolved, blocked, and routed through selected outbounds as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.