Add store_mode and platform Clash mode selector

This commit is contained in:
世界
2023-08-24 21:52:38 +08:00
parent 6dcacf3b5e
commit 43f72a6419
29 changed files with 405 additions and 71 deletions

View File

@@ -16,7 +16,7 @@ type ClashModeItem struct {
func NewClashModeItem(router adapter.Router, mode string) *ClashModeItem {
return &ClashModeItem{
router: router,
mode: strings.ToLower(mode),
mode: mode,
}
}
@@ -25,7 +25,7 @@ func (r *ClashModeItem) Match(metadata *adapter.InboundContext) bool {
if clashServer == nil {
return false
}
return clashServer.Mode() == r.mode
return strings.EqualFold(clashServer.Mode(), r.mode)
}
func (r *ClashModeItem) String() string {