chore: hello mihomo

This commit is contained in:
wwqgtxx
2023-11-03 21:01:45 +08:00
parent 8c3557e96b
commit 17c9d507be
325 changed files with 1297 additions and 1315 deletions

View File

@@ -3,7 +3,7 @@ package common
import (
"strings"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
)
type Domain struct {

View File

@@ -3,7 +3,7 @@ package common
import (
"strings"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
)
type DomainKeyword struct {

View File

@@ -3,7 +3,7 @@ package common
import (
"strings"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
)
type DomainSuffix struct {

View File

@@ -1,7 +1,7 @@
package common
import (
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
)
type Match struct {

View File

@@ -4,12 +4,12 @@ import (
"fmt"
"strings"
"github.com/Dreamacro/clash/component/geodata"
"github.com/Dreamacro/clash/component/geodata/router"
"github.com/Dreamacro/clash/component/mmdb"
"github.com/Dreamacro/clash/component/resolver"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/log"
"github.com/metacubex/mihomo/component/geodata"
"github.com/metacubex/mihomo/component/geodata/router"
"github.com/metacubex/mihomo/component/mmdb"
"github.com/metacubex/mihomo/component/resolver"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/log"
)
type GEOIP struct {

View File

@@ -3,12 +3,12 @@ package common
import (
"fmt"
"github.com/Dreamacro/clash/component/geodata"
_ "github.com/Dreamacro/clash/component/geodata/memconservative"
"github.com/Dreamacro/clash/component/geodata/router"
_ "github.com/Dreamacro/clash/component/geodata/standard"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/log"
"github.com/metacubex/mihomo/component/geodata"
_ "github.com/metacubex/mihomo/component/geodata/memconservative"
"github.com/metacubex/mihomo/component/geodata/router"
_ "github.com/metacubex/mihomo/component/geodata/standard"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/log"
)
type GEOSITE struct {

View File

@@ -2,7 +2,7 @@ package common
import (
"fmt"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
"strings"
)

View File

@@ -2,7 +2,7 @@ package common
import (
"fmt"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
"strings"
)

View File

@@ -2,7 +2,7 @@ package common
import (
"fmt"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
"strings"
)

View File

@@ -3,7 +3,7 @@ package common
import (
"net/netip"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
)
type IPCIDROption func(*IPCIDR)

View File

@@ -1,7 +1,7 @@
package common
import (
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
"net/netip"
)

View File

@@ -2,7 +2,7 @@ package common
import (
"fmt"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
"strings"
)

View File

@@ -3,8 +3,8 @@ package common
import (
"fmt"
"github.com/Dreamacro/clash/common/utils"
C "github.com/Dreamacro/clash/constant"
"github.com/metacubex/mihomo/common/utils"
C "github.com/metacubex/mihomo/constant"
)
type Port struct {

View File

@@ -3,7 +3,7 @@ package common
import (
"strings"
C "github.com/Dreamacro/clash/constant"
C "github.com/metacubex/mihomo/constant"
)
type Process struct {

View File

@@ -4,9 +4,9 @@ import (
"fmt"
"runtime"
"github.com/Dreamacro/clash/common/utils"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/log"
"github.com/metacubex/mihomo/common/utils"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/log"
)
type Uid struct {

View File

@@ -5,9 +5,9 @@ import (
"regexp"
"strings"
"github.com/Dreamacro/clash/common/collections"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/rules/common"
"github.com/metacubex/mihomo/common/collections"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/rules/common"
)
type Logic struct {

View File

@@ -2,10 +2,10 @@ package logic_test
import (
// https://github.com/golang/go/wiki/CodeReviewComments#import-dot
. "github.com/Dreamacro/clash/rules/logic"
. "github.com/metacubex/mihomo/rules/logic"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/rules"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/rules"
"github.com/stretchr/testify/assert"
"testing"
)

View File

@@ -2,10 +2,10 @@ package rules
import (
"fmt"
C "github.com/Dreamacro/clash/constant"
RC "github.com/Dreamacro/clash/rules/common"
"github.com/Dreamacro/clash/rules/logic"
RP "github.com/Dreamacro/clash/rules/provider"
C "github.com/metacubex/mihomo/constant"
RC "github.com/metacubex/mihomo/rules/common"
"github.com/metacubex/mihomo/rules/logic"
RP "github.com/metacubex/mihomo/rules/provider"
)
func ParseRule(tp, payload, target string, params []string, subRules map[string][]C.Rule) (parsed C.Rule, parseErr error) {

View File

@@ -2,8 +2,8 @@ package provider
import (
"fmt"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/log"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/log"
"strings"
)

View File

@@ -1,9 +1,9 @@
package provider
import (
"github.com/Dreamacro/clash/component/trie"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/log"
"github.com/metacubex/mihomo/component/trie"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/log"
)
type domainStrategy struct {

View File

@@ -1,9 +1,9 @@
package provider
import (
"github.com/Dreamacro/clash/component/trie"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/log"
"github.com/metacubex/mihomo/component/trie"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/log"
)
type ipcidrStrategy struct {

View File

@@ -5,10 +5,10 @@ import (
"fmt"
"time"
"github.com/Dreamacro/clash/common/structure"
"github.com/Dreamacro/clash/component/resource"
C "github.com/Dreamacro/clash/constant"
P "github.com/Dreamacro/clash/constant/provider"
"github.com/metacubex/mihomo/common/structure"
"github.com/metacubex/mihomo/component/resource"
C "github.com/metacubex/mihomo/constant"
P "github.com/metacubex/mihomo/constant/provider"
)
var (

View File

@@ -9,10 +9,10 @@ import (
"strings"
"time"
"github.com/Dreamacro/clash/common/pool"
"github.com/Dreamacro/clash/component/resource"
C "github.com/Dreamacro/clash/constant"
P "github.com/Dreamacro/clash/constant/provider"
"github.com/metacubex/mihomo/common/pool"
"github.com/metacubex/mihomo/component/resource"
C "github.com/metacubex/mihomo/constant"
P "github.com/metacubex/mihomo/constant/provider"
)
var (

View File

@@ -2,9 +2,9 @@ package provider
import (
"fmt"
C "github.com/Dreamacro/clash/constant"
P "github.com/Dreamacro/clash/constant/provider"
"github.com/Dreamacro/clash/rules/common"
C "github.com/metacubex/mihomo/constant"
P "github.com/metacubex/mihomo/constant/provider"
"github.com/metacubex/mihomo/rules/common"
)
type RuleSet struct {