mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
chore: hello mihomo
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package constant
|
||||
|
||||
import (
|
||||
"github.com/Dreamacro/clash/component/geodata/router"
|
||||
"github.com/metacubex/mihomo/component/geodata/router"
|
||||
)
|
||||
|
||||
type RuleGeoSite interface {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package sniffer
|
||||
|
||||
import "github.com/Dreamacro/clash/constant"
|
||||
import "github.com/metacubex/mihomo/constant"
|
||||
|
||||
type Sniffer interface {
|
||||
SupportNetwork() constant.NetWork
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user