Skip to content

Commit 7d7a523

Browse files
committed
patch: self mod
1 parent 6bffbdd commit 7d7a523

6 files changed

Lines changed: 310 additions & 474 deletions

File tree

.github/workflows/build.yml

Lines changed: 299 additions & 373 deletions
Large diffs are not rendered by default.

.github/workflows/test.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/trigger-cmfa-update.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

adapter/outboundgroup/parser.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package outboundgroup
33
import (
44
"errors"
55
"fmt"
6+
"slices"
67
"strings"
78

89
"github.com/dlclark/regexp2"
@@ -138,7 +139,7 @@ func ParseProxyGroup(config map[string]any, proxyMap map[string]C.Proxy, provide
138139
} else {
139140
addTestUrlToProviders(PDs, groupOption.URL, expectedStatus, groupOption.Filter, uint(groupOption.Interval))
140141
}
141-
providers = append(providers, PDs...)
142+
providers = slices.Concat(providers, PDs)
142143
}
143144

144145
if len(groupOption.Proxies) != 0 {
@@ -169,7 +170,7 @@ func ParseProxyGroup(config map[string]any, proxyMap map[string]C.Proxy, provide
169170
return nil, fmt.Errorf("%s: %w", groupName, err)
170171
}
171172

172-
providers = append([]types.ProxyProvider{pd}, providers...)
173+
providers = slices.Concat([]types.ProxyProvider{pd}, providers)
173174
providersMap[groupName] = pd
174175
}
175176

component/updater/update_core.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ import (
2323
)
2424

2525
const (
26-
baseReleaseURL = "https://github.com/MetaCubeX/mihomo/releases/latest/download/"
27-
versionReleaseURL = "https://github.com/MetaCubeX/mihomo/releases/latest/download/version.txt"
26+
baseReleaseURL = "https://github.com/Larvan2/mihomo/releases/latest/download/"
27+
versionReleaseURL = "https://github.com/Larvan2/mihomo/releases/latest/download/version.txt"
2828

29-
baseAlphaURL = "https://github.com/MetaCubeX/mihomo/releases/download/Prerelease-Alpha/"
30-
versionAlphaURL = "https://github.com/MetaCubeX/mihomo/releases/download/Prerelease-Alpha/version.txt"
29+
baseAlphaURL = "https://github.com/Larvan2/mihomo/releases/download/Prerelease-Alpha/"
30+
versionAlphaURL = "https://github.com/Larvan2/mihomo/releases/download/Prerelease-Alpha/version.txt"
3131

3232
// MaxPackageFileSize is a maximum package file length in bytes. The largest
3333
// package whose size is limited by this constant currently has the size of
@@ -134,7 +134,7 @@ func (u *CoreUpdater) Update(currentExePath string, channel string, force bool)
134134
backupDir := filepath.Join(workDir, "meta-backup")
135135
updateDir := filepath.Join(workDir, "meta-update")
136136
packagePath := filepath.Join(updateDir, packageName)
137-
//log.Infoln(packagePath)
137+
// log.Infoln(packagePath)
138138

139139
updateExeName := mihomoBaseName
140140
if runtime.GOOS == "windows" {

log/log.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ func init() {
1919
log.SetOutput(os.Stdout)
2020
log.SetLevel(log.DebugLevel)
2121
log.SetFormatter(&log.TextFormatter{
22-
FullTimestamp: true,
23-
TimestampFormat: "2006-01-02T15:04:05.000000000Z07:00",
24-
EnvironmentOverrideColors: true,
22+
FullTimestamp: true,
23+
TimestampFormat: "UTC-07:00 2006-01-02 15:04:05",
24+
ForceColors: true,
2525
})
2626
}
2727

0 commit comments

Comments
 (0)