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

@@ -9,9 +9,9 @@ import (
"sync"
"time"
N "github.com/Dreamacro/clash/common/net"
"github.com/Dreamacro/clash/common/utils"
"github.com/Dreamacro/clash/component/dialer"
N "github.com/metacubex/mihomo/common/net"
"github.com/metacubex/mihomo/common/utils"
"github.com/metacubex/mihomo/component/dialer"
)
// Adapter Type

View File

@@ -3,7 +3,7 @@ package constant
import (
"net"
N "github.com/Dreamacro/clash/common/net"
N "github.com/metacubex/mihomo/common/net"
"github.com/gofrs/uuid/v5"
)

View File

@@ -3,14 +3,14 @@ package constant
import (
"net/netip"
"github.com/Dreamacro/clash/transport/socks5"
"github.com/metacubex/mihomo/transport/socks5"
)
const (
BpfFSPath = "/sys/fs/bpf/clash"
BpfFSPath = "/sys/fs/bpf/mihomo"
TcpAutoRedirPort = 't'<<8 | 'r'<<0
ClashTrafficMark = 'c'<<24 | 'l'<<16 | 't'<<8 | 'm'<<0
TcpAutoRedirPort = 't'<<8 | 'r'<<0
MihomoTrafficMark = 'c'<<24 | 'l'<<16 | 't'<<8 | 'm'<<0
)
type EBpf interface {

View File

@@ -7,7 +7,7 @@ import (
"net/netip"
"strconv"
"github.com/Dreamacro/clash/transport/socks5"
"github.com/metacubex/mihomo/transport/socks5"
)
// Socks addr type
@@ -161,7 +161,7 @@ func (m *Metadata) SourceAddress() string {
func (m *Metadata) SourceDetail() string {
if m.Type == INNER {
return fmt.Sprintf("%s", ClashName)
return fmt.Sprintf("%s", MihomoName)
}
switch {

View File

@@ -10,7 +10,7 @@ import (
"strings"
)
const Name = "clash"
const Name = "mihomo"
var (
GeositeName = "GeoSite.dat"
@@ -19,8 +19,8 @@ var (
// Path is used to get the configuration path
//
// on Unix systems, `$HOME/.config/clash`.
// on Windows, `%USERPROFILE%/.config/clash`.
// on Unix systems, `$HOME/.config/mihomo`.
// on Windows, `%USERPROFILE%/.config/mihomo`.
var Path = func() *path {
homeDir, err := os.UserHomeDir()
if err != nil {
@@ -165,7 +165,7 @@ func (p *path) GetAssetLocation(file string) string {
func (p *path) GetExecutableFullPath() string {
exePath, err := os.Executable()
if err != nil {
return "clash"
return "mihomo"
}
res, _ := filepath.EvalSymlinks(exePath)
return res

View File

@@ -1,8 +1,8 @@
package provider
import (
"github.com/Dreamacro/clash/common/utils"
"github.com/Dreamacro/clash/constant"
"github.com/metacubex/mihomo/common/utils"
"github.com/metacubex/mihomo/constant"
)
// Vehicle Type

View File

@@ -1,7 +1,7 @@
package constant
import (
"github.com/Dreamacro/clash/component/geodata/router"
"github.com/metacubex/mihomo/component/geodata/router"
)
type RuleGeoSite interface {

View File

@@ -1,6 +1,6 @@
package sniffer
import "github.com/Dreamacro/clash/constant"
import "github.com/metacubex/mihomo/constant"
type Sniffer interface {
SupportNetwork() constant.NetWork

View File

@@ -1,8 +1,8 @@
package constant
var (
Meta = true
Version = "1.10.0"
BuildTime = "unknown time"
ClashName = "clash.meta"
Meta = true
Version = "1.10.0"
BuildTime = "unknown time"
MihomoName = "mihomo"
)