Files
Archive/geoip/plugin/plaintext/surge_in.go
2024-11-03 19:35:20 +01:00

27 lines
672 B
Go

package plaintext
import (
"encoding/json"
"github.com/Loyalsoldier/geoip/lib"
)
/*
The types in this file extend the type `typeTextIn`,
which make it possible to support more formats for the project.
*/
const (
TypeSurgeRuleSetIn = "surgeRuleSet"
DescSurgeRuleSetIn = "Convert Surge RuleSet to other formats (just processing IP & CIDR lines)"
)
func init() {
lib.RegisterInputConfigCreator(TypeSurgeRuleSetIn, func(action lib.Action, data json.RawMessage) (lib.InputConverter, error) {
return newTextIn(TypeSurgeRuleSetIn, DescSurgeRuleSetIn, action, data)
})
lib.RegisterInputConverter(TypeSurgeRuleSetIn, &TextIn{
Description: DescSurgeRuleSetIn,
})
}