-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Crazy sekai overturns the small pond
- Loading branch information
1 parent
0b42f26
commit 0b5c32a
Showing
140 changed files
with
2,849 additions
and
1,558 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package adapter | ||
|
||
import ( | ||
C "github.com/sagernet/sing-box/constant" | ||
) | ||
|
||
type HeadlessRule interface { | ||
Match(metadata *InboundContext) bool | ||
String() string | ||
} | ||
|
||
type Rule interface { | ||
HeadlessRule | ||
Service | ||
Type() string | ||
UpdateGeosite() error | ||
Action() RuleAction | ||
} | ||
|
||
type DNSRule interface { | ||
Rule | ||
WithAddressLimit() bool | ||
MatchAddressLimit(metadata *InboundContext) bool | ||
} | ||
|
||
type RuleAction interface { | ||
Type() string | ||
String() string | ||
} | ||
|
||
func IsFinalAction(action RuleAction) bool { | ||
switch action.Type() { | ||
case C.RuleActionTypeSniff, C.RuleActionTypeResolve: | ||
return false | ||
default: | ||
return true | ||
} | ||
} |
Oops, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.