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

16
main.go
View File

@@ -3,7 +3,7 @@ package main
import (
"flag"
"fmt"
"github.com/Dreamacro/clash/constant/features"
"github.com/metacubex/mihomo/constant/features"
"os"
"os/signal"
"path/filepath"
@@ -11,11 +11,11 @@ import (
"strings"
"syscall"
"github.com/Dreamacro/clash/config"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/hub"
"github.com/Dreamacro/clash/hub/executor"
"github.com/Dreamacro/clash/log"
"github.com/metacubex/mihomo/config"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/hub"
"github.com/metacubex/mihomo/hub/executor"
"github.com/metacubex/mihomo/log"
"go.uber.org/automaxprocs/maxprocs"
)
@@ -38,7 +38,7 @@ func init() {
flag.StringVar(&externalController, "ext-ctl", os.Getenv("CLASH_OVERRIDE_EXTERNAL_CONTROLLER"), "override external controller address")
flag.StringVar(&secret, "secret", os.Getenv("CLASH_OVERRIDE_SECRET"), "override secret for RESTful API")
flag.BoolVar(&geodataMode, "m", false, "set geodata mode")
flag.BoolVar(&version, "v", false, "show current version of clash")
flag.BoolVar(&version, "v", false, "show current version of mihomo")
flag.BoolVar(&testConfig, "t", false, "test configuration and exit")
flag.Parse()
}
@@ -46,7 +46,7 @@ func init() {
func main() {
_, _ = maxprocs.Set(maxprocs.Logger(func(string, ...any) {}))
if version {
fmt.Printf("Clash Meta %s %s %s with %s %s\n",
fmt.Printf("Mihomo Meta %s %s %s with %s %s\n",
C.Version, runtime.GOOS, runtime.GOARCH, runtime.Version(), C.BuildTime)
if len(features.TAGS) != 0 {
fmt.Printf("Use tags: %s\n", strings.Join(features.TAGS, ", "))