Add tor outbound

This commit is contained in:
世界
2022-08-21 00:59:49 +08:00
parent 0686ad25fd
commit 990a80c2d3
18 changed files with 524 additions and 16 deletions

View File

@@ -267,7 +267,11 @@ func (r *DefaultRule) Outbound() string {
}
func (r *DefaultRule) String() string {
return strings.Join(F.MapToString(r.allItems), " ")
if !r.invert {
return strings.Join(F.MapToString(r.allItems), " ")
} else {
return "!(" + strings.Join(F.MapToString(r.allItems), " ") + ")"
}
}
var _ adapter.Rule = (*LogicalRule)(nil)