mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
feat: add DSCP rule for Tproxy UDP packets (#996)
* feat: add `DSCP` rule for Tproxy UDP packets * fix: fix compatibility issue with non_linux platform * chore: remove redundant lines for DSCP
This commit is contained in:
@@ -147,6 +147,7 @@ type Metadata struct {
|
||||
SpecialProxy string `json:"specialProxy"`
|
||||
SpecialRules string `json:"specialRules"`
|
||||
RemoteDst string `json:"remoteDestination"`
|
||||
DSCP uint8 `json:"dscp"`
|
||||
|
||||
RawSrcAddr net.Addr `json:"-"`
|
||||
RawDstAddr net.Addr `json:"-"`
|
||||
|
||||
@@ -14,6 +14,7 @@ const (
|
||||
SrcPort
|
||||
DstPort
|
||||
InPort
|
||||
DSCP
|
||||
InUser
|
||||
InName
|
||||
InType
|
||||
@@ -73,6 +74,8 @@ func (rt RuleType) String() string {
|
||||
return "RuleSet"
|
||||
case Network:
|
||||
return "Network"
|
||||
case DSCP:
|
||||
return "DSCP"
|
||||
case Uid:
|
||||
return "Uid"
|
||||
case SubRules:
|
||||
|
||||
Reference in New Issue
Block a user