daeuniverse / daeuniverse/dae

[Proposal] remove `must_*` and add `dns` as a builtin outbound

Closed
#677 8 comments 1 reaction 0 assignees View on GitHub
topic/proposal
Dominant language
Go
Stars
6.2k
Forks
402
Avg merge
57m
Merged PRs (30d)
2

Description

### Proposal

### 提案

把 must_* 去掉,由 `isdns` 匹配规则和显式的 `dns` outbound 替代原有功能,相关变更有

1. 去掉 `must_*` 以及 `*(must)` outbound
2. 添加 `isdns` 匹配规则
3. 添加 `dns` outbound

### 一些可能的变种

1. `isdns` 可以命名为 `is_dns` 或者其他更合适的名字, 甚至直接用 `dport(53)` 替代 (如果我们认为这个判断标准已经足够并且在未来不太会发生变化的话)
4. `dns` 可以命名为 `builtin_dns` 或者其他更合适的名字

### Use Cases

比如原来的配置:

```
# implicit: isdns -> dns
pname(mosdns) -> must_rules
```

可以替换成

```
isdns && !pname(mosdns) -> dns
```

类似地

```
# implicit: isdns -> dns
pname(mosdns) -> must_my_group
```

可以替换成

```
isdns && !pname(mosdns) -> dns
pname(mosdns) -> my_group
```

或者

```
pname(mosdns) -> my_group
isdns -> dns
```

### Potential Benefits

1. 将一些 implicit 的逻辑给 explicit 地暴露到配置中,增强了相关配置的可理解性。
2. 可能能提供一些额外的灵活性 (暂时没想到具体的例子)

### Scope

_No response_

### Reference

_No response_

### Implementation

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the existing `must_*` rules and `*(must)` outbounds, then trace how routing rules and outbounds are represented in configuration. Compare the proposed `isdns` matching rule and explicit `dns` outbound with the supplied migration examples. Done means the implicit behavior is replaced consistently and the examples remain expressible.

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.