mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-09-27 19:52:08 +08:00
Compare commits
88 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6937e69a0a | ||
![]() |
a68d33739c | ||
![]() |
94e0441801 | ||
![]() |
39be183fda | ||
![]() |
dbc1506518 | ||
![]() |
149f5673d2 | ||
![]() |
c1b7302485 | ||
![]() |
bf44ea9324 | ||
![]() |
191ddfd668 | ||
![]() |
89a99a7428 | ||
![]() |
c474c71091 | ||
![]() |
43b2c8aca3 | ||
![]() |
96117a040e | ||
![]() |
c5aeda45bd | ||
![]() |
0b2ac51f09 | ||
![]() |
ffe1b65a2b | ||
![]() |
a4bfd4d143 | ||
![]() |
edbcf1c245 | ||
![]() |
4c65417ea6 | ||
![]() |
2cf7484881 | ||
![]() |
d5da2a59b6 | ||
![]() |
372deb59eb | ||
![]() |
8e4c6dfd3e | ||
![]() |
8fc828d416 | ||
![]() |
8a3fbd79e6 | ||
![]() |
5628f1bb9c | ||
![]() |
cadbb2a45c | ||
![]() |
56d7560471 | ||
![]() |
75e7eb1b25 | ||
![]() |
24ba56cfa6 | ||
![]() |
ebefd64a3d | ||
![]() |
4d83ffea02 | ||
![]() |
01a4084462 | ||
![]() |
6674093425 | ||
![]() |
6d2e56b1ec | ||
![]() |
2a736d3e70 | ||
![]() |
d02383b8cb | ||
![]() |
0caba0ea60 | ||
![]() |
6f92b8a994 | ||
![]() |
cc34baf9e1 | ||
![]() |
84d8963684 | ||
![]() |
a94e9a6284 | ||
![]() |
06007c191f | ||
![]() |
d013b8f90c | ||
![]() |
42002fdae1 | ||
![]() |
d7628a5a57 | ||
![]() |
e5f3ca1ec3 | ||
![]() |
e70a295a5f | ||
![]() |
58821f2603 | ||
![]() |
33a656304b | ||
![]() |
33d9a3ccb0 | ||
![]() |
1d5758999c | ||
![]() |
94ce394e04 | ||
![]() |
ede04bd2c2 | ||
![]() |
50f6ef1f60 | ||
![]() |
e5129ab244 | ||
![]() |
15b6ba4eb8 | ||
![]() |
6c77f74003 | ||
![]() |
61a1508b53 | ||
![]() |
022284018d | ||
![]() |
1d682213fe | ||
![]() |
649a09b50a | ||
![]() |
0fa2ff9300 | ||
![]() |
b174e5cfa8 | ||
![]() |
afd667db59 | ||
![]() |
d846dcbf4f | ||
![]() |
f47b1e3023 | ||
![]() |
63658bb2dc | ||
![]() |
b1a8368af3 | ||
![]() |
df6d1236cc | ||
![]() |
7c64102581 | ||
![]() |
58cb4f3831 | ||
![]() |
20bddae048 | ||
![]() |
3c0590ca8d | ||
![]() |
a752eeeeb0 | ||
![]() |
630a28f2f2 | ||
![]() |
cfd70e100b | ||
![]() |
9114f5b97a | ||
![]() |
8c0fc16384 | ||
![]() |
2ded570639 | ||
![]() |
42f0cb3399 | ||
![]() |
14adbddeb9 | ||
![]() |
27fd06b007 | ||
![]() |
88db8df827 | ||
![]() |
ec728796f4 | ||
![]() |
147e8c1113 | ||
![]() |
b9b1d5ca76 | ||
![]() |
1500c8342e |
522
.back/.goreleaser.yaml
Normal file
522
.back/.goreleaser.yaml
Normal file
@@ -0,0 +1,522 @@
|
|||||||
|
version: 2
|
||||||
|
project_name: goecs
|
||||||
|
|
||||||
|
env:
|
||||||
|
- GO111MODULE=on
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy -v
|
||||||
|
|
||||||
|
builds:
|
||||||
|
# Linux AMD64 with CGO
|
||||||
|
- id: linux-amd64-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=x86_64-linux-gnu-gcc
|
||||||
|
- CGO_CFLAGS=-O2 -static -fno-stack-protector
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/amd64 (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/amd64 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux 386 with CGO - 修复了编译器和标志
|
||||||
|
- id: linux-386-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=gcc
|
||||||
|
- CGO_CFLAGS=-m32 -O1 -march=i686 -mtune=generic -fno-stack-protector
|
||||||
|
- CGO_LDFLAGS=-m32
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags="-m32 -static"
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- 386
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/386 (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/386 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux ARM64 with CGO
|
||||||
|
- id: linux-arm64-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=aarch64-linux-gnu-gcc
|
||||||
|
- CGO_CFLAGS=-O1 -fno-stack-protector
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- arm64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/arm64 (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/arm64 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Windows AMD64 with CGO
|
||||||
|
- id: windows-amd64-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=x86_64-w64-mingw32-gcc
|
||||||
|
- CGO_CFLAGS=-O2 -static-libgcc -static-libstdc++
|
||||||
|
- CGO_LDFLAGS=-static-libgcc -static-libstdc++
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for windows/amd64 (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built windows/amd64 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Windows 386 with CGO - 修复了编译器名称
|
||||||
|
- id: windows-386-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=i686-w64-mingw32-gcc
|
||||||
|
- CGO_CFLAGS=-O2 -static-libgcc -static-libstdc++
|
||||||
|
- CGO_LDFLAGS=-static-libgcc -static-libstdc++
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- 386
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for windows/386 (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built windows/386 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Darwin AMD64 with CGO
|
||||||
|
- id: darwin-amd64-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=o64-clang
|
||||||
|
- CGO_CFLAGS=-O2 -arch x86_64 -mmacosx-version-min=10.12
|
||||||
|
- CGO_LDFLAGS=-arch x86_64 -mmacosx-version-min=10.12
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for darwin/amd64 (CGO)"
|
||||||
|
- echo "Checking osxcross tools..."
|
||||||
|
- which o64-clang || echo "o64-clang not found"
|
||||||
|
- which o64-clang++ || echo "o64-clang++ not found"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built darwin/amd64 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Darwin ARM64 with CGO
|
||||||
|
- id: darwin-arm64-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=oa64-clang
|
||||||
|
- CGO_CFLAGS=-O2 -arch arm64 -mmacosx-version-min=11.0
|
||||||
|
- CGO_LDFLAGS=-arch arm64 -mmacosx-version-min=11.0
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- arm64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for darwin/arm64 (CGO)"
|
||||||
|
- echo "Checking osxcross tools..."
|
||||||
|
- which oa64-clang || echo "oa64-clang not found"
|
||||||
|
- which oa64-clang++ || echo "oa64-clang++ not found"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built darwin/arm64 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux RISC-V 64 with CGO
|
||||||
|
- id: linux-riscv64-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=riscv64-linux-gnu-gcc
|
||||||
|
- CGO_CFLAGS=-O1 -fno-stack-protector
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- riscv64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/riscv64 (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/riscv64 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux MIPS64 with CGO
|
||||||
|
- id: linux-mips64-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=mips64-linux-gnuabi64-gcc
|
||||||
|
- CGO_CFLAGS=-O1 -fno-stack-protector
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- mips64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/mips64 (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/mips64 (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux MIPS64LE with CGO
|
||||||
|
- id: linux-mips64le-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=mips64el-linux-gnuabi64-gcc
|
||||||
|
- CGO_CFLAGS=-O1 -fno-stack-protector
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- mips64le
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/mips64le (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/mips64le (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux PPC64LE with CGO
|
||||||
|
- id: linux-ppc64le-cgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=powerpc64le-linux-gnu-gcc
|
||||||
|
- CGO_CFLAGS=-O1 -fno-stack-protector
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- ppc64le
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/ppc64le (CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/ppc64le (CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux ARM (no CGO)
|
||||||
|
- id: linux-arm-nocgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- arm
|
||||||
|
goarm:
|
||||||
|
- "5"
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/arm (no CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/arm (no CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux S390X (no CGO)
|
||||||
|
- id: linux-s390x-nocgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- s390x
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/s390x (no CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/s390x (no CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux MIPS (no CGO)
|
||||||
|
- id: linux-mips-nocgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- mips
|
||||||
|
gomips:
|
||||||
|
- softfloat
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/mips (no CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/mips (no CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux MIPSLE (no CGO)
|
||||||
|
- id: linux-mipsle-nocgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- mipsle
|
||||||
|
gomips:
|
||||||
|
- softfloat
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/mipsle (no CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/mipsle (no CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# Linux PPC64 (no CGO)
|
||||||
|
- id: linux-ppc64-nocgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- ppc64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for linux/ppc64 (no CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built linux/ppc64 (no CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# FreeBSD AMD64 (no CGO)
|
||||||
|
- id: freebsd-amd64-nocgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- freebsd
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for freebsd/amd64 (no CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built freebsd/amd64 (no CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
# FreeBSD ARM64 (no CGO)
|
||||||
|
- id: freebsd-arm64-nocgo
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
goos:
|
||||||
|
- freebsd
|
||||||
|
goarch:
|
||||||
|
- arm64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
no_unique_dist_dir: true
|
||||||
|
hooks:
|
||||||
|
pre:
|
||||||
|
- echo "Starting build for freebsd/arm64 (no CGO)"
|
||||||
|
post:
|
||||||
|
- echo "Successfully built freebsd/arm64 (no CGO)"
|
||||||
|
- echo "---"
|
||||||
|
|
||||||
|
universal_binaries:
|
||||||
|
- name_template: "goecs"
|
||||||
|
replace: false
|
||||||
|
ids:
|
||||||
|
- darwin-amd64-cgo
|
||||||
|
- darwin-arm64-cgo
|
||||||
|
|
||||||
|
checksum:
|
||||||
|
name_template: "checksums.txt"
|
||||||
|
algorithm: sha256
|
||||||
|
disable: false
|
||||||
|
ids:
|
||||||
|
- linux-amd64-cgo
|
||||||
|
- linux-386-cgo
|
||||||
|
- linux-arm64-cgo
|
||||||
|
- linux-riscv64-cgo
|
||||||
|
- linux-mips64-cgo
|
||||||
|
- linux-mips64le-cgo
|
||||||
|
- linux-ppc64le-cgo
|
||||||
|
- windows-amd64-cgo
|
||||||
|
- windows-386-cgo
|
||||||
|
- darwin-amd64-cgo
|
||||||
|
- darwin-arm64-cgo
|
||||||
|
- linux-arm-nocgo
|
||||||
|
- linux-s390x-nocgo
|
||||||
|
- linux-mips-nocgo
|
||||||
|
- linux-mipsle-nocgo
|
||||||
|
- linux-ppc64-nocgo
|
||||||
|
- freebsd-amd64-nocgo
|
||||||
|
- freebsd-arm64-nocgo
|
||||||
|
extra_files:
|
||||||
|
- glob: "./goecs.sh"
|
||||||
|
|
||||||
|
snapshot:
|
||||||
|
name_template: "goecs"
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- id: default
|
||||||
|
name_template: "goecs_{{ .Os }}_{{ .Arch }}"
|
||||||
|
format: zip
|
||||||
|
files:
|
||||||
|
- none*
|
||||||
|
allow_different_binary_count: true
|
||||||
|
builds:
|
||||||
|
- linux-amd64-cgo
|
||||||
|
- linux-386-cgo
|
||||||
|
- linux-arm64-cgo
|
||||||
|
- linux-riscv64-cgo
|
||||||
|
- linux-mips64-cgo
|
||||||
|
- linux-mips64le-cgo
|
||||||
|
- linux-ppc64le-cgo
|
||||||
|
- windows-amd64-cgo
|
||||||
|
- windows-386-cgo
|
||||||
|
- darwin-amd64-cgo
|
||||||
|
- darwin-arm64-cgo
|
||||||
|
- linux-arm-nocgo
|
||||||
|
- linux-s390x-nocgo
|
||||||
|
- linux-mips-nocgo
|
||||||
|
- linux-mipsle-nocgo
|
||||||
|
- linux-ppc64-nocgo
|
||||||
|
- freebsd-amd64-nocgo
|
||||||
|
- freebsd-arm64-nocgo
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
sort: asc
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- "^docs:"
|
||||||
|
- "^test:"
|
||||||
|
- "^chore"
|
||||||
|
- Merge pull request
|
||||||
|
- Merge branch
|
||||||
|
- go mod tidy
|
||||||
|
- New translations
|
@@ -12,5 +12,5 @@ func Basic(language string) {
|
|||||||
ipInfo, _, _ := network.NetworkCheck("both", false, language)
|
ipInfo, _, _ := network.NetworkCheck("both", false, language)
|
||||||
systemInfo := system.CheckSystemInfo(language)
|
systemInfo := system.CheckSystemInfo(language)
|
||||||
basicInfo := strings.ReplaceAll(systemInfo+ipInfo, "\n\n", "\n")
|
basicInfo := strings.ReplaceAll(systemInfo+ipInfo, "\n\n", "\n")
|
||||||
fmt.Printf(basicInfo)
|
fmt.Print(basicInfo)
|
||||||
}
|
}
|
132
.back/build.yaml
Normal file
132
.back/build.yaml
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
name: Goreleaser
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
goreleaser:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
# 1.20 是 Windows 7/8 Server 2008/2012 最后一个支持版本
|
||||||
|
image: goreleaser/goreleaser-cross:v1.20
|
||||||
|
steps:
|
||||||
|
- name: Configure git safe directory
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory /__w/ecs/ecs
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: 1.23.4
|
||||||
|
|
||||||
|
- name: Configure Git for Private Modules
|
||||||
|
run: |
|
||||||
|
git config --global url."https://${{ secrets.GHT }}@github.com/".insteadOf "https://github.com/"
|
||||||
|
git config --global url."git@github.com:".insteadOf "https://github.com/"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
|
||||||
|
- name: Install missing cross-compilation tools
|
||||||
|
run: |
|
||||||
|
echo "Installing missing cross-compilation tools..."
|
||||||
|
apt-get update
|
||||||
|
PACKAGES=(
|
||||||
|
gcc-multilib
|
||||||
|
g++-multilib
|
||||||
|
linux-libc-dev
|
||||||
|
linux-libc-dev:i386
|
||||||
|
libc6-dev-i386
|
||||||
|
libc6-dev-i386-cross
|
||||||
|
gcc-aarch64-linux-gnu
|
||||||
|
gcc-riscv64-linux-gnu
|
||||||
|
gcc-mips64-linux-gnuabi64
|
||||||
|
gcc-mips64el-linux-gnuabi64
|
||||||
|
gcc-powerpc64le-linux-gnu
|
||||||
|
gcc-mingw-w64-x86-64
|
||||||
|
gcc-mingw-w64-i686
|
||||||
|
libc6-dev-amd64-cross
|
||||||
|
libc6-dev-arm64-cross
|
||||||
|
libc6-dev-riscv64-cross
|
||||||
|
libc6-dev-mips64-cross
|
||||||
|
libc6-dev-mips64el-cross
|
||||||
|
libc6-dev-ppc64el-cross
|
||||||
|
)
|
||||||
|
for pkg in "${PACKAGES[@]}"; do
|
||||||
|
echo "Installing $pkg..."
|
||||||
|
apt-get install -y "$pkg" || echo "Failed to install $pkg, continuing..."
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Verify cross-compilation tools
|
||||||
|
run: |
|
||||||
|
echo "Checking available cross-compilation tools..."
|
||||||
|
echo "=== GCC compilers ==="
|
||||||
|
which gcc || echo "gcc not found"
|
||||||
|
which x86_64-linux-gnu-gcc || echo "x86_64-linux-gnu-gcc not found"
|
||||||
|
which aarch64-linux-gnu-gcc || echo "aarch64-linux-gnu-gcc not found"
|
||||||
|
which riscv64-linux-gnu-gcc || echo "riscv64-linux-gnu-gcc not found"
|
||||||
|
which mips64-linux-gnuabi64-gcc || echo "mips64-linux-gnuabi64-gcc not found"
|
||||||
|
which mips64el-linux-gnuabi64-gcc || echo "mips64el-linux-gnuabi64-gcc not found"
|
||||||
|
which powerpc64le-linux-gnu-gcc || echo "powerpc64le-linux-gnu-gcc not found"
|
||||||
|
echo "=== MinGW compilers ==="
|
||||||
|
which x86_64-w64-mingw32-gcc || echo "x86_64-w64-mingw32-gcc not found"
|
||||||
|
which i686-w64-mingw32-gcc || echo "i686-w64-mingw32-gcc not found"
|
||||||
|
echo "=== OSXCross compilers ==="
|
||||||
|
which o64-clang || echo "o64-clang not found"
|
||||||
|
which oa64-clang || echo "oa64-clang not found"
|
||||||
|
which o64-clang++ || echo "o64-clang++ not found"
|
||||||
|
which oa64-clang++ || echo "oa64-clang++ not found"
|
||||||
|
echo "=== Clang compilers ==="
|
||||||
|
which clang || echo "clang not found"
|
||||||
|
echo "=== Available gcc binaries ==="
|
||||||
|
ls -la /usr/bin/*gcc* | head -20
|
||||||
|
echo "=== Available clang binaries ==="
|
||||||
|
ls -la /usr/bin/*clang* | head -10
|
||||||
|
echo "=== OSXCross directory ==="
|
||||||
|
ls -la /usr/osxcross/bin/ 2>/dev/null || echo "OSXCross not found in /usr/osxcross/bin/"
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
distribution: goreleaser
|
||||||
|
version: latest
|
||||||
|
args: release --parallelism 1 --verbose
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
GOPRIVATE: github.com/oneclickvirt/security
|
||||||
|
|
||||||
|
- name: Update goecs.sh with new version
|
||||||
|
run: |
|
||||||
|
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
|
||||||
|
VERSION="${GITHUB_REF#refs/tags/v}"
|
||||||
|
else
|
||||||
|
VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.1.37")
|
||||||
|
fi
|
||||||
|
echo "Using version: $VERSION"
|
||||||
|
FILE="goecs.sh"
|
||||||
|
BRANCH="master"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global --unset url."git@github.com:".insteadOf || true
|
||||||
|
git fetch origin $BRANCH
|
||||||
|
git checkout $BRANCH
|
||||||
|
if [ ! -f "$FILE" ]; then
|
||||||
|
echo "Error: $FILE not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sed -i "s/\(_yellow \"Unable to get version info, using default version \).*\(\".*\)/\1$VERSION\2/" "$FILE"
|
||||||
|
sed -i "s/\(ECS_VERSION=\"\).*\(\"\)/\1$VERSION\2/" "$FILE"
|
||||||
|
if git diff --quiet "$FILE"; then
|
||||||
|
echo "No changes detected in $FILE"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
git add "$FILE"
|
||||||
|
git commit -m "chore: update ECS_VERSION to $VERSION in goecs.sh"
|
||||||
|
git push origin $BRANCH
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
@@ -7,5 +7,5 @@ import (
|
|||||||
|
|
||||||
func ComMediaTest(language string) {
|
func ComMediaTest(language string) {
|
||||||
res := commediatests.MediaTests(language)
|
res := commediatests.MediaTests(language)
|
||||||
fmt.Printf(res)
|
fmt.Print(res)
|
||||||
}
|
}
|
@@ -15,8 +15,8 @@ func TestIpv4SecurityCheck(t *testing.T) {
|
|||||||
// 全项测试
|
// 全项测试
|
||||||
ipInfo, securityInfo, _ := NetworkCheck("both", true, "zh")
|
ipInfo, securityInfo, _ := NetworkCheck("both", true, "zh")
|
||||||
fmt.Println("--------------------------------------------------")
|
fmt.Println("--------------------------------------------------")
|
||||||
fmt.Printf(ipInfo)
|
fmt.Print(ipInfo)
|
||||||
fmt.Println("--------------------------------------------------")
|
fmt.Println("--------------------------------------------------")
|
||||||
fmt.Printf(securityInfo)
|
fmt.Print(securityInfo)
|
||||||
fmt.Println("--------------------------------------------------")
|
fmt.Println("--------------------------------------------------")
|
||||||
}
|
}
|
@@ -1,4 +1,4 @@
|
|||||||
name: goreleaser
|
name: Build and Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.4
|
go-version: 1.24.5
|
||||||
|
|
||||||
- name: Configure Git for Private Modules
|
- name: Configure Git for Private Modules
|
||||||
run: |
|
run: |
|
||||||
@@ -32,10 +32,11 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
# version: latest
|
||||||
|
version: '~> v2'
|
||||||
args: release
|
args: release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
@@ -70,4 +71,4 @@ jobs:
|
|||||||
git commit -m "chore: update ECS_VERSION to $VERSION in goecs.sh"
|
git commit -m "chore: update ECS_VERSION to $VERSION in goecs.sh"
|
||||||
git push origin $BRANCH
|
git push origin $BRANCH
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
467
.github/workflows/build_binary_cgo.old
vendored
Normal file
467
.github/workflows/build_binary_cgo.old
vendored
Normal file
@@ -0,0 +1,467 @@
|
|||||||
|
name: Build and Release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Release Check And Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get latest tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Generate changelog
|
||||||
|
id: changelog
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
PREV_TAG=$(git describe --tags --abbrev=0 "$TAG^" 2>/dev/null || echo "")
|
||||||
|
if [ -z "$PREV_TAG" ]; then
|
||||||
|
CHANGELOG=$(git log --oneline --pretty=format:"* %H %s" "$TAG" | head -20)
|
||||||
|
else
|
||||||
|
CHANGELOG=$(git log --oneline --pretty=format:"* %H %s" "$PREV_TAG..$TAG")
|
||||||
|
fi
|
||||||
|
FULL_CHANGELOG="## Changelog"$'\n'"$CHANGELOG"
|
||||||
|
echo "$FULL_CHANGELOG" > changelog.txt
|
||||||
|
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
echo "$FULL_CHANGELOG" >> $GITHUB_OUTPUT
|
||||||
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create or update release
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
CHANGELOG_BODY=$(cat changelog.txt | jq -Rs .)
|
||||||
|
RELEASE_EXISTS=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id // empty')
|
||||||
|
if [ -z "$RELEASE_EXISTS" ]; then
|
||||||
|
curl -s -X POST -H "Authorization: Bearer ${{ secrets.GHT }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":$CHANGELOG_BODY,\"draft\":false,\"prerelease\":false}" \
|
||||||
|
"https://api.github.com/repos/${{ github.repository }}/releases"
|
||||||
|
else
|
||||||
|
curl -s -X PATCH -H "Authorization: Bearer ${{ secrets.GHT }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"body\":$CHANGELOG_BODY}" \
|
||||||
|
"https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_EXISTS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Delete existing release assets
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
if [ "$RELEASE_ID" != "null" ]; then
|
||||||
|
ASSETS=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets" | jq -r '.[] | .id')
|
||||||
|
for asset in $ASSETS; do
|
||||||
|
curl -s -X DELETE -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/assets/$asset"
|
||||||
|
done
|
||||||
|
sleep 30
|
||||||
|
fi
|
||||||
|
|
||||||
|
release-binary:
|
||||||
|
name: Release Go Binary
|
||||||
|
needs: build
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: x86_64-linux-gnu-gcc
|
||||||
|
cflags: "-O2 -static -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: 386
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: x86_64-linux-gnu-gcc
|
||||||
|
cflags: "-m32 -O1 -march=i686 -mtune=generic -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-multilib"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: aarch64-linux-gnu-gcc
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-aarch64-linux-gnu"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: riscv64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: riscv64-linux-gnu-gcc
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-riscv64-linux-gnu"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: mips64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: mips64-linux-gnuabi64-gcc
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-mips64-linux-gnuabi64"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: mips64le
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: mips64el-linux-gnuabi64-gcc
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-mips64el-linux-gnuabi64"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: ppc64le
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: powerpc64le-linux-gnu-gcc
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-powerpc64le-linux-gnu"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: arm
|
||||||
|
# goarm: 7
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: arm-linux-gnueabihf-gcc
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-arm-linux-gnueabihf"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: windows
|
||||||
|
goarch: amd64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: x86_64-w64-mingw32-gcc
|
||||||
|
cflags: "-O2 -static-libgcc -static-libstdc++"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-mingw-w64-x86-64"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: windows
|
||||||
|
goarch: 386
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: i686-w64-mingw32-gcc
|
||||||
|
cflags: "-O2 -static-libgcc -static-libstdc++"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential gcc-mingw-w64-i686"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: windows
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-extldflags=-static -s -w"
|
||||||
|
packages: "build-essential"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: darwin
|
||||||
|
goarch: amd64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: macos-latest
|
||||||
|
|
||||||
|
- goos: darwin
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: macos-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: s390x
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: mips
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: mipsle
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: ppc64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: windows
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: amd64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: 1.24.5
|
||||||
|
|
||||||
|
- name: Configure Git for Private Modules
|
||||||
|
run: |
|
||||||
|
git config --global url."https://${{ secrets.GHT }}@github.com/".insteadOf "https://github.com/"
|
||||||
|
git config --global url."git@github.com:".insteadOf "https://github.com/"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
|
||||||
|
- name: Install cross-compilation tools
|
||||||
|
if: matrix.runner != 'macos-latest'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
case "${{ matrix.goos }}-${{ matrix.goarch }}" in
|
||||||
|
linux-386)
|
||||||
|
sudo apt-get install -y build-essential gcc-multilib g++-multilib ;;
|
||||||
|
linux-arm64)
|
||||||
|
sudo apt-get install -y build-essential gcc-aarch64-linux-gnu ;;
|
||||||
|
linux-riscv64)
|
||||||
|
sudo apt-get install -y build-essential gcc-riscv64-linux-gnu ;;
|
||||||
|
linux-mips64)
|
||||||
|
sudo apt-get install -y build-essential gcc-mips64-linux-gnuabi64 ;;
|
||||||
|
linux-mips64le)
|
||||||
|
sudo apt-get install -y build-essential gcc-mips64el-linux-gnuabi64 ;;
|
||||||
|
linux-ppc64le)
|
||||||
|
sudo apt-get install -y build-essential gcc-powerpc64le-linux-gnu ;;
|
||||||
|
linux-arm)
|
||||||
|
sudo apt-get install -y build-essential gcc-arm-linux-gnueabihf ;;
|
||||||
|
windows-amd64|windows-386)
|
||||||
|
sudo apt-get install -y build-essential gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 ;;
|
||||||
|
*)
|
||||||
|
sudo apt-get install -y build-essential ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
- name: Get latest tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build Binary
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: ${{ matrix.cgo_enabled }}
|
||||||
|
GOOS: ${{ matrix.goos }}
|
||||||
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
CC: ${{ matrix.cc }}
|
||||||
|
CGO_CFLAGS: ${{ matrix.cflags }}
|
||||||
|
CGO_LDFLAGS: ${{ matrix.ldflags }}
|
||||||
|
run: |
|
||||||
|
go clean -cache -modcache -testcache
|
||||||
|
|
||||||
|
# 设置额外的环境变量
|
||||||
|
if [[ -n "${{ matrix.goarm }}" ]]; then
|
||||||
|
export GOARM=${{ matrix.goarm }}
|
||||||
|
fi
|
||||||
|
if [[ -n "${{ matrix.gomips }}" ]]; then
|
||||||
|
export GOMIPS=${{ matrix.gomips }}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 针对 Darwin 的特殊处理
|
||||||
|
if [[ "${{ matrix.cgo_enabled }}" == "1" && "${{ matrix.goos }}" == "darwin" ]]; then
|
||||||
|
if [[ "${{ matrix.goarch }}" == "amd64" ]]; then
|
||||||
|
export CC="x86_64-apple-darwin21.4-clang"
|
||||||
|
export CXX="x86_64-apple-darwin21.4-clang++"
|
||||||
|
elif [[ "${{ matrix.goarch }}" == "arm64" ]]; then
|
||||||
|
export CC="aarch64-apple-darwin21.4-clang"
|
||||||
|
export CXX="aarch64-apple-darwin21.4-clang++"
|
||||||
|
fi
|
||||||
|
export OSXCROSS_ROOT="${OSXCROSS_ROOT}"
|
||||||
|
elif [[ "${{ matrix.cgo_enabled }}" == "1" && "${{ matrix.runner }}" != "macos-latest" ]]; then
|
||||||
|
# 对于 Windows 的特殊处理
|
||||||
|
if [[ "${{ matrix.goos }}" == "windows" ]]; then
|
||||||
|
export CGO_LDFLAGS="-static-libgcc -static-libstdc++"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 测试编译器(仅在启用 CGO 时)
|
||||||
|
if [[ "${{ matrix.cgo_enabled }}" == "1" && -n "$CC" ]]; then
|
||||||
|
echo 'int main() { return 0; }' > test.c
|
||||||
|
$CC $CGO_CFLAGS test.c -o test || exit 1
|
||||||
|
rm -f test.c test
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 清理和准备
|
||||||
|
rm -rf vendor/
|
||||||
|
go mod download
|
||||||
|
go mod tidy
|
||||||
|
mkdir -p bin
|
||||||
|
|
||||||
|
# 设置二进制文件名
|
||||||
|
BINARY_NAME="goecs"
|
||||||
|
if [[ "${{ matrix.goos }}" == "windows" ]]; then
|
||||||
|
BINARY_NAME="${BINARY_NAME}.exe"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 构建 LDFLAGS
|
||||||
|
LDFLAGS="-s -w -X main.version=${{ steps.tag.outputs.version }} -X main.arch=${{ matrix.goarch }}"
|
||||||
|
if [[ "${{ matrix.cgo_enabled }}" == "1" ]]; then
|
||||||
|
LDFLAGS="${LDFLAGS} -checklinkname=0 ${{ matrix.ldflags }}"
|
||||||
|
else
|
||||||
|
LDFLAGS="${LDFLAGS} -checklinkname=0 ${{ matrix.ldflags }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 执行构建
|
||||||
|
echo "Building for GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED"
|
||||||
|
go build -a -o bin/$BINARY_NAME -ldflags="$LDFLAGS" -trimpath ./
|
||||||
|
|
||||||
|
# 验证文件是否存在
|
||||||
|
[[ -f "bin/$BINARY_NAME" ]] || exit 1
|
||||||
|
|
||||||
|
# 显示构建信息
|
||||||
|
echo "Built binary: bin/$BINARY_NAME"
|
||||||
|
ls -la bin/
|
||||||
|
if command -v file >/dev/null 2>&1; then
|
||||||
|
file bin/$BINARY_NAME
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Create ZIP archive
|
||||||
|
run: |
|
||||||
|
cd bin
|
||||||
|
BINARY_NAME="goecs"
|
||||||
|
if [[ "${{ matrix.goos }}" == "windows" ]]; then
|
||||||
|
BINARY_NAME="${BINARY_NAME}.exe"
|
||||||
|
fi
|
||||||
|
ZIP_NAME="goecs_${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||||
|
if [[ -n "${{ matrix.goarm }}" ]]; then
|
||||||
|
ZIP_NAME="${ZIP_NAME}v${{ matrix.goarm }}"
|
||||||
|
fi
|
||||||
|
if [[ -n "${{ matrix.gomips }}" ]]; then
|
||||||
|
ZIP_NAME="${ZIP_NAME}_${{ matrix.gomips }}"
|
||||||
|
fi
|
||||||
|
ZIP_NAME="${ZIP_NAME}.zip"
|
||||||
|
zip "$ZIP_NAME" "$BINARY_NAME"
|
||||||
|
|
||||||
|
- name: Upload to Release
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
cd bin
|
||||||
|
for file in *.zip; do
|
||||||
|
if [[ -f "$file" ]]; then
|
||||||
|
curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" \
|
||||||
|
-H "Content-Type: application/zip" \
|
||||||
|
--data-binary @"$file" \
|
||||||
|
"https://uploads.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets?name=$file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
checksums:
|
||||||
|
name: Generate Checksums
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: release-binary
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get latest tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Download release assets
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
mkdir -p assets
|
||||||
|
ASSETS=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets")
|
||||||
|
echo "$ASSETS" | jq -r '.[] | select(.name | endswith(".zip")) | .browser_download_url' | while read url; do
|
||||||
|
filename=$(basename "$url")
|
||||||
|
curl -L -H "Authorization: Bearer ${{ secrets.GHT }}" "$url" -o "assets/$filename"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Generate checksums
|
||||||
|
run: |
|
||||||
|
cd assets
|
||||||
|
sha256sum *.zip > checksums.txt
|
||||||
|
if [[ -f "../goecs.sh" ]]; then
|
||||||
|
sha256sum ../goecs.sh >> checksums.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload checksums
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" \
|
||||||
|
-H "Content-Type: text/plain" \
|
||||||
|
--data-binary @assets/checksums.txt \
|
||||||
|
"https://uploads.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets?name=checksums.txt"
|
||||||
|
|
||||||
|
update-script:
|
||||||
|
name: Update Script Version
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: checksums
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get latest tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Update goecs.sh version
|
||||||
|
run: |
|
||||||
|
VERSION="${{ steps.tag.outputs.version }}"
|
||||||
|
BRANCH="master"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global --unset url."git@github.com:".insteadOf || true
|
||||||
|
git fetch origin $BRANCH
|
||||||
|
git checkout $BRANCH
|
||||||
|
if [ -f "goecs.sh" ]; then
|
||||||
|
sed -i "s/\(_yellow \"Unable to get version info, using default version \).*\(\".*\)/\1$VERSION\2/" "goecs.sh"
|
||||||
|
sed -i "s/\(ECS_VERSION=\"\).*\(\"\)/\1$VERSION\2/" "goecs.sh"
|
||||||
|
if ! git diff --quiet "goecs.sh"; then
|
||||||
|
git add "goecs.sh"
|
||||||
|
git commit -m "chore: update ECS_VERSION to $VERSION in goecs.sh"
|
||||||
|
git push origin $BRANCH
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
527
.github/workflows/build_binary_musl.old
vendored
Normal file
527
.github/workflows/build_binary_musl.old
vendored
Normal file
@@ -0,0 +1,527 @@
|
|||||||
|
name: Build and Release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Release Check And Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get latest tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Generate changelog
|
||||||
|
id: changelog
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
PREV_TAG=$(git describe --tags --abbrev=0 "$TAG^" 2>/dev/null || echo "")
|
||||||
|
if [ -z "$PREV_TAG" ]; then
|
||||||
|
CHANGELOG=$(git log --oneline --pretty=format:"* %H %s" "$TAG" | head -20)
|
||||||
|
else
|
||||||
|
CHANGELOG=$(git log --oneline --pretty=format:"* %H %s" "$PREV_TAG..$TAG")
|
||||||
|
fi
|
||||||
|
FULL_CHANGELOG="## Changelog"$'\n'"$CHANGELOG"
|
||||||
|
echo "$FULL_CHANGELOG" > changelog.txt
|
||||||
|
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
echo "$FULL_CHANGELOG" >> $GITHUB_OUTPUT
|
||||||
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create or update release
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
CHANGELOG_BODY=$(cat changelog.txt | jq -Rs .)
|
||||||
|
RELEASE_EXISTS=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id // empty')
|
||||||
|
if [ -z "$RELEASE_EXISTS" ]; then
|
||||||
|
curl -s -X POST -H "Authorization: Bearer ${{ secrets.GHT }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":$CHANGELOG_BODY,\"draft\":false,\"prerelease\":false}" \
|
||||||
|
"https://api.github.com/repos/${{ github.repository }}/releases"
|
||||||
|
else
|
||||||
|
curl -s -X PATCH -H "Authorization: Bearer ${{ secrets.GHT }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"body\":$CHANGELOG_BODY}" \
|
||||||
|
"https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_EXISTS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Delete existing release assets
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
if [ "$RELEASE_ID" != "null" ]; then
|
||||||
|
ASSETS=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets" | jq -r '.[] | .id')
|
||||||
|
for asset in $ASSETS; do
|
||||||
|
curl -s -X DELETE -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/assets/$asset"
|
||||||
|
done
|
||||||
|
sleep 30
|
||||||
|
fi
|
||||||
|
|
||||||
|
build-musl-toolchain:
|
||||||
|
name: Build musl Cross-Compiler Toolchain
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target:
|
||||||
|
- x86_64-linux-musl
|
||||||
|
- i686-linux-musl
|
||||||
|
- aarch64-linux-musl
|
||||||
|
- riscv64-linux-musl
|
||||||
|
- mips64-linux-musl
|
||||||
|
- mips64el-linux-musl
|
||||||
|
- powerpc64le-linux-musl
|
||||||
|
- arm-linux-musleabihf
|
||||||
|
steps:
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y build-essential curl
|
||||||
|
|
||||||
|
- name: Cache musl toolchain
|
||||||
|
id: cache-musl
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: /opt/musl-${{ matrix.target }}
|
||||||
|
key: musl-toolchain-${{ matrix.target }}-v2
|
||||||
|
|
||||||
|
- name: Build musl cross-compiler
|
||||||
|
if: steps.cache-musl.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
# Clone musl-cross-make
|
||||||
|
git clone https://github.com/richfelker/musl-cross-make.git
|
||||||
|
cd musl-cross-make
|
||||||
|
|
||||||
|
# Create config for target
|
||||||
|
cat > config.mak << EOF
|
||||||
|
TARGET = ${{ matrix.target }}
|
||||||
|
OUTPUT = /opt/musl-${{ matrix.target }}
|
||||||
|
COMMON_CONFIG += --disable-nls
|
||||||
|
GCC_CONFIG += --enable-languages=c,c++
|
||||||
|
GCC_CONFIG += --disable-libquadmath --disable-decimal-float
|
||||||
|
GCC_CONFIG += --disable-libitm --disable-fixed-point
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Build the toolchain
|
||||||
|
make -j$(nproc)
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
# Verify installation
|
||||||
|
ls -la /opt/musl-${{ matrix.target }}/bin/
|
||||||
|
/opt/musl-${{ matrix.target }}/bin/${{ matrix.target }}-gcc --version
|
||||||
|
|
||||||
|
- name: Create toolchain artifact
|
||||||
|
run: |
|
||||||
|
sudo tar -czf musl-${{ matrix.target }}-toolchain.tar.gz -C /opt musl-${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Upload toolchain artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: musl-${{ matrix.target }}-toolchain
|
||||||
|
path: musl-${{ matrix.target }}-toolchain.tar.gz
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
release-binary:
|
||||||
|
name: Release Go Binary
|
||||||
|
needs: [build, build-musl-toolchain]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
musl_target: x86_64-linux-musl
|
||||||
|
cflags: "-O2 -static -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: 386
|
||||||
|
cgo_enabled: "1"
|
||||||
|
musl_target: i686-linux-musl
|
||||||
|
cflags: "-O1 -march=i686 -mtune=generic -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
musl_target: aarch64-linux-musl
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: riscv64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
musl_target: riscv64-linux-musl
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: mips64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
musl_target: mips64-linux-musl
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: mips64le
|
||||||
|
cgo_enabled: "1"
|
||||||
|
musl_target: mips64el-linux-musl
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: ppc64le
|
||||||
|
cgo_enabled: "1"
|
||||||
|
musl_target: powerpc64le-linux-musl
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: arm
|
||||||
|
cgo_enabled: "1"
|
||||||
|
musl_target: arm-linux-musleabihf
|
||||||
|
cflags: "-O1 -fno-stack-protector"
|
||||||
|
ldflags: "-extldflags=-latomic -static"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: windows
|
||||||
|
goarch: amd64
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: x86_64-w64-mingw32-gcc
|
||||||
|
cflags: "-O2 -static-libgcc -static-libstdc++"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
packages: "build-essential gcc-mingw-w64-x86-64"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: windows
|
||||||
|
goarch: 386
|
||||||
|
cgo_enabled: "1"
|
||||||
|
cc: i686-w64-mingw32-gcc
|
||||||
|
cflags: "-O2 -static-libgcc -static-libstdc++"
|
||||||
|
ldflags: "-extldflags=-static"
|
||||||
|
packages: "build-essential gcc-mingw-w64-i686"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: windows
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
packages: "build-essential"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: darwin
|
||||||
|
goarch: amd64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: macos-latest
|
||||||
|
|
||||||
|
- goos: darwin
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: macos-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: s390x
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: mips
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: mipsle
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: linux
|
||||||
|
goarch: ppc64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: amd64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: arm64
|
||||||
|
cgo_enabled: "0"
|
||||||
|
ldflags: "-s -w"
|
||||||
|
runner: ubuntu-latest
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: 1.24.5
|
||||||
|
|
||||||
|
- name: Configure Git for Private Modules
|
||||||
|
run: |
|
||||||
|
git config --global url."https://${{ secrets.GHT }}@github.com/".insteadOf "https://github.com/"
|
||||||
|
git config --global url."git@github.com:".insteadOf "https://github.com/"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
|
||||||
|
- name: Download musl toolchain
|
||||||
|
if: matrix.musl_target != ''
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: musl-${{ matrix.musl_target }}-toolchain
|
||||||
|
|
||||||
|
- name: Setup musl toolchain
|
||||||
|
if: matrix.musl_target != ''
|
||||||
|
run: |
|
||||||
|
sudo tar -xzf musl-${{ matrix.musl_target }}-toolchain.tar.gz -C /opt/
|
||||||
|
echo "/opt/musl-${{ matrix.musl_target }}/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
# Verify toolchain is working
|
||||||
|
/opt/musl-${{ matrix.musl_target }}/bin/${{ matrix.musl_target }}-gcc --version
|
||||||
|
|
||||||
|
# Test compiler
|
||||||
|
echo 'int main() { return 0; }' > test.c
|
||||||
|
/opt/musl-${{ matrix.musl_target }}/bin/${{ matrix.musl_target }}-gcc ${{ matrix.cflags }} test.c -o test
|
||||||
|
rm -f test.c test
|
||||||
|
|
||||||
|
- name: Install cross-compilation tools (non-musl)
|
||||||
|
if: matrix.runner != 'macos-latest' && matrix.musl_target == ''
|
||||||
|
run: |
|
||||||
|
sudo systemctl restart systemd-resolved || true
|
||||||
|
sudo apt-get update -qq || (sleep 10 && sudo apt-get update -qq)
|
||||||
|
|
||||||
|
case "${{ matrix.goos }}-${{ matrix.goarch }}" in
|
||||||
|
windows-amd64|windows-386)
|
||||||
|
for i in 1 2 3; do
|
||||||
|
sudo apt-get install -y build-essential gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 && break || sleep 10
|
||||||
|
done ;;
|
||||||
|
*)
|
||||||
|
sudo systemctl restart systemd-resolved || true
|
||||||
|
for i in 1 2 3; do
|
||||||
|
sudo apt-get install -y build-essential && break || sleep 10
|
||||||
|
done ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
- name: Get latest tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build Binary
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: ${{ matrix.cgo_enabled }}
|
||||||
|
GOOS: ${{ matrix.goos }}
|
||||||
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
CGO_CFLAGS: ${{ matrix.cflags }}
|
||||||
|
CGO_LDFLAGS: ${{ matrix.ldflags }}
|
||||||
|
run: |
|
||||||
|
go clean -cache -modcache -testcache
|
||||||
|
|
||||||
|
# Set CC based on target
|
||||||
|
if [[ "${{ matrix.musl_target }}" != "" ]]; then
|
||||||
|
export CC="/opt/musl-${{ matrix.musl_target }}/bin/${{ matrix.musl_target }}-gcc"
|
||||||
|
export CXX="/opt/musl-${{ matrix.musl_target }}/bin/${{ matrix.musl_target }}-g++"
|
||||||
|
elif [[ "${{ matrix.cc }}" != "" ]]; then
|
||||||
|
export CC="${{ matrix.cc }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 设置额外的环境变量
|
||||||
|
if [[ -n "${{ matrix.goarm }}" ]]; then
|
||||||
|
export GOARM=${{ matrix.goarm }}
|
||||||
|
fi
|
||||||
|
if [[ -n "${{ matrix.gomips }}" ]]; then
|
||||||
|
export GOMIPS=${{ matrix.gomips }}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 针对 Darwin 的特殊处理
|
||||||
|
if [[ "${{ matrix.cgo_enabled }}" == "1" && "${{ matrix.goos }}" == "darwin" ]]; then
|
||||||
|
if [[ "${{ matrix.goarch }}" == "amd64" ]]; then
|
||||||
|
export CC="x86_64-apple-darwin21.4-clang"
|
||||||
|
export CXX="x86_64-apple-darwin21.4-clang++"
|
||||||
|
elif [[ "${{ matrix.goarch }}" == "arm64" ]]; then
|
||||||
|
export CC="aarch64-apple-darwin21.4-clang"
|
||||||
|
export CXX="aarch64-apple-darwin21.4-clang++"
|
||||||
|
fi
|
||||||
|
export OSXCROSS_ROOT="${OSXCROSS_ROOT}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 清理和准备
|
||||||
|
rm -rf vendor/
|
||||||
|
go mod download
|
||||||
|
go mod tidy
|
||||||
|
mkdir -p bin
|
||||||
|
|
||||||
|
# 设置二进制文件名
|
||||||
|
BINARY_NAME="goecs"
|
||||||
|
if [[ "${{ matrix.goos }}" == "windows" ]]; then
|
||||||
|
BINARY_NAME="${BINARY_NAME}.exe"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 构建 LDFLAGS
|
||||||
|
LDFLAGS="-s -w -X main.version=${{ steps.tag.outputs.version }} -X main.arch=${{ matrix.goarch }}"
|
||||||
|
if [[ "${{ matrix.cgo_enabled }}" == "1" ]]; then
|
||||||
|
LDFLAGS="${LDFLAGS} -checklinkname=0 ${{ matrix.ldflags }}"
|
||||||
|
else
|
||||||
|
LDFLAGS="${LDFLAGS} -checklinkname=0 ${{ matrix.ldflags }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 执行构建
|
||||||
|
echo "Building for GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED"
|
||||||
|
if [[ -n "$CC" ]]; then
|
||||||
|
echo "Using CC=$CC"
|
||||||
|
fi
|
||||||
|
|
||||||
|
go build -a -o bin/$BINARY_NAME -ldflags="$LDFLAGS" -trimpath ./
|
||||||
|
|
||||||
|
# 验证文件是否存在
|
||||||
|
[[ -f "bin/$BINARY_NAME" ]] || exit 1
|
||||||
|
|
||||||
|
# 显示构建信息
|
||||||
|
echo "Built binary: bin/$BINARY_NAME"
|
||||||
|
ls -la bin/
|
||||||
|
if command -v file >/dev/null 2>&1; then
|
||||||
|
file bin/$BINARY_NAME
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Create ZIP archive
|
||||||
|
run: |
|
||||||
|
cd bin
|
||||||
|
BINARY_NAME="goecs"
|
||||||
|
if [[ "${{ matrix.goos }}" == "windows" ]]; then
|
||||||
|
BINARY_NAME="${BINARY_NAME}.exe"
|
||||||
|
fi
|
||||||
|
ZIP_NAME="goecs_${{ matrix.goos }}_${{ matrix.goarch }}"
|
||||||
|
if [[ -n "${{ matrix.goarm }}" ]]; then
|
||||||
|
ZIP_NAME="${ZIP_NAME}v${{ matrix.goarm }}"
|
||||||
|
fi
|
||||||
|
if [[ -n "${{ matrix.gomips }}" ]]; then
|
||||||
|
ZIP_NAME="${ZIP_NAME}_${{ matrix.gomips }}"
|
||||||
|
fi
|
||||||
|
ZIP_NAME="${ZIP_NAME}.zip"
|
||||||
|
zip "$ZIP_NAME" "$BINARY_NAME"
|
||||||
|
|
||||||
|
- name: Upload to Release
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
cd bin
|
||||||
|
for file in *.zip; do
|
||||||
|
if [[ -f "$file" ]]; then
|
||||||
|
curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" \
|
||||||
|
-H "Content-Type: application/zip" \
|
||||||
|
--data-binary @"$file" \
|
||||||
|
"https://uploads.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets?name=$file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
checksums:
|
||||||
|
name: Generate Checksums
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: release-binary
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get latest tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Download release assets
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
mkdir -p assets
|
||||||
|
ASSETS=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets")
|
||||||
|
echo "$ASSETS" | jq -r '.[] | select(.name | endswith(".zip")) | .browser_download_url' | while read url; do
|
||||||
|
filename=$(basename "$url")
|
||||||
|
curl -L -H "Authorization: Bearer ${{ secrets.GHT }}" "$url" -o "assets/$filename"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Generate checksums
|
||||||
|
run: |
|
||||||
|
cd assets
|
||||||
|
sha256sum *.zip > checksums.txt
|
||||||
|
if [[ -f "../goecs.sh" ]]; then
|
||||||
|
sha256sum ../goecs.sh >> checksums.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload checksums
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" | jq -r '.id')
|
||||||
|
curl -s -H "Authorization: Bearer ${{ secrets.GHT }}" \
|
||||||
|
-H "Content-Type: text/plain" \
|
||||||
|
--data-binary @assets/checksums.txt \
|
||||||
|
"https://uploads.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets?name=checksums.txt"
|
||||||
|
|
||||||
|
update-script:
|
||||||
|
name: Update Script Version
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: checksums
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get latest tag
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Update goecs.sh version
|
||||||
|
run: |
|
||||||
|
VERSION="${{ steps.tag.outputs.version }}"
|
||||||
|
BRANCH="master"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global --unset url."git@github.com:".insteadOf || true
|
||||||
|
git fetch origin $BRANCH
|
||||||
|
git checkout $BRANCH
|
||||||
|
if [ -f "goecs.sh" ]; then
|
||||||
|
sed -i "s/\(_yellow \"Unable to get version info, using default version \).*\(\".*\)/\1$VERSION\2/" "goecs.sh"
|
||||||
|
sed -i "s/\(ECS_VERSION=\"\).*\(\"\)/\1$VERSION\2/" "goecs.sh"
|
||||||
|
if ! git diff --quiet "goecs.sh"; then
|
||||||
|
git add "goecs.sh"
|
||||||
|
git commit -m "chore: update ECS_VERSION to $VERSION in goecs.sh"
|
||||||
|
git push origin $BRANCH
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
26
.github/workflows/build_docker.yaml
vendored
26
.github/workflows/build_docker.yaml
vendored
@@ -1,8 +1,10 @@
|
|||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
workflow_run:
|
||||||
types: [ published ]
|
workflows: ["Build and Release"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -26,12 +28,19 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Login to CNB Registry
|
# - name: Login to CNB Registry
|
||||||
|
# uses: docker/login-action@v2
|
||||||
|
# with:
|
||||||
|
# registry: ${{ secrets.CNB_DOCKER_REGISTRY }}
|
||||||
|
# username: ${{ secrets.CNB_USERNAME }}
|
||||||
|
# password: ${{ secrets.CNB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to Aliyun Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.CNB_DOCKER_REGISTRY }}
|
registry: crpi-8tmognxgyb86bm61.cn-guangzhou.personal.cr.aliyuncs.com
|
||||||
username: ${{ secrets.CNB_USERNAME }}
|
username: ${{ secrets.ALIYUN_USERNAME }}
|
||||||
password: ${{ secrets.CNB_TOKEN }}
|
password: ${{ secrets.ALIYUN_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push Docker images
|
- name: Build and push Docker images
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
@@ -39,8 +48,9 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/riscv64
|
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/riscv64
|
||||||
# linux/mips,linux/mipsle 暂不支持 alpine, linux/s390x 编译卡死
|
# linux/mips,linux/mipsle 暂不支持 alpine, linux/s390x 编译卡死,cnb组织空间不足无法推送
|
||||||
|
# ${{ secrets.CNB_DOCKER_REGISTRY }}/oneclickvirt/ecs:latest
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKER_USERNAME }}/goecs:latest
|
${{ secrets.DOCKER_USERNAME }}/goecs:latest
|
||||||
${{ secrets.CNB_DOCKER_REGISTRY }}/oneclickvirt/ecs:latest
|
crpi-8tmognxgyb86bm61.cn-guangzhou.personal.cr.aliyuncs.com/oneclickvirt/ecs:latest
|
||||||
|
@@ -1,8 +1,10 @@
|
|||||||
name: Public Build
|
name: Public Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
workflow_run:
|
||||||
types: [ published ]
|
workflows: ["Build and Release"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -17,7 +19,7 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.23.4'
|
go-version: '1.24.5'
|
||||||
|
|
||||||
- name: Create public branch
|
- name: Create public branch
|
||||||
run: |
|
run: |
|
||||||
@@ -28,49 +30,21 @@ jobs:
|
|||||||
|
|
||||||
- name: Remove security package references
|
- name: Remove security package references
|
||||||
run: |
|
run: |
|
||||||
# 移除 network 包中对 security 的引用
|
|
||||||
find . -type f -name "*.go" -exec sed -i 's|"github.com/oneclickvirt/security/network"|"github.com/oneclickvirt/basics/network"|g' {} +
|
find . -type f -name "*.go" -exec sed -i 's|"github.com/oneclickvirt/security/network"|"github.com/oneclickvirt/basics/network"|g' {} +
|
||||||
# 修改 back/network/network.go
|
|
||||||
cat > back/network/network.go << 'EOF'
|
|
||||||
package network1
|
|
||||||
|
|
||||||
import "github.com/oneclickvirt/basics/network"
|
|
||||||
|
|
||||||
func NetworkCheck(checkType string, enableSecurityCheck bool, language string) (string, string, error) {
|
|
||||||
ipInfo, _, err := network.NetworkCheck(checkType, false, language)
|
|
||||||
return ipInfo, "", err
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# 修改 utils/utils.go 中的 BasicsAndSecurityCheck 函数
|
|
||||||
sed -i '/SecurityUploadToken/d' utils/utils.go
|
sed -i '/SecurityUploadToken/d' utils/utils.go
|
||||||
sed -i 's|"github.com/oneclickvirt/security/network"|"github.com/oneclickvirt/basics/network"|g' utils/utils.go
|
sed -i 's|"github.com/oneclickvirt/security/network"|"github.com/oneclickvirt/basics/network"|g' utils/utils.go
|
||||||
|
|
||||||
# 在 utils/utils.go 中添加 token 常量(在 import 语句之后)
|
|
||||||
sed -i '/^import/,/^)/{/^)/a\'$'\n''const token = "OvwKx5qgJtf7PZgCKbtyojSU.MTcwMTUxNzY1MTgwMw"'$'\n''}' utils/utils.go
|
sed -i '/^import/,/^)/{/^)/a\'$'\n''const token = "OvwKx5qgJtf7PZgCKbtyojSU.MTcwMTUxNzY1MTgwMw"'$'\n''}' utils/utils.go
|
||||||
|
|
||||||
# 修改 go.mod,移除私有仓库依赖
|
|
||||||
sed -i '/github.com\/oneclickvirt\/security/d' go.mod
|
sed -i '/github.com\/oneclickvirt\/security/d' go.mod
|
||||||
|
|
||||||
# 修改 goecs.go,禁用 security 检测
|
|
||||||
sed -i 's|var securityFlag = flag.Bool("security", true,|var securityFlag = flag.Bool("security", false,|g' goecs.go
|
sed -i 's|var securityFlag = flag.Bool("security", true,|var securityFlag = flag.Bool("security", false,|g' goecs.go
|
||||||
|
|
||||||
# 更新依赖
|
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|
||||||
# 修改 README.md 和 README_EN.md 中的敏感信息
|
|
||||||
sed -i 's|但二进制文件编译至 \[securityCheck\].*)|但已开源|g' README.md
|
sed -i 's|但二进制文件编译至 \[securityCheck\].*)|但已开源|g' README.md
|
||||||
sed -i 's|but binary files compiled in \[securityCheck\].*)|but open sourced|g' README_EN.md
|
sed -i 's|but binary files compiled in \[securityCheck\].*)|but open sourced|g' README_EN.md
|
||||||
|
|
||||||
# 修改命令行帮助信息
|
|
||||||
sed -i 's|security.*Enable/Disable security test (default true)|security Enable/Disable security test (default false)|g' README.md
|
sed -i 's|security.*Enable/Disable security test (default true)|security Enable/Disable security test (default false)|g' README.md
|
||||||
sed -i 's|security.*Enable/Disable security test (default true)|security Enable/Disable security test (default false)|g' README_EN.md
|
sed -i 's|security.*Enable/Disable security test (default true)|security Enable/Disable security test (default false)|g' README_EN.md
|
||||||
|
|
||||||
- name: Build and Test
|
- name: Build and Test
|
||||||
run: |
|
run: |
|
||||||
# 构建二进制文件
|
|
||||||
go build -o maintest
|
go build -o maintest
|
||||||
# 测试无菜单模式是否正常运行(禁用 security 检测)
|
|
||||||
./maintest -menu=false -l en -security=false -upload=false || exit 1
|
./maintest -menu=false -l en -security=false -upload=false || exit 1
|
||||||
rm -rf maintest
|
rm -rf maintest
|
||||||
|
|
6
.github/workflows/sync.yaml
vendored
6
.github/workflows/sync.yaml
vendored
@@ -1,8 +1,10 @@
|
|||||||
name: Sync Latest Release
|
name: Sync Latest Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
workflow_run:
|
||||||
types: [published]
|
workflows: ["Build and Release"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
143
.goreleaser.yaml
143
.goreleaser.yaml
@@ -1,145 +1,67 @@
|
|||||||
project_name: goecs
|
|
||||||
env:
|
|
||||||
- GO111MODULE=on
|
|
||||||
- CGO_ENABLED=0
|
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod tidy -v
|
- go mod tidy -v
|
||||||
builds:
|
builds:
|
||||||
- id: linux-cgo
|
|
||||||
env:
|
|
||||||
- CGO_ENABLED=1
|
|
||||||
ldflags:
|
|
||||||
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
|
||||||
flags:
|
|
||||||
- -trimpath
|
|
||||||
goos:
|
|
||||||
- linux
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
- 386
|
|
||||||
- arm64
|
|
||||||
- riscv64
|
|
||||||
- mips64
|
|
||||||
- mips64le
|
|
||||||
- ppc64le
|
|
||||||
main: ./
|
|
||||||
binary: goecs
|
|
||||||
no_unique_dist_dir: true
|
|
||||||
allow_different_binary_count: true
|
|
||||||
- id: windows-cgo
|
|
||||||
env:
|
|
||||||
- CGO_ENABLED=1
|
|
||||||
ldflags:
|
|
||||||
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
|
||||||
flags:
|
|
||||||
- -trimpath
|
|
||||||
goos:
|
|
||||||
- windows
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
- 386
|
|
||||||
main: ./
|
|
||||||
binary: goecs
|
|
||||||
no_unique_dist_dir: true
|
|
||||||
allow_different_binary_count: true
|
|
||||||
- id: darwin-cgo
|
|
||||||
env:
|
|
||||||
- CGO_ENABLED=1
|
|
||||||
ldflags:
|
|
||||||
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
|
||||||
flags:
|
|
||||||
- -trimpath
|
|
||||||
goos:
|
|
||||||
- darwin
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
- arm64
|
|
||||||
main: ./
|
|
||||||
binary: goecs
|
|
||||||
no_unique_dist_dir: true
|
|
||||||
allow_different_binary_count: true
|
|
||||||
- id: universal
|
- id: universal
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
flags:
|
|
||||||
- -trimpath
|
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- windows
|
- windows
|
||||||
- freebsd
|
- freebsd
|
||||||
- openbsd
|
|
||||||
- netbsd
|
|
||||||
goarch:
|
goarch:
|
||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
- 386
|
- 386
|
||||||
- amd64
|
- amd64
|
||||||
- s390x
|
|
||||||
- mips
|
- mips
|
||||||
- mipsle
|
- mipsle
|
||||||
|
- mips64
|
||||||
|
- mips64le
|
||||||
- ppc64
|
- ppc64
|
||||||
goarm:
|
- ppc64le
|
||||||
- "5"
|
- s390x
|
||||||
- "6"
|
- riscv64
|
||||||
- "7"
|
|
||||||
gomips:
|
gomips:
|
||||||
- softfloat
|
- softfloat
|
||||||
ignore:
|
ignore:
|
||||||
# 避免和 linux-cgo 重叠
|
|
||||||
- goos: linux
|
|
||||||
goarch: amd64
|
|
||||||
- goos: linux
|
|
||||||
goarch: 386
|
|
||||||
- goos: linux
|
|
||||||
goarch: arm64
|
|
||||||
- goos: linux
|
|
||||||
goarch: riscv64
|
|
||||||
- goos: linux
|
|
||||||
goarch: mips64
|
|
||||||
- goos: linux
|
|
||||||
goarch: mips64le
|
|
||||||
- goos: linux
|
|
||||||
goarch: ppc64le
|
|
||||||
# 避免和 windows-cgo 重叠
|
|
||||||
- goos: windows
|
|
||||||
goarch: amd64
|
|
||||||
- goos: windows
|
|
||||||
goarch: 386
|
|
||||||
# 避免和 darwin-cgo 重叠
|
|
||||||
- goos: darwin
|
|
||||||
goarch: amd64
|
|
||||||
- goos: darwin
|
|
||||||
goarch: arm64
|
|
||||||
# 原系统不支持的忽略规则
|
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm
|
goarch: arm
|
||||||
- goos: freebsd
|
|
||||||
goarch: 386
|
|
||||||
- goos: openbsd
|
|
||||||
goarch: 386
|
|
||||||
- goos: netbsd
|
|
||||||
goarch: 386
|
|
||||||
main: ./
|
main: ./
|
||||||
binary: goecs
|
binary: goecs
|
||||||
no_unique_dist_dir: true
|
- id: darwin-amd64
|
||||||
allow_different_binary_count: true
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=o64-clang
|
||||||
|
- CXX=o64-clang++
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
|
- id: darwin-arm64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=oa64-clang
|
||||||
|
- CXX=oa64-clang++
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- arm64
|
||||||
|
main: ./
|
||||||
|
binary: goecs
|
||||||
universal_binaries:
|
universal_binaries:
|
||||||
- name_template: "goecs"
|
- name_template: "goecs"
|
||||||
replace: false
|
replace: false
|
||||||
ids:
|
|
||||||
- darwin-cgo
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: "checksums.txt"
|
name_template: "checksums.txt"
|
||||||
algorithm: sha256
|
|
||||||
disable: false
|
|
||||||
ids:
|
|
||||||
- linux-cgo
|
|
||||||
- windows-cgo
|
|
||||||
- darwin-cgo
|
|
||||||
- universal
|
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: "goecs"
|
name_template: "goecs"
|
||||||
archives:
|
archives:
|
||||||
@@ -147,7 +69,6 @@ archives:
|
|||||||
format: zip
|
format: zip
|
||||||
files:
|
files:
|
||||||
- none*
|
- none*
|
||||||
allow_different_binary_count: true
|
|
||||||
changelog:
|
changelog:
|
||||||
sort: asc
|
sort: asc
|
||||||
filters:
|
filters:
|
||||||
|
51
README.md
51
README.md
@@ -1,6 +1,6 @@
|
|||||||
# ECS
|
# ECS
|
||||||
|
|
||||||
[](https://github.com/oneclickvirt/ecs/actions/workflows/main.yaml)
|
[](https://github.com/oneclickvirt/ecs/actions/workflows/build_binary.yaml)
|
||||||
|
|
||||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Foneclickvirt%2Fecs?ref=badge_shield)
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Foneclickvirt%2Fecs?ref=badge_shield)
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
融合怪测评项目 - GO版本
|
融合怪测评项目 - GO版本
|
||||||
|
|
||||||
(环境安装[非必须]使用shell外无额外shell文件依赖,环境安装只是为了测的更准,极端情况下无环境依赖安装也可全测项目)
|
(仅环境安装[非必须]使用shell外无额外shell文件依赖,环境安装只是为了测的更准,极端情况下无环境依赖安装也可全测项目)
|
||||||
|
|
||||||
如有问题请 [issues](https://github.com/oneclickvirt/ecs/issues) 反馈。
|
如有问题请 [issues](https://github.com/oneclickvirt/ecs/issues) 反馈。
|
||||||
|
|
||||||
@@ -27,25 +27,28 @@ Shell 版本:[https://github.com/spiritLHLS/ecs](https://github.com/spiritLHLS
|
|||||||
## **适配系统和架构**
|
## **适配系统和架构**
|
||||||
|
|
||||||
### **编译与测试支持情况**
|
### **编译与测试支持情况**
|
||||||
| 编译支持的架构 | 测试支持的架构 | 编译支持的系统 | 测试支持的系统 |
|
| 编译支持的架构 | 测试支持的架构 | 编译支持的系统 | 测试支持的系统 |
|
||||||
|---------------------------|-----------|---------|-----------|
|
|---------------------------|--------------|---------------------------|---------------|
|
||||||
| amd64 | amd64 | Linux | Linux |
|
| amd64 | amd64 | Linux | Linux |
|
||||||
| arm | | Windows | Windows |
|
| arm64 | arm64 | Windows | Windows |
|
||||||
| arm64 | arm64 | FreeBSD | |
|
| arm | | MacOS(Darwin) | MacOS |
|
||||||
| 386 | | OpenBSD | |
|
| 386 | | FreeBSD | |
|
||||||
| mips | | MacOS | MacOS |
|
| mips,mipsle | | Android | |
|
||||||
| mipsle | | | |
|
| mips64,mips64le | | | |
|
||||||
| s390x | s390x | | |
|
| ppc64,ppc64le | | | |
|
||||||
| riscv64 | | | |
|
| s390x | s390x | | |
|
||||||
|
| riscv64 | | | |
|
||||||
|
|
||||||
|
> 更多架构与系统请自行测试或编译,如有问题请开 issues。
|
||||||
> 更多架构与系统请自行测试,如有问题请开 issues。
|
|
||||||
|
|
||||||
### **待支持的系统**
|
### **待支持的系统**
|
||||||
| 系统 | 说明 |
|
|
||||||
|-----|---------------------------|
|
|
||||||
| Android(arm64) | 存在权限问题未修复,非安卓系统的ARM架构无问题 |
|
|
||||||
|
|
||||||
|
| 系统 | 说明 |
|
||||||
|
|----------------|---------------------------|
|
||||||
|
| Android(arm64) | 存在权限问题未修复,非安卓系统的ARM架构无问题 |
|
||||||
|
| OpenBSD/NetBSD | 部分Goalng的官方库未支持本系统(尤其是net相关项目) |
|
||||||
|
| Windows虚拟机 | 非物理机器不支持winsat测试硬件性能(硬盘和内存测试) |
|
||||||
|
| Windows物理机(非Admin下) | 无Admin权限不支持winsat测试硬件性能(硬盘和内存测试) |
|
||||||
---
|
---
|
||||||
|
|
||||||
## **功能**
|
## **功能**
|
||||||
@@ -62,7 +65,7 @@ Shell 版本:[https://github.com/spiritLHLS/ecs](https://github.com/spiritLHLS
|
|||||||
- 三网路由测试:基于 [NTrace-core](https://github.com/nxtrace/NTrace-core),二次开发至 [nt3](https://github.com/oneclickvirt/nt3)
|
- 三网路由测试:基于 [NTrace-core](https://github.com/nxtrace/NTrace-core),二次开发至 [nt3](https://github.com/oneclickvirt/nt3)
|
||||||
- 网速测试:基于 [speedtest.net](https://github.com/spiritLHLS/speedtest.net-CN-ID) 和 [speedtest.cn](https://github.com/spiritLHLS/speedtest.cn-CN-ID) 数据,开发至 [oneclickvirt/speedtest](https://github.com/oneclickvirt/speedtest)
|
- 网速测试:基于 [speedtest.net](https://github.com/spiritLHLS/speedtest.net-CN-ID) 和 [speedtest.cn](https://github.com/spiritLHLS/speedtest.cn-CN-ID) 数据,开发至 [oneclickvirt/speedtest](https://github.com/oneclickvirt/speedtest)
|
||||||
- 三网 Ping 值测试:借鉴 [ecsspeed](https://github.com/spiritLHLS/ecsspeed),二次开发至 [pingtest](https://github.com/oneclickvirt/pingtest)
|
- 三网 Ping 值测试:借鉴 [ecsspeed](https://github.com/spiritLHLS/ecsspeed),二次开发至 [pingtest](https://github.com/oneclickvirt/pingtest)
|
||||||
- 支持root或admin环境下测试,也支持非root或非admin环境下测试,半支持离线环境下进行测试,未支持无DNS环境下进行测试
|
- 支持root或admin环境下测试,支持非root或非admin环境下测试,支持离线环境下进行测试,**暂未**支持无DNS环境下进行测试
|
||||||
|
|
||||||
**本项目初次使用建议查看说明:[跳转](https://github.com/oneclickvirt/ecs/blob/master/README_NEW_USER.md)**
|
**本项目初次使用建议查看说明:[跳转](https://github.com/oneclickvirt/ecs/blob/master/README_NEW_USER.md)**
|
||||||
|
|
||||||
@@ -70,7 +73,7 @@ Shell 版本:[https://github.com/spiritLHLS/ecs](https://github.com/spiritLHLS
|
|||||||
|
|
||||||
## **使用说明**
|
## **使用说明**
|
||||||
|
|
||||||
### **Linux/FreeBSD/OpenBSD/MacOS**
|
### **Linux/FreeBSD/MacOS**
|
||||||
|
|
||||||
#### **一键命令**
|
#### **一键命令**
|
||||||
|
|
||||||
@@ -265,22 +268,24 @@ docker run --rm spiritlhl/goecs:latest -menu=false -l zh
|
|||||||
|
|
||||||
使用Docker执行测试,硬件测试会有一些偏差和虚拟化架构判断失效,还是推荐直接测试而不使用Docker测试。
|
使用Docker执行测试,硬件测试会有一些偏差和虚拟化架构判断失效,还是推荐直接测试而不使用Docker测试。
|
||||||
|
|
||||||
国内镜像地址:https://cnb.cool/oneclickvirt/ecs/-/packages/docker/ecs
|
国内阿里云镜像加速
|
||||||
|
|
||||||
请确保执行下述命令前本机已安装Docker
|
请确保执行下述命令前本机已安装Docker
|
||||||
|
|
||||||
特权模式+host网络
|
特权模式+host网络
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run --rm --privileged --network host docker.cnb.cool/oneclickvirt/ecs:latest -menu=false -l zh
|
docker run --rm --privileged --network host crpi-8tmognxgyb86bm61.cn-guangzhou.personal.cr.aliyuncs.com/oneclickvirt/ecs:latest -menu=false -l zh
|
||||||
```
|
```
|
||||||
|
|
||||||
非特权模式+非host网络
|
非特权模式+非host网络
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run --rm docker.cnb.cool/oneclickvirt/ecs:latest -menu=false -l zh
|
docker run --rm crpi-8tmognxgyb86bm61.cn-guangzhou.personal.cr.aliyuncs.com/oneclickvirt/ecs:latest -menu=false -l zh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
实际上还有CNB镜像地址 https://cnb.cool/oneclickvirt/ecs/-/packages/docker/ecs 但很可惜组织空间不足无法推送了,更推荐使用阿里云镜像加速
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -398,4 +403,4 @@ GOOS=darwin GOARCH=amd64 go build -o goecs_darwin
|
|||||||
[](https://www.spiritlhl.net)
|
[](https://www.spiritlhl.net)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Foneclickvirt%2Fecs?ref=badge_large)
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Foneclickvirt%2Fecs?ref=badge_large)
|
||||||
|
28
README_EN.md
28
README_EN.md
@@ -1,6 +1,6 @@
|
|||||||
# ecs
|
# ecs
|
||||||
|
|
||||||
[](https://github.com/oneclickvirt/ecs/actions/workflows/main.yaml)
|
[](https://github.com/oneclickvirt/ecs/actions/workflows/build_binary.yaml)
|
||||||
|
|
||||||
[](https://hits.spiritlhl.net)
|
[](https://hits.spiritlhl.net)
|
||||||
|
|
||||||
@@ -28,20 +28,26 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
|
|||||||
| Supported for Compilation | Tested on | Supported OS for Compilation | Tested OS |
|
| Supported for Compilation | Tested on | Supported OS for Compilation | Tested OS |
|
||||||
|---------------------------|-----------|------------------------------|-----------|
|
|---------------------------|-----------|------------------------------|-----------|
|
||||||
| amd64 | amd64 | Linux | Linux |
|
| amd64 | amd64 | Linux | Linux |
|
||||||
| arm | | Windows | Windows |
|
| arm64 | arm64 | Windows | Windows |
|
||||||
| arm64 | arm64 | FreeBSD | |
|
| arm | | MacOS(Darwin) | MacOS |
|
||||||
| 386 | | OpenBSD | |
|
| 386 | | FreeBSD | |
|
||||||
| mips | | MacOS(darwin) | MacOS |
|
| mips,mipsle | | Android | |
|
||||||
| mipsle | | | |
|
| mips64,mips64le | | | |
|
||||||
|
| ppc64,ppc64le | | | |
|
||||||
| s390x | s390x | | |
|
| s390x | s390x | | |
|
||||||
| riscv64 | | | |
|
| riscv64 | | | |
|
||||||
|
|
||||||
> Please test additional architectures and systems yourself. If you encounter any issues, please open an issue.
|
> For more information about the architecture and system, please test or compile it yourself, and open issues if you have any questions.
|
||||||
|
|
||||||
### **Systems Pending Support**
|
### **Systems Pending Support**
|
||||||
|
|
||||||
| OS | Notes |
|
| OS | Notes |
|
||||||
|--------|-------------------------------------------------------------------------------------------------|
|
|--------|-------------------------------------------------------------------------------------------------|
|
||||||
| Android(arm64) | Permission issues that are not fixed, no problems with ARM architecture for non-Android systems |
|
| Android(arm64) | Permission issues that are not fixed, no problems with ARM architecture for non-Android systems |
|
||||||
|
| OpenBSD/NetBSD | Some of Goalng's official libraries do not support this system (especially net-related items) |
|
||||||
|
| Windows(Virtual Machines) | Non-Physical Machines do not support winsat to test hardware performance (hard disk and memory tests) |
|
||||||
|
| Windows(Physical Machines)(not under Admin) | No Admin privileges do not support winsat to test hardware performance (hard disk and memory tests) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## **Features**
|
## **Features**
|
||||||
@@ -58,7 +64,7 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
|
|||||||
- Three-network route test: Modified from [NTrace-core](https://github.com/nxtrace/NTrace-core) to [nt3](https://github.com/oneclickvirt/nt3)
|
- Three-network route test: Modified from [NTrace-core](https://github.com/nxtrace/NTrace-core) to [nt3](https://github.com/oneclickvirt/nt3)
|
||||||
- Speed test: Based on data from [speedtest.net](https://github.com/spiritLHLS/speedtest.net-CN-ID) and [speedtest.cn](https://github.com/spiritLHLS/speedtest.cn-CN-ID), developed to [oneclickvirt/speedtest](https://github.com/oneclickvirt/speedtest)
|
- Speed test: Based on data from [speedtest.net](https://github.com/spiritLHLS/speedtest.net-CN-ID) and [speedtest.cn](https://github.com/spiritLHLS/speedtest.cn-CN-ID), developed to [oneclickvirt/speedtest](https://github.com/oneclickvirt/speedtest)
|
||||||
- Three-network Ping test: Modified from [ecsspeed](https://github.com/spiritLHLS/ecsspeed) to [pingtest](https://github.com/oneclickvirt/pingtest)
|
- Three-network Ping test: Modified from [ecsspeed](https://github.com/spiritLHLS/ecsspeed) to [pingtest](https://github.com/oneclickvirt/pingtest)
|
||||||
- Support root or admin environment testing, also support non-root or non-admin environment testing, semi-support offline environment for testing, not support no DNS environment for testing
|
- Support root or admin environment testing, support non-root or non-admin environment testing, support offline environment for testing, not support no DNS environment for testing
|
||||||
|
|
||||||
**For first-time users of this project, it is recommended to check the instructions: [Jump to](https://github.com/oneclickvirt/ecs/blob/master/README_NEW_USER.md)**
|
**For first-time users of this project, it is recommended to check the instructions: [Jump to](https://github.com/oneclickvirt/ecs/blob/master/README_NEW_USER.md)**
|
||||||
|
|
||||||
@@ -66,7 +72,7 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
|
|||||||
|
|
||||||
## **Instructions for Use**
|
## **Instructions for Use**
|
||||||
|
|
||||||
### **Linux/FreeBSD/OpenBSD/MacOS**
|
### **Linux/FreeBSD/MacOS**
|
||||||
|
|
||||||
#### **One-click command**
|
#### **One-click command**
|
||||||
|
|
||||||
@@ -389,4 +395,4 @@ Thanks also to the following platforms for editorial and testing support
|
|||||||
|
|
||||||
## Stargazers over time
|
## Stargazers over time
|
||||||
|
|
||||||
[](https://www.spiritlhl.net)
|
[](https://www.spiritlhl.net)
|
||||||
|
77
go.mod
77
go.mod
@@ -3,48 +3,47 @@ module github.com/oneclickvirt/ecs
|
|||||||
go 1.24.5
|
go 1.24.5
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/imroc/req/v3 v3.50.0
|
github.com/imroc/req/v3 v3.54.0
|
||||||
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841
|
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841
|
||||||
github.com/oneclickvirt/UnlockTests v0.0.27-20250628125053
|
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204
|
||||||
github.com/oneclickvirt/backtrace v0.0.5-20250629024536
|
github.com/oneclickvirt/backtrace v0.0.5-20250727160732
|
||||||
github.com/oneclickvirt/basics v0.0.15-20250714163009
|
github.com/oneclickvirt/basics v0.0.15-20250728021329
|
||||||
github.com/oneclickvirt/cputest v0.0.11-20250716031513
|
github.com/oneclickvirt/cputest v0.0.12-20250720122317
|
||||||
github.com/oneclickvirt/defaultset v0.0.2-20240624082446
|
github.com/oneclickvirt/defaultset v0.0.2-20240624082446
|
||||||
github.com/oneclickvirt/disktest v0.0.8-20250701092629
|
github.com/oneclickvirt/disktest v0.0.8-20250701092629
|
||||||
github.com/oneclickvirt/gostun v0.0.3-20250329105202
|
github.com/oneclickvirt/gostun v0.0.5-20250727155022
|
||||||
github.com/oneclickvirt/memorytest v0.0.8-20250716133749
|
github.com/oneclickvirt/memorytest v0.0.9-20250720135728
|
||||||
github.com/oneclickvirt/nt3 v0.0.5-20250416131047
|
github.com/oneclickvirt/nt3 v0.0.6-20250726150925
|
||||||
github.com/oneclickvirt/pingtest v0.0.8-20250701125637
|
github.com/oneclickvirt/pingtest v0.0.8-20250728015259
|
||||||
github.com/oneclickvirt/portchecker v0.0.3-20250329125750
|
github.com/oneclickvirt/portchecker v0.0.3-20250728015900
|
||||||
github.com/oneclickvirt/security v0.0.6-20250715102027
|
github.com/oneclickvirt/security v0.0.6-20250727160145
|
||||||
github.com/oneclickvirt/speedtest v0.0.10-20250701123931
|
github.com/oneclickvirt/speedtest v0.0.10-20250728015734
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/PuerkitoBio/goquery v1.9.2 // indirect
|
github.com/PuerkitoBio/goquery v1.9.2 // indirect
|
||||||
github.com/StackExchange/wmi v1.2.1 // indirect
|
github.com/StackExchange/wmi v1.2.1 // indirect
|
||||||
github.com/andybalholm/brotli v1.1.1 // indirect
|
github.com/andybalholm/brotli v1.2.0 // indirect
|
||||||
github.com/andybalholm/cascadia v1.3.2 // indirect
|
github.com/andybalholm/cascadia v1.3.2 // indirect
|
||||||
github.com/cloudflare/circl v1.5.0 // indirect
|
github.com/cloudflare/circl v1.6.1 // indirect
|
||||||
|
github.com/ebitengine/purego v0.8.4 // indirect
|
||||||
github.com/fatih/color v1.18.0 // indirect
|
github.com/fatih/color v1.18.0 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||||
github.com/ghodss/yaml v1.0.0 // indirect
|
|
||||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||||
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
|
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
||||||
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
|
|
||||||
github.com/gofrs/uuid/v5 v5.2.0 // indirect
|
github.com/gofrs/uuid/v5 v5.2.0 // indirect
|
||||||
github.com/google/gopacket v1.1.19 // indirect
|
github.com/google/gopacket v1.1.19 // indirect
|
||||||
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
|
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/gorilla/websocket v1.5.3 // indirect
|
github.com/gorilla/websocket v1.5.3 // indirect
|
||||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||||
github.com/huin/goupnp v1.2.0 // indirect
|
github.com/huin/goupnp v1.2.0 // indirect
|
||||||
|
github.com/icholy/digest v1.1.0 // indirect
|
||||||
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
|
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
|
||||||
github.com/jaypipes/ghw v0.12.0 // indirect
|
github.com/jaypipes/ghw v0.17.0 // indirect
|
||||||
github.com/jaypipes/pcidb v1.0.0 // indirect
|
github.com/jaypipes/pcidb v1.0.1 // indirect
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/klauspost/compress v1.17.11 // indirect
|
github.com/klauspost/compress v1.18.0 // indirect
|
||||||
github.com/koron/go-ssdp v0.0.4 // indirect
|
github.com/koron/go-ssdp v0.0.4 // indirect
|
||||||
github.com/libp2p/go-nat v0.2.0 // indirect
|
github.com/libp2p/go-nat v0.2.0 // indirect
|
||||||
github.com/libp2p/go-netroute v0.2.1 // indirect
|
github.com/libp2p/go-netroute v0.2.1 // indirect
|
||||||
@@ -58,11 +57,10 @@ require (
|
|||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/nxtrace/NTrace-core v1.4.0 // indirect
|
github.com/nxtrace/NTrace-core v1.4.2 // indirect
|
||||||
github.com/oneclickvirt/dd v0.0.2-20250701085922 // indirect
|
github.com/oneclickvirt/dd v0.0.2-20250701085922 // indirect
|
||||||
github.com/oneclickvirt/fio v0.0.2-20250701085933 // indirect
|
github.com/oneclickvirt/fio v0.0.2-20250701085933 // indirect
|
||||||
github.com/oneclickvirt/mbw v0.0.1-20250630140849 // indirect
|
github.com/oneclickvirt/mbw v0.0.1-20250630140849 // indirect
|
||||||
github.com/onsi/ginkgo/v2 v2.22.1 // indirect
|
|
||||||
github.com/oschwald/maxminddb-golang v1.13.1 // indirect
|
github.com/oschwald/maxminddb-golang v1.13.1 // indirect
|
||||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||||
github.com/pion/dtls/v2 v2.2.7 // indirect
|
github.com/pion/dtls/v2 v2.2.7 // indirect
|
||||||
@@ -74,20 +72,19 @@ require (
|
|||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
||||||
github.com/prometheus-community/pro-bing v0.4.1 // indirect
|
github.com/prometheus-community/pro-bing v0.4.1 // indirect
|
||||||
github.com/quic-go/qpack v0.5.1 // indirect
|
github.com/quic-go/qpack v0.5.1 // indirect
|
||||||
github.com/quic-go/quic-go v0.48.2 // indirect
|
github.com/quic-go/quic-go v0.53.0 // indirect
|
||||||
github.com/refraction-networking/utls v1.6.7 // indirect
|
github.com/refraction-networking/utls v1.7.3 // indirect
|
||||||
github.com/rivo/uniseg v0.4.7 // indirect
|
github.com/rivo/uniseg v0.4.7 // indirect
|
||||||
github.com/rodaine/table v1.3.0 // indirect
|
github.com/rodaine/table v1.3.0 // indirect
|
||||||
github.com/sagikazarmark/locafero v0.9.0 // indirect
|
github.com/sagikazarmark/locafero v0.9.0 // indirect
|
||||||
github.com/schollz/progressbar/v3 v3.14.4 // indirect
|
github.com/schollz/progressbar/v3 v3.14.4 // indirect
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
||||||
github.com/shirou/gopsutil/v4 v4.24.5 // indirect
|
github.com/shirou/gopsutil/v4 v4.25.6 // indirect
|
||||||
github.com/shoenig/go-m1cpu v0.1.6 // indirect
|
github.com/showwin/speedtest-go v1.7.10 // indirect
|
||||||
github.com/showwin/speedtest-go v1.7.7 // indirect
|
|
||||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||||
github.com/spf13/afero v1.14.0 // indirect
|
github.com/spf13/afero v1.14.0 // indirect
|
||||||
github.com/spf13/cast v1.7.1 // indirect
|
github.com/spf13/cast v1.9.2 // indirect
|
||||||
github.com/spf13/pflag v1.0.6 // indirect
|
github.com/spf13/pflag v1.0.7 // indirect
|
||||||
github.com/spf13/viper v1.20.1 // indirect
|
github.com/spf13/viper v1.20.1 // indirect
|
||||||
github.com/subosito/gotenv v1.6.0 // indirect
|
github.com/subosito/gotenv v1.6.0 // indirect
|
||||||
github.com/tidwall/gjson v1.18.0 // indirect
|
github.com/tidwall/gjson v1.18.0 // indirect
|
||||||
@@ -97,19 +94,17 @@ require (
|
|||||||
github.com/tklauser/numcpus v0.8.0 // indirect
|
github.com/tklauser/numcpus v0.8.0 // indirect
|
||||||
github.com/tsosunchia/powclient v0.1.5 // indirect
|
github.com/tsosunchia/powclient v0.1.5 // indirect
|
||||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||||
go.uber.org/mock v0.5.0 // indirect
|
go.uber.org/mock v0.5.2 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
go.uber.org/zap v1.27.0 // indirect
|
go.uber.org/zap v1.27.0 // indirect
|
||||||
golang.org/x/crypto v0.37.0 // indirect
|
golang.org/x/crypto v0.40.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
|
golang.org/x/mod v0.25.0 // indirect
|
||||||
golang.org/x/mod v0.22.0 // indirect
|
golang.org/x/net v0.42.0 // indirect
|
||||||
golang.org/x/net v0.39.0 // indirect
|
golang.org/x/sync v0.16.0 // indirect
|
||||||
golang.org/x/sync v0.13.0 // indirect
|
golang.org/x/sys v0.34.0 // indirect
|
||||||
golang.org/x/sys v0.33.0 // indirect
|
golang.org/x/term v0.33.0 // indirect
|
||||||
golang.org/x/term v0.31.0 // indirect
|
golang.org/x/text v0.27.0 // indirect
|
||||||
golang.org/x/text v0.24.0 // indirect
|
golang.org/x/tools v0.34.0 // indirect
|
||||||
golang.org/x/tools v0.29.0 // indirect
|
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
howett.net/plist v1.0.0 // indirect
|
howett.net/plist v1.0.0 // indirect
|
||||||
)
|
)
|
||||||
|
169
go.sum
169
go.sum
@@ -2,43 +2,38 @@ github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4
|
|||||||
github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk=
|
github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk=
|
||||||
github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA=
|
github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA=
|
||||||
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
|
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
|
||||||
github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
|
github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=
|
||||||
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
|
github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
|
||||||
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
|
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
|
||||||
github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
|
github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
|
||||||
github.com/cloudflare/circl v1.5.0 h1:hxIWksrX6XN5a1L2TI/h53AGPhNHoUBo+TD1ms9+pys=
|
github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
|
||||||
github.com/cloudflare/circl v1.5.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
|
github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw=
|
||||||
|
github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||||
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
||||||
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
||||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||||
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
||||||
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
|
||||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
|
||||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
|
||||||
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
|
||||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||||
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
|
|
||||||
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
|
||||||
github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM=
|
github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM=
|
||||||
github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
||||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8=
|
github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8=
|
||||||
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
|
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
|
||||||
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg=
|
|
||||||
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
|
|
||||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||||
@@ -50,20 +45,22 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l
|
|||||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||||
github.com/huin/goupnp v1.2.0 h1:uOKW26NG1hsSSbXIZ1IR7XP9Gjd1U8pnLaCMgntmkmY=
|
github.com/huin/goupnp v1.2.0 h1:uOKW26NG1hsSSbXIZ1IR7XP9Gjd1U8pnLaCMgntmkmY=
|
||||||
github.com/huin/goupnp v1.2.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
|
github.com/huin/goupnp v1.2.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
|
||||||
github.com/imroc/req/v3 v3.50.0 h1:n3BVnZiTRpvkN5T1IB79LC/THhFU9iXksNRMH4ZNVaY=
|
github.com/icholy/digest v1.1.0 h1:HfGg9Irj7i+IX1o1QAmPfIBNu/Q5A5Tu3n/MED9k9H4=
|
||||||
github.com/imroc/req/v3 v3.50.0/go.mod h1:tsOk8K7zI6cU4xu/VWCZVtq9Djw9IWm4MslKzme5woU=
|
github.com/icholy/digest v1.1.0/go.mod h1:QNrsSGQ5v7v9cReDI0+eyjsXGUoRSUZQHeQ5C4XLa0Y=
|
||||||
|
github.com/imroc/req/v3 v3.54.0 h1:kwWJSpT7OvjJ/Q8ykp+69Ye5H486RKDcgEoepw1Ren4=
|
||||||
|
github.com/imroc/req/v3 v3.54.0/go.mod h1:P8gCJjG/XNUFeP6WOi40VAXfYwT+uPM00xvoBWiwzUQ=
|
||||||
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
|
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
|
||||||
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
||||||
github.com/jaypipes/ghw v0.12.0 h1:xU2/MDJfWmBhJnujHY9qwXQLs3DBsf0/Xa9vECY0Tho=
|
github.com/jaypipes/ghw v0.17.0 h1:EVLJeNcy5z6GK/Lqby0EhBpynZo+ayl8iJWY0kbEUJA=
|
||||||
github.com/jaypipes/ghw v0.12.0/go.mod h1:jeJGbkRB2lL3/gxYzNYzEDETV1ZJ56OKr+CSeSEym+g=
|
github.com/jaypipes/ghw v0.17.0/go.mod h1:In8SsaDqlb1oTyrbmTC14uy+fbBMvp+xdqX51MidlD8=
|
||||||
github.com/jaypipes/pcidb v1.0.0 h1:vtZIfkiCUE42oYbJS0TAq9XSfSmcsgo9IdxSm9qzYU8=
|
github.com/jaypipes/pcidb v1.0.1 h1:WB2zh27T3nwg8AE8ei81sNRb9yWBii3JGNJtT7K9Oic=
|
||||||
github.com/jaypipes/pcidb v1.0.0/go.mod h1:TnYUvqhPBzCKnH34KrIX22kAeEbDCSRJ9cqLRCuNDfk=
|
github.com/jaypipes/pcidb v1.0.1/go.mod h1:6xYUz/yYEyOkIkUt2t2J2folIuZ4Yg6uByCGFXMCeE4=
|
||||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
|
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
|
||||||
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||||
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||||
github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0=
|
github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0=
|
||||||
github.com/koron/go-ssdp v0.0.4/go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk=
|
github.com/koron/go-ssdp v0.0.4/go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk=
|
||||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
@@ -95,18 +92,18 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
|
|||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
github.com/nxtrace/NTrace-core v1.4.0 h1:pDN2BqxIYjedDKCDDOFBcDNOBnavGcx+4wbiG65Xqiw=
|
github.com/nxtrace/NTrace-core v1.4.2 h1:dSRP18Bn3VGf5CZBzKt8gQWW9mDkq62Np9TCF9RAtp0=
|
||||||
github.com/nxtrace/NTrace-core v1.4.0/go.mod h1:0AWqbqiIJbpbFG6W48vtJ6pWM8PPF+lQ1fi2371y+zA=
|
github.com/nxtrace/NTrace-core v1.4.2/go.mod h1:wIDOlccuYzY3wBqU89pv2KGHT41i3JA0eRqJU/x9eX4=
|
||||||
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841 h1:Zef93z9UiZQwRAKnnZYALmpBKvvuVaq34MEsuWwk6nc=
|
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841 h1:Zef93z9UiZQwRAKnnZYALmpBKvvuVaq34MEsuWwk6nc=
|
||||||
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841/go.mod h1:DAmFPRjFV5p9fEzUUSml5jJGn2f1NZJQCzTxITHDjc4=
|
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841/go.mod h1:DAmFPRjFV5p9fEzUUSml5jJGn2f1NZJQCzTxITHDjc4=
|
||||||
github.com/oneclickvirt/UnlockTests v0.0.27-20250628125053 h1:Ug8kySZR1weRUcsnGOv+f3HAl791AfkA7EWV3JmiMQA=
|
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204 h1:apFaEbHGKflYMZzK17nXzEai4GG873mTd+d9hCO/KdY=
|
||||||
github.com/oneclickvirt/UnlockTests v0.0.27-20250628125053/go.mod h1:yXWIZB6iLS88pEd9m4QJi1GENn+7I91zA72y5ONz2Oc=
|
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204/go.mod h1:oOa6wj/qECtRMxwBO6D7o0L0F0Q/5sQ747OCnFQqoGE=
|
||||||
github.com/oneclickvirt/backtrace v0.0.5-20250629024536 h1:caHCa0DHmbYWBFN1bqKxpvPnN0wOxDEqJv1VDvDdLWs=
|
github.com/oneclickvirt/backtrace v0.0.5-20250727160732 h1:izs46j9hYYOOXcdtBX7y9PSlzLlxWSiC2+4rQ8P0DxA=
|
||||||
github.com/oneclickvirt/backtrace v0.0.5-20250629024536/go.mod h1:5AH00bo41hH3d2/JVuCTlBkZUs3AXX4nlKVXb6piZcI=
|
github.com/oneclickvirt/backtrace v0.0.5-20250727160732/go.mod h1:yxL1ixDmOmEt8NkHnMIetsTXJW8xMslUpEY2L8sYZ4Y=
|
||||||
github.com/oneclickvirt/basics v0.0.15-20250714163009 h1:7I1lU7N91kClw6Cb6o+vGfScc/HngrjhsaaW10AbBFs=
|
github.com/oneclickvirt/basics v0.0.15-20250728021329 h1:bXat5W1twZdOdzJ15BFZUYsjAEcTH9ly9oMDIg5+Rbo=
|
||||||
github.com/oneclickvirt/basics v0.0.15-20250714163009/go.mod h1:yN1IEOXN6v/GJqJSA70Pooo6nXBI/6rq72vTY72wJMQ=
|
github.com/oneclickvirt/basics v0.0.15-20250728021329/go.mod h1:2PV+1ge01zb0Sqzj2V2I7P0wAdFSLF1XgAiumchJJbg=
|
||||||
github.com/oneclickvirt/cputest v0.0.11-20250716031513 h1:6xP/QCxwI6jTLmarIY3UIgaeOL2u94hzjVyG4yNa4WM=
|
github.com/oneclickvirt/cputest v0.0.12-20250720122317 h1:toiwAK1hZE5b8klu2mOQ7J4sv5yV9lpPKwgPahfRYBQ=
|
||||||
github.com/oneclickvirt/cputest v0.0.11-20250716031513/go.mod h1:vjlH8tkPFft1tlLOpeNskXVvurxkHaJ3+dgFxQGLXY4=
|
github.com/oneclickvirt/cputest v0.0.12-20250720122317/go.mod h1:vjlH8tkPFft1tlLOpeNskXVvurxkHaJ3+dgFxQGLXY4=
|
||||||
github.com/oneclickvirt/dd v0.0.2-20250701085922 h1:WiWZwcnCPhRc8hLZdvkjD2kOEpnqn1S31z1j0x3V4l0=
|
github.com/oneclickvirt/dd v0.0.2-20250701085922 h1:WiWZwcnCPhRc8hLZdvkjD2kOEpnqn1S31z1j0x3V4l0=
|
||||||
github.com/oneclickvirt/dd v0.0.2-20250701085922/go.mod h1:tImu9sPTkLWo2tf1dEN1xQzrylWKauj9hbU8PHfyAeU=
|
github.com/oneclickvirt/dd v0.0.2-20250701085922/go.mod h1:tImu9sPTkLWo2tf1dEN1xQzrylWKauj9hbU8PHfyAeU=
|
||||||
github.com/oneclickvirt/defaultset v0.0.2-20240624082446 h1:5Pg3mK/u/vQvSz7anu0nxzrNdELi/AcDAU1mMsmPzyc=
|
github.com/oneclickvirt/defaultset v0.0.2-20240624082446 h1:5Pg3mK/u/vQvSz7anu0nxzrNdELi/AcDAU1mMsmPzyc=
|
||||||
@@ -115,26 +112,22 @@ github.com/oneclickvirt/disktest v0.0.8-20250701092629 h1:B/gA6SOr4qL5pQmVpHl9m5
|
|||||||
github.com/oneclickvirt/disktest v0.0.8-20250701092629/go.mod h1:6YCvGr+Z0tvcP4Ue8bezZqm/GqS/dSyEnSUhvS3Q03o=
|
github.com/oneclickvirt/disktest v0.0.8-20250701092629/go.mod h1:6YCvGr+Z0tvcP4Ue8bezZqm/GqS/dSyEnSUhvS3Q03o=
|
||||||
github.com/oneclickvirt/fio v0.0.2-20250701085933 h1:4P7QcOTxbqyx5DhHdFvyeRSsdNajSo9l/H2XK0vICIc=
|
github.com/oneclickvirt/fio v0.0.2-20250701085933 h1:4P7QcOTxbqyx5DhHdFvyeRSsdNajSo9l/H2XK0vICIc=
|
||||||
github.com/oneclickvirt/fio v0.0.2-20250701085933/go.mod h1:NIq+XYTey68KNERGIy/oRDlzpwLzBVoHOCiqX8didsE=
|
github.com/oneclickvirt/fio v0.0.2-20250701085933/go.mod h1:NIq+XYTey68KNERGIy/oRDlzpwLzBVoHOCiqX8didsE=
|
||||||
github.com/oneclickvirt/gostun v0.0.3-20250329105202 h1:aJ6E91Lp94lq8iWRcCaxpXTjqOOaWvufr5oras6cFtM=
|
github.com/oneclickvirt/gostun v0.0.5-20250727155022 h1:/e3gSUrOp1tg/1NTRx+P8B51OGcP26Q6//5EoSIjOvk=
|
||||||
github.com/oneclickvirt/gostun v0.0.3-20250329105202/go.mod h1:f7DPEXAxbmwXSW33dbxtb0/KzqvOBWhTs2Or5xBerQA=
|
github.com/oneclickvirt/gostun v0.0.5-20250727155022/go.mod h1:pfp7MFZJK9n/KTLAVqqFcCAns4xqMykmjI+1UeF/vdE=
|
||||||
github.com/oneclickvirt/mbw v0.0.1-20250630140849 h1:p6RMhOPBnQKAm9+VEQ2axAFsidrdSdrhXMyheIyv2a8=
|
github.com/oneclickvirt/mbw v0.0.1-20250630140849 h1:p6RMhOPBnQKAm9+VEQ2axAFsidrdSdrhXMyheIyv2a8=
|
||||||
github.com/oneclickvirt/mbw v0.0.1-20250630140849/go.mod h1:0Vq6NRpyLmGUdfHfL3uDcFsuZhi7KlG+OCs5ky2757Y=
|
github.com/oneclickvirt/mbw v0.0.1-20250630140849/go.mod h1:0Vq6NRpyLmGUdfHfL3uDcFsuZhi7KlG+OCs5ky2757Y=
|
||||||
github.com/oneclickvirt/memorytest v0.0.8-20250716133749 h1:/z5lfsxRo5MHPfTAAKLk9vD0sQ4JDw5aEe21u6rQdfw=
|
github.com/oneclickvirt/memorytest v0.0.9-20250720135728 h1:RusZfaESDXK+k5YYfVXTCW5zLeQEd/dYY80a6xievE0=
|
||||||
github.com/oneclickvirt/memorytest v0.0.8-20250716133749/go.mod h1:7xMacjQobvFAtODht2hxTsB9hM2IFS7vZk3gxx+bsjo=
|
github.com/oneclickvirt/memorytest v0.0.9-20250720135728/go.mod h1:7xMacjQobvFAtODht2hxTsB9hM2IFS7vZk3gxx+bsjo=
|
||||||
github.com/oneclickvirt/nt3 v0.0.5-20250416131047 h1:KL0xowq19cW+FMBGMJxdqpRNoeyR+eEmb+jYSubmlTk=
|
github.com/oneclickvirt/nt3 v0.0.6-20250726150925 h1:M+9kEpMp+O2a//yp9zJ11DleK7hxEmFd5jOWKNrSlmY=
|
||||||
github.com/oneclickvirt/nt3 v0.0.5-20250416131047/go.mod h1:CVsDJEaIdyyZHn3WKbhU8Wn6GOfmBNvJlC/dDLRqcSQ=
|
github.com/oneclickvirt/nt3 v0.0.6-20250726150925/go.mod h1:O7YkaOMFihB8hwQiD74WTbDlyoTieDwTDBR6jbkZaP0=
|
||||||
github.com/oneclickvirt/pingtest v0.0.8-20250701125637 h1:J28Ai5miTq1J0I4gdT8rewJSd3LwzD90L/bNiiaKfHM=
|
github.com/oneclickvirt/pingtest v0.0.8-20250728015259 h1:egoxZRZBOWN3JqBwqEsULDyRo2/dpGMeWcmV3U87zig=
|
||||||
github.com/oneclickvirt/pingtest v0.0.8-20250701125637/go.mod h1:d3Ntx5m9lMll3a/k3+2B+5emj//vgDh4/NHTxs2qQE8=
|
github.com/oneclickvirt/pingtest v0.0.8-20250728015259/go.mod h1:gxwsxxwitNQiGq2OI0ZogYoOLwc8DtuOdSRe6/EvRqs=
|
||||||
github.com/oneclickvirt/portchecker v0.0.3-20250329125750 h1:TTNL0pnQlRsn046kW59I/9UWRpihttFHWnU7Ixycggk=
|
github.com/oneclickvirt/portchecker v0.0.3-20250728015900 h1:AomzdppSOFB70AJESQhlp0IPbsHTTJGimAWDk2TzCWM=
|
||||||
github.com/oneclickvirt/portchecker v0.0.3-20250329125750/go.mod h1:HQxSTrqM8/QFqHMTBZ7S8H9eEO5FkUXU1eb7ZX5Mk+k=
|
github.com/oneclickvirt/portchecker v0.0.3-20250728015900/go.mod h1:9sjMDPCd4Z40wkYB0S9gQPGH8YPtnNE1ZJthVIuHUzA=
|
||||||
github.com/oneclickvirt/security v0.0.6-20250715102027 h1:lOaFxORBT/9nBlof7EU36YP+ZIbqkhCLGyOpYQTY1qs=
|
github.com/oneclickvirt/security v0.0.6-20250727160145 h1://sqEyAITvv04zXZwWurTkMDMD4nUAl7Wukj5lEDALI=
|
||||||
github.com/oneclickvirt/security v0.0.6-20250715102027/go.mod h1:SDFBXV0sDo8pSIcGaaJ2gfCCW+NKy4pO1q9i4SIX2jc=
|
github.com/oneclickvirt/security v0.0.6-20250727160145/go.mod h1:WpzPJsQFP0uOHmUUsqT9sjNhD5b+1LFd90HiM8cz4nM=
|
||||||
github.com/oneclickvirt/speedtest v0.0.10-20250701123931 h1:IMUM0F3trrlCdl9JTO+FBIJ9zc8mbi+oyd66IkO/8mI=
|
github.com/oneclickvirt/speedtest v0.0.10-20250728015734 h1:HKO7/JQ74ueXA8Wo8NIvcK9DphbEG/YTfAAVz/akSiY=
|
||||||
github.com/oneclickvirt/speedtest v0.0.10-20250701123931/go.mod h1:zd5ZgIGslmtQLQehEfRjyumlvgDHTpCSMchKfKXoASI=
|
github.com/oneclickvirt/speedtest v0.0.10-20250728015734/go.mod h1:0W8vnMbA3iucXLXFdGfe9Ia6RPS0izRO7jvu/SnH1P8=
|
||||||
github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM=
|
|
||||||
github.com/onsi/ginkgo/v2 v2.22.1/go.mod h1:S6aTpoRsSq2cZOd+pssHAlKW/Q/jZt6cPrPlnj4a1xM=
|
|
||||||
github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw=
|
|
||||||
github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=
|
|
||||||
github.com/oschwald/maxminddb-golang v1.13.1 h1:G3wwjdN9JmIK2o/ermkHM+98oX5fS+k5MbwsmL4MRQE=
|
github.com/oschwald/maxminddb-golang v1.13.1 h1:G3wwjdN9JmIK2o/ermkHM+98oX5fS+k5MbwsmL4MRQE=
|
||||||
github.com/oschwald/maxminddb-golang v1.13.1/go.mod h1:K4pgV9N/GcK694KSTmVSDTODk4IsCNThNdTmnaBZ/F8=
|
github.com/oschwald/maxminddb-golang v1.13.1/go.mod h1:K4pgV9N/GcK694KSTmVSDTODk4IsCNThNdTmnaBZ/F8=
|
||||||
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
|
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
|
||||||
@@ -160,10 +153,10 @@ github.com/prometheus-community/pro-bing v0.4.1 h1:aMaJwyifHZO0y+h8+icUz0xbToHbi
|
|||||||
github.com/prometheus-community/pro-bing v0.4.1/go.mod h1:aLsw+zqCaDoa2RLVVSX3+UiCkBBXTMtZC3c7EkfWnAE=
|
github.com/prometheus-community/pro-bing v0.4.1/go.mod h1:aLsw+zqCaDoa2RLVVSX3+UiCkBBXTMtZC3c7EkfWnAE=
|
||||||
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
|
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
|
||||||
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
|
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
|
||||||
github.com/quic-go/quic-go v0.48.2 h1:wsKXZPeGWpMpCGSWqOcqpW2wZYic/8T3aqiOID0/KWE=
|
github.com/quic-go/quic-go v0.53.0 h1:QHX46sISpG2S03dPeZBgVIZp8dGagIaiu2FiVYvpCZI=
|
||||||
github.com/quic-go/quic-go v0.48.2/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs=
|
github.com/quic-go/quic-go v0.53.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY=
|
||||||
github.com/refraction-networking/utls v1.6.7 h1:zVJ7sP1dJx/WtVuITug3qYUq034cDq9B2MR1K67ULZM=
|
github.com/refraction-networking/utls v1.7.3 h1:L0WRhHY7Oq1T0zkdzVZMR6zWZv+sXbHB9zcuvsAEqCo=
|
||||||
github.com/refraction-networking/utls v1.6.7/go.mod h1:BC3O4vQzye5hqpmDTWUqi4P5DDhzJfkV1tdqtawQIH0=
|
github.com/refraction-networking/utls v1.7.3/go.mod h1:TUhh27RHMGtQvjQq+RyO11P6ZNQNBb3N0v7wsEjKAIQ=
|
||||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
@@ -177,22 +170,18 @@ github.com/schollz/progressbar/v3 v3.14.4 h1:W9ZrDSJk7eqmQhd3uxFNNcTr0QL+xuGNI9d
|
|||||||
github.com/schollz/progressbar/v3 v3.14.4/go.mod h1:aT3UQ7yGm+2ZjeXPqsjTenwL3ddUiuZ0kfQ/2tHlyNI=
|
github.com/schollz/progressbar/v3 v3.14.4/go.mod h1:aT3UQ7yGm+2ZjeXPqsjTenwL3ddUiuZ0kfQ/2tHlyNI=
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||||
github.com/shirou/gopsutil/v4 v4.24.5 h1:gGsArG5K6vmsh5hcFOHaPm87UD003CaDMkAOweSQjhM=
|
github.com/shirou/gopsutil/v4 v4.25.6 h1:kLysI2JsKorfaFPcYmcJqbzROzsBWEOAtw6A7dIfqXs=
|
||||||
github.com/shirou/gopsutil/v4 v4.24.5/go.mod h1:aoebb2vxetJ/yIDZISmduFvVNPHqXQ9SEJwRXxkf0RA=
|
github.com/shirou/gopsutil/v4 v4.25.6/go.mod h1:PfybzyydfZcN+JMMjkF6Zb8Mq1A/VcogFFg7hj50W9c=
|
||||||
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
|
github.com/showwin/speedtest-go v1.7.10 h1:9o5zb7KsuzZKn+IE2//z5btLKJ870JwO6ETayUkqRFw=
|
||||||
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
|
github.com/showwin/speedtest-go v1.7.10/go.mod h1:Ei7OCTmNPdWofMadzcfgq1rUO7mvJy9Jycj//G7vyfA=
|
||||||
github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
|
|
||||||
github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
|
|
||||||
github.com/showwin/speedtest-go v1.7.7 h1:VmK75SZOTKiuWjIVrs+mo7ZoKEw0utiGCvpnurS0olU=
|
|
||||||
github.com/showwin/speedtest-go v1.7.7/go.mod h1:uLgdWCNarXxlYsL2E5TOZpCIwpgSWnEANZp7gfHXHu0=
|
|
||||||
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
|
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
|
||||||
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
|
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
|
||||||
github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
|
github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
|
||||||
github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo=
|
github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo=
|
||||||
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
|
github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE=
|
||||||
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
|
||||||
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
|
||||||
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
|
github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
|
||||||
github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4=
|
github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
@@ -229,8 +218,8 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo
|
|||||||
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
|
go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
|
||||||
go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
|
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
|
||||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||||
@@ -240,16 +229,14 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
|||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
|
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
|
||||||
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
||||||
golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
|
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
|
||||||
golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
|
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
|
||||||
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA=
|
|
||||||
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
|
|
||||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
|
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
|
||||||
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
@@ -258,14 +245,14 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
|||||||
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
||||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||||
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
||||||
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
|
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
|
||||||
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
|
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
|
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||||
golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@@ -280,8 +267,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|||||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
|
||||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
@@ -289,38 +276,34 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
|||||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||||
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
|
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
|
||||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||||
golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o=
|
golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
|
||||||
golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw=
|
golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
|
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
|
||||||
golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
|
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
|
||||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
|
||||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||||
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
|
golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
|
||||||
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
|
golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
|
|
||||||
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
|
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
|
||||||
|
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
|
||||||
howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
|
howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
|
||||||
howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
|
howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
|
||||||
|
5
goecs.go
5
goecs.go
@@ -17,6 +17,7 @@ import (
|
|||||||
|
|
||||||
"github.com/oneclickvirt/CommonMediaTests/commediatests"
|
"github.com/oneclickvirt/CommonMediaTests/commediatests"
|
||||||
unlocktestmodel "github.com/oneclickvirt/UnlockTests/model"
|
unlocktestmodel "github.com/oneclickvirt/UnlockTests/model"
|
||||||
|
"github.com/oneclickvirt/UnlockTests/uts"
|
||||||
backtrace "github.com/oneclickvirt/backtrace/bk"
|
backtrace "github.com/oneclickvirt/backtrace/bk"
|
||||||
backtracemodel "github.com/oneclickvirt/backtrace/model"
|
backtracemodel "github.com/oneclickvirt/backtrace/model"
|
||||||
basicmodel "github.com/oneclickvirt/basics/model"
|
basicmodel "github.com/oneclickvirt/basics/model"
|
||||||
@@ -39,7 +40,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ecsVersion = "v0.1.56"
|
ecsVersion = "v0.1.71"
|
||||||
menuMode bool
|
menuMode bool
|
||||||
onlyChinaTest bool
|
onlyChinaTest bool
|
||||||
input, choice string
|
input, choice string
|
||||||
@@ -691,7 +692,7 @@ func runNetworkTests(wg3 *sync.WaitGroup, ptInfo *string, output, tempOutput str
|
|||||||
output = utils.PrintAndCapture(func() {
|
output = utils.PrintAndCapture(func() {
|
||||||
if backtraceStatus && !onlyChinaTest {
|
if backtraceStatus && !onlyChinaTest {
|
||||||
utils.PrintCenteredTitle("三网回程线路检测", width)
|
utils.PrintCenteredTitle("三网回程线路检测", width)
|
||||||
if strings.Contains(output, "IPV6") {
|
if uts.IPV6 {
|
||||||
backtrace.BackTrace(true)
|
backtrace.BackTrace(true)
|
||||||
} else {
|
} else {
|
||||||
backtrace.BackTrace(false)
|
backtrace.BackTrace(false)
|
||||||
|
6
goecs.sh
6
goecs.sh
@@ -143,7 +143,7 @@ goecs_check() {
|
|||||||
os=$(uname -s 2>/dev/null || echo "Unknown")
|
os=$(uname -s 2>/dev/null || echo "Unknown")
|
||||||
arch=$(uname -m 2>/dev/null || echo "Unknown")
|
arch=$(uname -m 2>/dev/null || echo "Unknown")
|
||||||
check_china
|
check_china
|
||||||
ECS_VERSION="0.1.55"
|
ECS_VERSION="0.1.70"
|
||||||
for api in \
|
for api in \
|
||||||
"https://api.github.com/repos/oneclickvirt/ecs/releases/latest" \
|
"https://api.github.com/repos/oneclickvirt/ecs/releases/latest" \
|
||||||
"https://githubapi.spiritlhl.workers.dev/repos/oneclickvirt/ecs/releases/latest" \
|
"https://githubapi.spiritlhl.workers.dev/repos/oneclickvirt/ecs/releases/latest" \
|
||||||
@@ -155,8 +155,8 @@ goecs_check() {
|
|||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
if [ -z "$ECS_VERSION" ]; then
|
if [ -z "$ECS_VERSION" ]; then
|
||||||
_yellow "Unable to get version info, using default version 0.1.55"
|
_yellow "Unable to get version info, using default version 0.1.70"
|
||||||
ECS_VERSION="0.1.55"
|
ECS_VERSION="0.1.70"
|
||||||
fi
|
fi
|
||||||
version_output=""
|
version_output=""
|
||||||
for cmd_path in "goecs" "./goecs" "/usr/bin/goecs" "/usr/local/bin/goecs"; do
|
for cmd_path in "goecs" "./goecs" "/usr/bin/goecs" "/usr/local/bin/goecs"; do
|
||||||
|
@@ -6,5 +6,5 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Test(t *testing.T) {
|
func Test(t *testing.T) {
|
||||||
fmt.Printf("%s", MediaTest("zh"))
|
fmt.Print("%s", MediaTest("zh"))
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,7 @@ import (
|
|||||||
"github.com/imroc/req/v3"
|
"github.com/imroc/req/v3"
|
||||||
"github.com/oneclickvirt/UnlockTests/uts"
|
"github.com/oneclickvirt/UnlockTests/uts"
|
||||||
"github.com/oneclickvirt/basics/system"
|
"github.com/oneclickvirt/basics/system"
|
||||||
|
butils "github.com/oneclickvirt/basics/utils"
|
||||||
. "github.com/oneclickvirt/defaultset"
|
. "github.com/oneclickvirt/defaultset"
|
||||||
"github.com/oneclickvirt/security/network"
|
"github.com/oneclickvirt/security/network"
|
||||||
)
|
)
|
||||||
@@ -483,6 +484,7 @@ result:
|
|||||||
stack = "IPv6"
|
stack = "IPv6"
|
||||||
}
|
}
|
||||||
StackType = stack
|
StackType = stack
|
||||||
|
butils.CheckPublicAccess(3 * time.Second) // 设置basics检测,避免部分测试未启用
|
||||||
return NetCheckResult{
|
return NetCheckResult{
|
||||||
HasIPv4: hasV4,
|
HasIPv4: hasV4,
|
||||||
HasIPv6: hasV6,
|
HasIPv6: hasV6,
|
||||||
|
@@ -6,12 +6,26 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCheckPublicAccess(t *testing.T) {
|
// func TestCheckPublicAccess(t *testing.T) {
|
||||||
|
// timeout := 3 * time.Second
|
||||||
|
// result := CheckPublicAccess(timeout)
|
||||||
|
// if result.Connected {
|
||||||
|
// fmt.Print("✅ 本机有公网连接,类型: %s\n", result.StackType)
|
||||||
|
// } else {
|
||||||
|
// fmt.Println("❌ 本机未检测到公网连接")
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
func TestBasicsAndSecurityCheck(t *testing.T) {
|
||||||
timeout := 3 * time.Second
|
timeout := 3 * time.Second
|
||||||
result := CheckPublicAccess(timeout)
|
result := CheckPublicAccess(timeout)
|
||||||
if result.Connected {
|
if result.Connected {
|
||||||
fmt.Printf("✅ 本机有公网连接,类型: %s\n", result.StackType)
|
fmt.Print("✅ 本机有公网连接,类型: %s\n", result.StackType)
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("❌ 本机未检测到公网连接")
|
fmt.Println("❌ 本机未检测到公网连接")
|
||||||
}
|
}
|
||||||
|
basicInfo, securityInfo, nt3CheckType := BasicsAndSecurityCheck("zh", "ipv4", false)
|
||||||
|
fmt.Println(basicInfo)
|
||||||
|
fmt.Println(securityInfo)
|
||||||
|
fmt.Println(nt3CheckType)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user