Compare commits

...

4 Commits

Author SHA1 Message Date
spiritlhl
61247a206e fix: 删除无效的并发 2025-08-11 13:08:20 +00:00
spiritlhl
f0daad1360 fix: 修复重定向冲突问题,由于nexttrace上层捕获了输出,无法再在融合怪中再次捕获进行重定向 2025-08-11 13:04:25 +00:00
github-actions[bot]
2d23fb55a0 chore: update ECS_VERSION to 0.1.79 in goecs.sh 2025-08-11 12:13:04 +00:00
spiritlhl
a73dbf2d0b fix: 修复部分单项测试说明错位 2025-08-11 12:08:51 +00:00
4 changed files with 28 additions and 33 deletions

2
go.mod
View File

@@ -13,7 +13,7 @@ require (
github.com/oneclickvirt/disktest v0.0.10-20250808140407
github.com/oneclickvirt/gostun v0.0.5-20250727155022
github.com/oneclickvirt/memorytest v0.0.9-20250808065154
github.com/oneclickvirt/nt3 v0.0.8-20250810151538
github.com/oneclickvirt/nt3 v0.0.8-20250811123903
github.com/oneclickvirt/pingtest v0.0.8-20250728015259
github.com/oneclickvirt/portchecker v0.0.3-20250728015900
github.com/oneclickvirt/security v0.0.6-20250805090112

4
go.sum
View File

@@ -118,8 +118,8 @@ github.com/oneclickvirt/mbw v0.0.1-20250808061222 h1:WGXOe6QvHiDRhPVMI0VcctjzW08
github.com/oneclickvirt/mbw v0.0.1-20250808061222/go.mod h1:0Vq6NRpyLmGUdfHfL3uDcFsuZhi7KlG+OCs5ky2757Y=
github.com/oneclickvirt/memorytest v0.0.9-20250808065154 h1:mjYOvpFz2mpDU9MNjj66oIDcc2r6+zoW8veP616/+4Q=
github.com/oneclickvirt/memorytest v0.0.9-20250808065154/go.mod h1:DBxiVZX7mWCe0Fy+qu57ENheLo00sLfjKzvxiICrUtU=
github.com/oneclickvirt/nt3 v0.0.8-20250810151538 h1:pXxtvTwTFWAh/+Hz89wDat42CFjqNdlFyASPRxSdE5g=
github.com/oneclickvirt/nt3 v0.0.8-20250810151538/go.mod h1:F1v+6xInBKnbUa8gV1M40R1HOzxg+obtduNhx3CTnmA=
github.com/oneclickvirt/nt3 v0.0.8-20250811123903 h1:ubSPLh/DSrXj+tOgmRABgi2vrVmbmjjSne+NrVFNmNc=
github.com/oneclickvirt/nt3 v0.0.8-20250811123903/go.mod h1:F1v+6xInBKnbUa8gV1M40R1HOzxg+obtduNhx3CTnmA=
github.com/oneclickvirt/pingtest v0.0.8-20250728015259 h1:egoxZRZBOWN3JqBwqEsULDyRo2/dpGMeWcmV3U87zig=
github.com/oneclickvirt/pingtest v0.0.8-20250728015259/go.mod h1:gxwsxxwitNQiGq2OI0ZogYoOLwc8DtuOdSRe6/EvRqs=
github.com/oneclickvirt/portchecker v0.0.3-20250728015900 h1:AomzdppSOFB70AJESQhlp0IPbsHTTJGimAWDk2TzCWM=

View File

@@ -40,7 +40,7 @@ import (
)
var (
ecsVersion = "v0.1.78"
ecsVersion = "v0.1.80"
menuMode bool
onlyChinaTest bool
input, choice string
@@ -546,7 +546,7 @@ func handleSignalInterrupt(sig chan os.Signal, startTime *time.Time, output *str
}
}
func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3, wg4, wg5 *sync.WaitGroup, basicInfo, securityInfo, emailInfo, mediaInfo, ptInfo *string, output *string, tempOutput string, startTime time.Time, outputMutex *sync.Mutex) {
func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3, wg4 *sync.WaitGroup, basicInfo, securityInfo, emailInfo, mediaInfo, ptInfo *string, output *string, tempOutput string, startTime time.Time, outputMutex *sync.Mutex) {
*output = runBasicTests(preCheck, basicInfo, securityInfo, *output, tempOutput, outputMutex)
*output = runCPUTest(*output, tempOutput, outputMutex)
*output = runMemoryTest(*output, tempOutput, outputMutex)
@@ -554,7 +554,7 @@ func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3, wg4, wg5 *syn
if onlyIpInfoCheckStatus && !basicStatus && preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" {
*output = runIpInfoCheck(*output, tempOutput, outputMutex)
}
var backtraceInfo, nt3Info string
var backtraceInfo string
if utTestStatus && preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" && !onlyChinaTest {
wg1.Add(1)
go func() {
@@ -582,21 +582,10 @@ func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3, wg4, wg5 *syn
go func() {
defer wg4.Done()
backtraceInfo = utils.PrintAndCapture(func() {
utils.PrintCenteredTitle("上游及回程线路检测", width)
upstreams.UpstreamsCheck()
}, "", "")
}()
}
if nt3Status && !onlyChinaTest {
wg5.Add(1)
go func() {
defer wg5.Done()
nt3Info = utils.PrintAndCapture(func() {
utils.PrintCenteredTitle("三网回程路由检测", width)
nexttrace.NextTrace3Check(language, nt3Location, nt3CheckType)
}, "", "")
}()
}
}
if preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" {
*output = runStreamingTests(wg1, mediaInfo, *output, tempOutput, outputMutex)
@@ -604,7 +593,7 @@ func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3, wg4, wg5 *syn
*output = runEmailTests(wg2, emailInfo, *output, tempOutput, outputMutex)
}
if runtime.GOOS != "windows" && preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" {
*output = runNetworkTests(wg3, wg4, wg5, ptInfo, &backtraceInfo, &nt3Info, *output, tempOutput, outputMutex)
*output = runNetworkTests(wg3, wg4, ptInfo, &backtraceInfo, *output, tempOutput, outputMutex)
}
if preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" {
*output = runSpeedTests(*output, tempOutput, outputMutex)
@@ -816,23 +805,29 @@ func runEmailTests(wg2 *sync.WaitGroup, emailInfo *string, output, tempOutput st
}, tempOutput, output)
}
func runNetworkTests(wg3, wg4, wg5 *sync.WaitGroup, ptInfo, backtraceInfo, nt3Info *string, output, tempOutput string, outputMutex *sync.Mutex) string {
func runNetworkTests(wg3, wg4 *sync.WaitGroup, ptInfo, backtraceInfo *string, output, tempOutput string, outputMutex *sync.Mutex) string {
outputMutex.Lock()
defer outputMutex.Unlock()
if wg4 != nil {
wg4.Wait()
}
if wg5 != nil {
wg5.Wait()
}
return utils.PrintAndCapture(func() {
if backtraceStatus && !onlyChinaTest && *backtraceInfo != "" {
if wg4 != nil {
wg4.Wait()
}
utils.PrintCenteredTitle("上游及回程线路检测", width)
fmt.Print(*backtraceInfo)
}
if nt3Status && !onlyChinaTest && *nt3Info != "" {
fmt.Print(*nt3Info)
if nt3Status && !onlyChinaTest {
var nt3Info string
if nt3Status && !onlyChinaTest {
utils.PrintCenteredTitle("三网回程路由检测", width)
nexttrace.NextTrace3Check(language, nt3Location, nt3CheckType) // 不可
nt3Info = utils.PrintAndCapture(func() {
fmt.Print(nt3Info)
}, "", "")
fmt.Print(nt3Info)
}
}
if onlyChinaTest || pingTestStatus {
if (onlyChinaTest || pingTestStatus) && *ptInfo != "" {
wg3.Wait()
utils.PrintCenteredTitle("三网ICMP的PING值检测", width)
fmt.Println(*ptInfo)
@@ -929,7 +924,7 @@ func main() {
enabelUpload = false
}
var (
wg1, wg2, wg3, wg4, wg5 sync.WaitGroup
wg1, wg2, wg3, wg4 sync.WaitGroup
basicInfo, securityInfo, emailInfo, mediaInfo, ptInfo string
output, tempOutput string
outputMutex sync.Mutex
@@ -941,7 +936,7 @@ func main() {
go handleSignalInterrupt(sig, &startTime, &output, tempOutput, uploadDone, &outputMutex)
switch language {
case "zh":
runChineseTests(preCheck, &wg1, &wg2, &wg3, &wg4, &wg5, &basicInfo, &securityInfo, &emailInfo, &mediaInfo, &ptInfo, &output, tempOutput, startTime, &outputMutex)
runChineseTests(preCheck, &wg1, &wg2, &wg3, &wg4, &basicInfo, &securityInfo, &emailInfo, &mediaInfo, &ptInfo, &output, tempOutput, startTime, &outputMutex)
case "en":
runEnglishTests(preCheck, &wg1, &wg2, &basicInfo, &securityInfo, &emailInfo, &mediaInfo, &output, tempOutput, startTime, &outputMutex)
default:

View File

@@ -143,7 +143,7 @@ goecs_check() {
os=$(uname -s 2>/dev/null || echo "Unknown")
arch=$(uname -m 2>/dev/null || echo "Unknown")
check_china
ECS_VERSION="0.1.77"
ECS_VERSION="0.1.79"
for api in \
"https://api.github.com/repos/oneclickvirt/ecs/releases/latest" \
"https://githubapi.spiritlhl.workers.dev/repos/oneclickvirt/ecs/releases/latest" \
@@ -155,8 +155,8 @@ goecs_check() {
sleep 1
done
if [ -z "$ECS_VERSION" ]; then
_yellow "Unable to get version info, using default version 0.1.77"
ECS_VERSION="0.1.77"
_yellow "Unable to get version info, using default version 0.1.79"
ECS_VERSION="0.1.79"
fi
version_output=""
for cmd_path in "goecs" "./goecs" "/usr/bin/goecs" "/usr/local/bin/goecs"; do