summaryrefslogtreecommitdiff
path: root/plugin/v2ray
diff options
context:
space:
mode:
authorLoyalsoldier <[email protected]>2025-02-01 15:13:39 +0800
committerLoyalsoldier <[email protected]>2025-02-01 15:27:23 +0800
commitfdab3dd2dea595f4aecd48bfd725b4bacf315b62 (patch)
tree8d2d772a9415b74a7caa68ce5bc6a08f34fdf6b7 /plugin/v2ray
parentd9ccff71c634dae0ed85608d37b2d0c2d732fa1a (diff)
Diffstat (limited to 'plugin/v2ray')
-rw-r--r--plugin/v2ray/dat_in.go16
-rw-r--r--plugin/v2ray/dat_out.go18
2 files changed, 17 insertions, 17 deletions
diff --git a/plugin/v2ray/dat_in.go b/plugin/v2ray/dat_in.go
index af306600..0c5cb6a0 100644
--- a/plugin/v2ray/dat_in.go
+++ b/plugin/v2ray/dat_in.go
@@ -14,16 +14,16 @@ import (
)
const (
- TypeGeoIPdatIn = "v2rayGeoIPDat"
- DescGeoIPdatIn = "Convert V2Ray GeoIP dat to other formats"
+ TypeGeoIPDatIn = "v2rayGeoIPDat"
+ DescGeoIPDatIn = "Convert V2Ray GeoIP dat to other formats"
)
func init() {
- lib.RegisterInputConfigCreator(TypeGeoIPdatIn, func(action lib.Action, data json.RawMessage) (lib.InputConverter, error) {
+ lib.RegisterInputConfigCreator(TypeGeoIPDatIn, func(action lib.Action, data json.RawMessage) (lib.InputConverter, error) {
return newGeoIPDatIn(action, data)
})
- lib.RegisterInputConverter(TypeGeoIPdatIn, &GeoIPDatIn{
- Description: DescGeoIPdatIn,
+ lib.RegisterInputConverter(TypeGeoIPDatIn, &GeoIPDatIn{
+ Description: DescGeoIPDatIn,
})
}
@@ -41,7 +41,7 @@ func newGeoIPDatIn(action lib.Action, data json.RawMessage) (lib.InputConverter,
}
if tmp.URI == "" {
- return nil, fmt.Errorf("❌ [type %s | action %s] uri must be specified in config", TypeGeoIPdatIn, action)
+ return nil, fmt.Errorf("❌ [type %s | action %s] uri must be specified in config", TypeGeoIPDatIn, action)
}
// Filter want list
@@ -53,9 +53,9 @@ func newGeoIPDatIn(action lib.Action, data json.RawMessage) (lib.InputConverter,
}
return &GeoIPDatIn{
- Type: TypeGeoIPdatIn,
+ Type: TypeGeoIPDatIn,
Action: action,
- Description: DescGeoIPdatIn,
+ Description: DescGeoIPDatIn,
URI: tmp.URI,
Want: wantList,
OnlyIPType: tmp.OnlyIPType,
diff --git a/plugin/v2ray/dat_out.go b/plugin/v2ray/dat_out.go
index 3e1cdbda..91062970 100644
--- a/plugin/v2ray/dat_out.go
+++ b/plugin/v2ray/dat_out.go
@@ -16,8 +16,8 @@ import (
)
const (
- TypeGeoIPdatOut = "v2rayGeoIPDat"
- DescGeoIPdatOut = "Convert data to V2Ray GeoIP dat format"
+ TypeGeoIPDatOut = "v2rayGeoIPDat"
+ DescGeoIPDatOut = "Convert data to V2Ray GeoIP dat format"
)
var (
@@ -26,15 +26,15 @@ var (
)
func init() {
- lib.RegisterOutputConfigCreator(TypeGeoIPdatOut, func(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) {
- return newGeoIPDat(action, data)
+ lib.RegisterOutputConfigCreator(TypeGeoIPDatOut, func(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) {
+ return newGeoIPDatOut(action, data)
})
- lib.RegisterOutputConverter(TypeGeoIPdatOut, &GeoIPDatOut{
- Description: DescGeoIPdatOut,
+ lib.RegisterOutputConverter(TypeGeoIPDatOut, &GeoIPDatOut{
+ Description: DescGeoIPDatOut,
})
}
-func newGeoIPDat(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) {
+func newGeoIPDatOut(action lib.Action, data json.RawMessage) (lib.OutputConverter, error) {
var tmp struct {
OutputName string `json:"outputName"`
OutputDir string `json:"outputDir"`
@@ -59,9 +59,9 @@ func newGeoIPDat(action lib.Action, data json.RawMessage) (lib.OutputConverter,
}
return &GeoIPDatOut{
- Type: TypeGeoIPdatOut,
+ Type: TypeGeoIPDatOut,
Action: action,
- Description: DescGeoIPdatOut,
+ Description: DescGeoIPDatOut,
OutputName: tmp.OutputName,
OutputDir: tmp.OutputDir,
Want: tmp.Want,