mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-09-27 19:52:08 +08:00
Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dc3eff1fe3 | ||
![]() |
0a0f2199bc | ||
![]() |
91004d87f5 | ||
![]() |
8f41c37203 | ||
![]() |
12b1ae0702 | ||
![]() |
653cd75a97 | ||
![]() |
ea36e88c9f | ||
![]() |
c81ebb3c7a | ||
![]() |
7896b3ead5 | ||
![]() |
eb98a7b857 | ||
![]() |
d4d86229de | ||
![]() |
651a183382 | ||
![]() |
afc313a2a8 | ||
![]() |
39ac8d198d | ||
![]() |
a70dc2bab1 | ||
![]() |
5041a16a9a | ||
![]() |
21deb3587e | ||
![]() |
3bac30edc2 | ||
![]() |
9ef2ec4a9e | ||
![]() |
ac33e00e0a | ||
![]() |
7a439f7095 | ||
![]() |
e3bfa65f66 | ||
![]() |
74e33a212c | ||
![]() |
bba8595033 | ||
![]() |
530181be87 | ||
![]() |
7deb986209 | ||
![]() |
ea8e5efbd3 | ||
![]() |
db88ee8479 | ||
![]() |
67a3bfdaad | ||
![]() |
e57ce05c0c | ||
![]() |
62137f0bb1 | ||
![]() |
f9d8c9ee4c | ||
![]() |
913a1725c1 | ||
![]() |
f1acbd361b | ||
![]() |
d6f62f8624 | ||
![]() |
94da890522 | ||
![]() |
42b94260de | ||
![]() |
16e2603176 | ||
![]() |
0ed9840038 | ||
![]() |
31b53e13b0 | ||
![]() |
fb697fa25f | ||
![]() |
2510b3ead0 | ||
![]() |
b64b8a2d96 | ||
![]() |
663614117d | ||
![]() |
a96c9b6c7d | ||
![]() |
e8f73ba4b8 | ||
![]() |
dd6fbff943 | ||
![]() |
e473851a02 | ||
![]() |
86fc407ccb |
2
.github/workflows/build_docker.yaml
vendored
2
.github/workflows/build_docker.yaml
vendored
@@ -1,6 +1,8 @@
|
|||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types: [ published ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
31
.github/workflows/main.yaml
vendored
31
.github/workflows/main.yaml
vendored
@@ -40,3 +40,34 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
GOPRIVATE: github.com/oneclickvirt/security
|
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 }}
|
8
.github/workflows/public-build.yml
vendored
8
.github/workflows/public-build.yml
vendored
@@ -1,6 +1,8 @@
|
|||||||
name: Public Build
|
name: Public Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types: [ published ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -67,10 +69,10 @@ jobs:
|
|||||||
- name: Build and Test
|
- name: Build and Test
|
||||||
run: |
|
run: |
|
||||||
# 构建二进制文件
|
# 构建二进制文件
|
||||||
go build -o main
|
go build -o maintest
|
||||||
|
|
||||||
# 测试无菜单模式是否正常运行(禁用 security 检测)
|
# 测试无菜单模式是否正常运行(禁用 security 检测)
|
||||||
./main -menu=false -l en -security=false -upload=false || exit 1
|
./maintest -menu=false -l en -security=false -upload=false || exit 1
|
||||||
|
rm -rf maintest
|
||||||
|
|
||||||
- name: Commit and push changes
|
- name: Commit and push changes
|
||||||
run: |
|
run: |
|
||||||
|
@@ -6,7 +6,9 @@ builds:
|
|||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0 -extldflags=-static
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- windows
|
- windows
|
||||||
@@ -34,6 +36,8 @@ builds:
|
|||||||
- CXX=o64-clang++
|
- CXX=o64-clang++
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
goos:
|
goos:
|
||||||
- darwin
|
- darwin
|
||||||
goarch:
|
goarch:
|
||||||
@@ -47,6 +51,8 @@ builds:
|
|||||||
- CXX=oa64-clang++
|
- CXX=oa64-clang++
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}} -checklinkname=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
goos:
|
goos:
|
||||||
- darwin
|
- darwin
|
||||||
goarch:
|
goarch:
|
||||||
@@ -75,4 +81,4 @@ changelog:
|
|||||||
- Merge pull request
|
- Merge pull request
|
||||||
- Merge branch
|
- Merge branch
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
- New translations
|
- New translations
|
||||||
|
63
README.md
63
README.md
@@ -1,10 +1,14 @@
|
|||||||
# ECS
|
# ECS
|
||||||
|
|
||||||
[](https://github.com/oneclickvirt/ecs/actions/workflows/main.yaml)
|
[](https://github.com/oneclickvirt/ecs/actions/workflows/main.yaml)
|
||||||
|
|
||||||
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Foneclickvirt%2Fecs?ref=badge_shield)
|
||||||
|
|
||||||
[](https://hits.spiritlhl.net)
|
[](https://hits.spiritlhl.net)
|
||||||
|
|
||||||
融合怪测评项目 - GO版本 - (除环境安装使用shell外无额外shell文件依赖)
|
融合怪测评项目 - GO版本
|
||||||
|
|
||||||
|
(环境安装[非必须]使用shell外无额外shell文件依赖,环境安装只是为了测的更准,极端情况下无环境依赖安装也可全测项目)
|
||||||
|
|
||||||
如有问题请 [issues](https://github.com/oneclickvirt/ecs/issues) 反馈。
|
如有问题请 [issues](https://github.com/oneclickvirt/ecs/issues) 反馈。
|
||||||
|
|
||||||
@@ -24,23 +28,24 @@ Shell 版本:[https://github.com/spiritLHLS/ecs](https://github.com/spiritLHLS
|
|||||||
|
|
||||||
### **编译与测试支持情况**
|
### **编译与测试支持情况**
|
||||||
| 编译支持的架构 | 测试支持的架构 | 编译支持的系统 | 测试支持的系统 |
|
| 编译支持的架构 | 测试支持的架构 | 编译支持的系统 | 测试支持的系统 |
|
||||||
|---------------------------|-----------|------------------------------|-----------|
|
|---------------------------|-----------|---------|-----------|
|
||||||
| amd64 | amd64 | Linux | Linux |
|
| amd64 | amd64 | Linux | Linux |
|
||||||
| arm | arm | Windows | Windows |
|
| arm | arm | Windows | Windows |
|
||||||
| arm64 | arm64 | FreeBSD | FreeBSD |
|
| arm64 | arm64 | FreeBSD | FreeBSD |
|
||||||
| 386 | 386 | | |
|
| 386 | 386 | OpenBSD | |
|
||||||
| mips | | MacOS | |
|
| mips | | MacOS | |
|
||||||
| mipsle | | | |
|
| mipsle | | | |
|
||||||
| s390x | s390x | | |
|
| s390x | s390x | | |
|
||||||
| riscv64 | | | |
|
| riscv64 | | | |
|
||||||
|
|
||||||
|
|
||||||
> 更多架构与系统请自行测试,如有问题请开 issues。
|
> 更多架构与系统请自行测试,如有问题请开 issues。
|
||||||
|
|
||||||
### **待支持的系统**
|
### **待支持的系统**
|
||||||
| 系统 | 说明 |
|
| 系统 | 说明 |
|
||||||
|-----|--------------------------|
|
|-----|---------------------------|
|
||||||
| MacOS | 存在硬件测试 BUG 未修复,存在环境依赖未修复 |
|
| MacOS | 存在硬件测试 BUG 未修复,存在环境依赖未修复 |
|
||||||
|
| Android(arm64) | 存在权限问题未修复,非安卓系统的ARM架构无问题 |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -89,6 +94,12 @@ Shell 版本:[https://github.com/spiritLHLS/ecs](https://github.com/spiritLHLS
|
|||||||
export noninteractive=true && curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh && bash goecs.sh env && bash goecs.sh install && goecs
|
export noninteractive=true && curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh && bash goecs.sh env && bash goecs.sh install && goecs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- **短链接:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export noninteractive=true && curl -L https://bash.spiritlhl.net/goecs -o goecs.sh && chmod +x goecs.sh && bash goecs.sh env && bash goecs.sh install && goecs
|
||||||
|
```
|
||||||
|
|
||||||
#### **详细说明**
|
#### **详细说明**
|
||||||
|
|
||||||
**详细说明**中的命令**可控制是否安装依赖**,**是否更新包管理器**,**默认互动模式可进行选择**
|
**详细说明**中的命令**可控制是否安装依赖**,**是否更新包管理器**,**默认互动模式可进行选择**
|
||||||
@@ -128,19 +139,19 @@ Shell 版本:[https://github.com/spiritLHLS/ecs](https://github.com/spiritLHLS
|
|||||||
export noninteractive=true && ./goecs.sh env
|
export noninteractive=true && ./goecs.sh env
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **安装 `goecs`**
|
3. **安装 `goecs` 本体(仅下载二进制文件无依赖安装)**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./goecs.sh install
|
./goecs.sh install
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **升级 `goecs`**
|
4. **升级 `goecs` 本体**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./goecs.sh upgrade
|
./goecs.sh upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
5. **卸载 `goecs`**
|
5. **卸载 `goecs` 本体**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./goecs.sh uninstall
|
./goecs.sh uninstall
|
||||||
@@ -332,6 +343,7 @@ GOOS=darwin GOARCH=amd64 go build -o goecs_darwin
|
|||||||
| 测试稳定性 | 核心测试组件10年以上未变 | 每个大版本更新测试项,分数不同版本间难以对比(每个版本对标当前最好的CPU) |
|
| 测试稳定性 | 核心测试组件10年以上未变 | 每个大版本更新测试项,分数不同版本间难以对比(每个版本对标当前最好的CPU) |
|
||||||
| 测试内容 | 仅测试计算性能 | 覆盖多种性能测试,分数加权计算,但部分测试实际不常用 |
|
| 测试内容 | 仅测试计算性能 | 覆盖多种性能测试,分数加权计算,但部分测试实际不常用 |
|
||||||
| 适用场景 | 适合快速测试,仅测试计算性能 | 适合综合全面的测试 |
|
| 适用场景 | 适合快速测试,仅测试计算性能 | 适合综合全面的测试 |
|
||||||
|
| 排行榜 | [sysbench.spiritlhl.net](https://sysbench.spiritlhl.net/) | [browser.geekbench.com](https://browser.geekbench.com/) |
|
||||||
|
|
||||||
且```goecs```测试使用何种CPU测试方式可使用参数指定,默认只是为了更多用户快速测试的需求
|
且```goecs```测试使用何种CPU测试方式可使用参数指定,默认只是为了更多用户快速测试的需求
|
||||||
|
|
||||||
@@ -357,12 +369,12 @@ GOOS=darwin GOARCH=amd64 go build -o goecs_darwin
|
|||||||
|
|
||||||
## 致谢
|
## 致谢
|
||||||
|
|
||||||
感谢 [he.net](https://he.net) [bgp.tools](https://bgp.tools) [ipinfo.io](https://ipinfo.io) [ip.sb](https://ip.sb) [cheervision.co](https://cheervision.co) [scamalytics.com](https://scamalytics.com) [abuseipdb.com](https://www.abuseipdb.com/) [virustotal.com](https://www.virustotal.com/) [ip2location.com](ip2location.com/) [ip-api.com](https://ip-api.com) [ipregistry.co](https://ipregistry.co/) [ipdata.co](https://ipdata.co/) [ipgeolocation.io](https://ipgeolocation.io) [ipwhois.io](https://ipwhois.io) [ipapi.com](https://ipapi.com/) [ipapi.is](https://ipapi.is/) [ipqualityscore.com](https://www.ipqualityscore.com/) [bigdatacloud.com](https://www.bigdatacloud.com/) 等网站提供的API进行检测,感谢互联网各网站提供的查询资源
|
感谢 [he.net](https://he.net) [bgp.tools](https://bgp.tools) [ipinfo.io](https://ipinfo.io) [ip.sb](https://ip.sb) [cheervision.co](https://cheervision.co) [scamalytics.com](https://scamalytics.com) [abuseipdb.com](https://www.abuseipdb.com/) [virustotal.com](https://www.virustotal.com/) [ip2location.com](https://ip2location.com/) [ip-api.com](https://ip-api.com) [ipregistry.co](https://ipregistry.co/) [ipdata.co](https://ipdata.co/) [ipgeolocation.io](https://ipgeolocation.io) [ipwhois.io](https://ipwhois.io) [ipapi.com](https://ipapi.com/) [ipapi.is](https://ipapi.is/) [ipqualityscore.com](https://www.ipqualityscore.com/) [bigdatacloud.com](https://www.bigdatacloud.com/) 等网站提供的API进行检测,感谢互联网各网站提供的查询资源
|
||||||
|
|
||||||
感谢
|
感谢
|
||||||
|
|
||||||
<a href="https://h501.io/?from=69" target="_blank">
|
<a href="https://h501.io/?from=69" target="_blank">
|
||||||
<img src="https://github.com/spiritLHLS/ecs/assets/103393591/dfd47230-2747-4112-be69-b5636b34f07f" alt="h501">
|
<img src="https://github.com/spiritLHLS/ecs/assets/103393591/dfd47230-2747-4112-be69-b5636b34f07f" alt="h501" style="height: 50px;">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
提供的免费托管支持本开源项目的共享测试结果存储
|
提供的免费托管支持本开源项目的共享测试结果存储
|
||||||
@@ -370,13 +382,20 @@ GOOS=darwin GOARCH=amd64 go build -o goecs_darwin
|
|||||||
同时感谢以下平台提供编辑和测试支持
|
同时感谢以下平台提供编辑和测试支持
|
||||||
|
|
||||||
<a href="https://www.jetbrains.com/go/" target="_blank">
|
<a href="https://www.jetbrains.com/go/" target="_blank">
|
||||||
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/GoLand.png" alt="goland">
|
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/GoLand.png" alt="goland" style="height: 50px;">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/" target="_blank">
|
<a href="https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/" target="_blank">
|
||||||
<img src="https://linuxone.cloud.marist.edu/oss/resources/images/linuxonelogo03.png" alt="ibm">
|
<img src="https://linuxone.cloud.marist.edu/oss/resources/images/linuxonelogo03.png" alt="ibm" style="height: 50px;">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="https://console.zmto.com/?affid=1524" target="_blank">
|
||||||
|
<img src="https://console.zmto.com/templates/2019/dist/images/logo_dark.svg" alt="zmto" style="height: 50px;">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## Stargazers over time
|
## Stargazers over time
|
||||||
|
|
||||||
[](https://starchart.cc/oneclickvirt/ecs)
|
[](https://www.spiritlhl.net)
|
||||||
|
|
||||||
|
## License
|
||||||
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Foneclickvirt%2Fecs?ref=badge_large)
|
34
README_EN.md
34
README_EN.md
@@ -4,7 +4,9 @@
|
|||||||
|
|
||||||
[](https://hits.spiritlhl.net)
|
[](https://hits.spiritlhl.net)
|
||||||
|
|
||||||
Fusion Monster Evaluation Project - GO Version - (No additional shell file dependencies other than the environment installation shell)
|
Fusion Monster Evaluation Project - GO Version
|
||||||
|
|
||||||
|
(No additional shell file dependencies unless necessary to install the environment using the shell, the environment is installed just to measure more accurately, in extreme cases no environment dependencies can also be fully measured project)
|
||||||
|
|
||||||
Please report any issues via [issues](https://github.com/oneclickvirt/ecs/issues).
|
Please report any issues via [issues](https://github.com/oneclickvirt/ecs/issues).
|
||||||
|
|
||||||
@@ -28,7 +30,7 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
|
|||||||
| amd64 | amd64 | Linux | Linux |
|
| amd64 | amd64 | Linux | Linux |
|
||||||
| arm | arm | Windows | Windows |
|
| arm | arm | Windows | Windows |
|
||||||
| arm64 | arm64 | FreeBSD | FreeBSD |
|
| arm64 | arm64 | FreeBSD | FreeBSD |
|
||||||
| 386 | 386 | | |
|
| 386 | 386 | OpenBSD | |
|
||||||
| mips | | MacOS | |
|
| mips | | MacOS | |
|
||||||
| mipsle | | | |
|
| mipsle | | | |
|
||||||
| s390x | s390x | | |
|
| s390x | s390x | | |
|
||||||
@@ -37,10 +39,10 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
|
|||||||
> Please test additional architectures and systems yourself. If you encounter any issues, please open an issue.
|
> Please test additional architectures and systems yourself. If you encounter any issues, please open an issue.
|
||||||
|
|
||||||
### **Systems Pending Support**
|
### **Systems Pending Support**
|
||||||
| OS | Notes |
|
| OS | Notes |
|
||||||
|--------|--------------------------------------------------------|
|
|--------|-------------------------------------------------------------------------------------------------|
|
||||||
| MacOS | Hardware testing bugs and environment dependencies unresolved |
|
| MacOS | Hardware testing bugs and environment dependencies unresolved |
|
||||||
|
| Android(arm64) | Permission issues that are not fixed, no problems with ARM architecture for non-Android systems |
|
||||||
---
|
---
|
||||||
|
|
||||||
## **Features**
|
## **Features**
|
||||||
@@ -88,6 +90,12 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
|
|||||||
export noninteractive=true && curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh && bash goecs.sh env && bash goecs.sh install && goecs -l en
|
export noninteractive=true && curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh && bash goecs.sh env && bash goecs.sh install && goecs -l en
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- **Short Link:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export noninteractive=true && curl -L https://bash.spiritlhl.net/goecs -o goecs.sh && chmod +x goecs.sh && bash goecs.sh env && bash goecs.sh install && goecs
|
||||||
|
``
|
||||||
|
|
||||||
#### **Detailed instructions**
|
#### **Detailed instructions**
|
||||||
|
|
||||||
**Detailed description** of the commands in **Command **Controls whether to install dependencies**, **Whether to update the package manager**, **Default interaction mode can be selected***
|
**Detailed description** of the commands in **Command **Controls whether to install dependencies**, **Whether to update the package manager**, **Default interaction mode can be selected***
|
||||||
@@ -355,12 +363,12 @@ Note that `goecs` allows you to specify CPU test method via parameters. The defa
|
|||||||
|
|
||||||
## Thanks
|
## Thanks
|
||||||
|
|
||||||
Thank [he.net](https://he.net) [bgp.tools](https://bgp.tools) [ipinfo.io](https://ipinfo.io) [ip.sb](https://ip.sb) [cheervision.co](https://cheervision.co) [scamalytics.com](https://scamalytics.com) [abuseipdb.com](https://www.abuseipdb.com/) [virustotal.com](https://www.virustotal.com/) [ip2location.com](ip2location.com/) [ip-api.com](https://ip-api.com) [ipregistry.co](https://ipregistry.co/) [ipdata.co](https://ipdata.co/) [ipgeolocation.io](https://ipgeolocation.io) [ipwhois.io](https://ipwhois.io) [ipapi.com](https://ipapi.com/) [ipapi.is](https://ipapi.is/) [ipqualityscore.com](https://www.ipqualityscore.com/) [bigdatacloud.com](https://www.bigdatacloud.com/) and others for providing APIs for testing, and thanks to various websites on the Internet for providing query resources.
|
Thank [he.net](https://he.net) [bgp.tools](https://bgp.tools) [ipinfo.io](https://ipinfo.io) [ip.sb](https://ip.sb) [cheervision.co](https://cheervision.co) [scamalytics.com](https://scamalytics.com) [abuseipdb.com](https://www.abuseipdb.com/) [virustotal.com](https://www.virustotal.com/) [ip2location.com](https://ip2location.com/) [ip-api.com](https://ip-api.com) [ipregistry.co](https://ipregistry.co/) [ipdata.co](https://ipdata.co/) [ipgeolocation.io](https://ipgeolocation.io) [ipwhois.io](https://ipwhois.io) [ipapi.com](https://ipapi.com/) [ipapi.is](https://ipapi.is/) [ipqualityscore.com](https://www.ipqualityscore.com/) [bigdatacloud.com](https://www.bigdatacloud.com/) and others for providing APIs for testing, and thanks to various websites on the Internet for providing query resources.
|
||||||
|
|
||||||
Thank
|
Thank
|
||||||
|
|
||||||
<a href="https://h501.io/?from=69" target="_blank">
|
<a href="https://h501.io/?from=69" target="_blank">
|
||||||
<img src="https://github.com/spiritLHLS/ecs/assets/103393591/dfd47230-2747-4112-be69-b5636b34f07f" alt="h501">
|
<img src="https://github.com/spiritLHLS/ecs/assets/103393591/dfd47230-2747-4112-be69-b5636b34f07f" alt="h501" style="height: 50px;">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
provided free hosting support for this open source project's shared test results storage
|
provided free hosting support for this open source project's shared test results storage
|
||||||
@@ -368,13 +376,17 @@ provided free hosting support for this open source project's shared test results
|
|||||||
Thanks also to the following platforms for editorial and testing support
|
Thanks also to the following platforms for editorial and testing support
|
||||||
|
|
||||||
<a href="https://www.jetbrains.com/go/" target="_blank">
|
<a href="https://www.jetbrains.com/go/" target="_blank">
|
||||||
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/GoLand.png" alt="goland">
|
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/GoLand.png" alt="goland" style="height: 50px;">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/" target="_blank">
|
<a href="https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/" target="_blank">
|
||||||
<img src="https://linuxone.cloud.marist.edu/oss/resources/images/linuxonelogo03.png" alt="ibm">
|
<img src="https://linuxone.cloud.marist.edu/oss/resources/images/linuxonelogo03.png" alt="ibm" style="height: 50px;">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="https://console.zmto.com/?affid=1524" target="_blank">
|
||||||
|
<img src="https://console.zmto.com/templates/2019/dist/images/logo_dark.svg" alt="zmto" style="height: 50px;">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
## Stargazers over time
|
## Stargazers over time
|
||||||
|
|
||||||
[](https://starchart.cc/oneclickvirt/ecs)
|
[](https://www.spiritlhl.net)
|
@@ -110,6 +110,8 @@ AMD的7950x单核满血性能得分在6500左右,AMD的5950x单核满血性能
|
|||||||
|
|
||||||
有时候多核得分和单核得分一样,证明商家在限制程序并发使用CPU,典型例子腾讯云。
|
有时候多核得分和单核得分一样,证明商家在限制程序并发使用CPU,典型例子腾讯云。
|
||||||
|
|
||||||
|
```Sysbench```的基准可见 [CPU Performance Ladder For Sysbench](https://sysbench.spiritlhl.net/) 天梯图,具体得分不分测试的sysbench的版本。
|
||||||
|
|
||||||
```GeekBench```的基准可见 [官方网站](https://browser.geekbench.com/processor-benchmarks/) 天梯图,具体得分每个```GeekBench```版本都不一样,注意使用时测试的```GeekBench```版本是什么。
|
```GeekBench```的基准可见 [官方网站](https://browser.geekbench.com/processor-benchmarks/) 天梯图,具体得分每个```GeekBench```版本都不一样,注意使用时测试的```GeekBench```版本是什么。
|
||||||
|
|
||||||
多说一句,```GeekBench```测的很多内容,实际在服务器使用过程中根本用不到,测试仅供参考。当然```Sysbench```非常不全面,但它基于最基础的计算性能可以大致比较CPU的性能。
|
多说一句,```GeekBench```测的很多内容,实际在服务器使用过程中根本用不到,测试仅供参考。当然```Sysbench```非常不全面,但它基于最基础的计算性能可以大致比较CPU的性能。
|
||||||
@@ -279,6 +281,8 @@ AMD's 7950x single-core full performance score is around 6500, AMD's 5950x singl
|
|||||||
|
|
||||||
Sometimes multi-core scores are the same as single-core scores, proving that the vendor is limiting program concurrent use of CPU, a typical example being Tencent Cloud.
|
Sometimes multi-core scores are the same as single-core scores, proving that the vendor is limiting program concurrent use of CPU, a typical example being Tencent Cloud.
|
||||||
|
|
||||||
|
Benchmarks for ```Sysbench`` can be found in the [CPU Performance Ladder For Sysbench](https://sysbench.spiritlhl.net/) ladder chart, with specific scores regardless of the version of sysbench tested.
|
||||||
|
|
||||||
For `GeekBench` baselines, see the [official website](https://browser.geekbench.com/processor-benchmarks/) ladder chart. Specific scores differ for each `GeekBench` version, so note which `GeekBench` version is being used when testing.
|
For `GeekBench` baselines, see the [official website](https://browser.geekbench.com/processor-benchmarks/) ladder chart. Specific scores differ for each `GeekBench` version, so note which `GeekBench` version is being used when testing.
|
||||||
|
|
||||||
As an additional note, many things tested by `GeekBench` are not actually used in server usage processes, so the test is for reference only. Of course, `Sysbench` is very incomplete, but it can roughly compare CPU performance based on the most basic computational performance.
|
As an additional note, many things tested by `GeekBench` are not actually used in server usage processes, so the test is for reference only. Of course, `Sysbench` is very incomplete, but it can roughly compare CPU performance based on the most basic computational performance.
|
||||||
@@ -424,6 +428,8 @@ AMDの7950xシングルコアのフルパフォーマンススコアは約6500
|
|||||||
|
|
||||||
時々、マルチコアスコアとシングルコアスコアが同じ場合があります。これは販売者がプログラムの並列CPU使用を制限していることを示しています。典型的な例はTencent Cloudです。
|
時々、マルチコアスコアとシングルコアスコアが同じ場合があります。これは販売者がプログラムの並列CPU使用を制限していることを示しています。典型的な例はTencent Cloudです。
|
||||||
|
|
||||||
|
Sysbenchのベンチマークは[CPU Performance Ladder For Sysbench](https://sysbench.spiritlhl.net/)のラダーチャートで見ることができる。
|
||||||
|
|
||||||
```GeekBench```の基準は[公式ウェブサイト](https://browser.geekbench.com/processor-benchmarks/)の階層チャートを参照してください。具体的なスコアは各```GeekBench```バージョンで異なるため、テスト時の```GeekBench```バージョンに注意してください。
|
```GeekBench```の基準は[公式ウェブサイト](https://browser.geekbench.com/processor-benchmarks/)の階層チャートを参照してください。具体的なスコアは各```GeekBench```バージョンで異なるため、テスト時の```GeekBench```バージョンに注意してください。
|
||||||
|
|
||||||
補足ですが、```GeekBench```がテストする多くの内容は、サーバー使用過程で実際には必要ないことが多いです。テストは参考程度にしてください。もちろん```Sysbench```は非常に包括的ではありませんが、基本的な計算性能に基づいてCPUのパフォーマンスを大まかに比較できます。
|
補足ですが、```GeekBench```がテストする多くの内容は、サーバー使用過程で実際には必要ないことが多いです。テストは参考程度にしてください。もちろん```Sysbench```は非常に包括的ではありませんが、基本的な計算性能に基づいてCPUのパフォーマンスを大まかに比較できます。
|
||||||
|
@@ -4,6 +4,6 @@ import (
|
|||||||
"github.com/oneclickvirt/backtrace/bk"
|
"github.com/oneclickvirt/backtrace/bk"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BackTrace() {
|
func BackTrace(enableIpv6 bool) {
|
||||||
backtrace.BackTrace()
|
backtrace.BackTrace(enableIpv6)
|
||||||
}
|
}
|
@@ -15,6 +15,7 @@ import (
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
// 本包仅测试,无实际使用
|
||||||
func TestBackTrace(t *testing.T) {
|
func TestBackTrace(t *testing.T) {
|
||||||
BackTrace()
|
BackTrace(false)
|
||||||
}
|
}
|
@@ -4,6 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 本包仅测试无实际使用
|
||||||
func TestMedia(t *testing.T) {
|
func TestMedia(t *testing.T) {
|
||||||
ComMediaTest("zh")
|
ComMediaTest("zh")
|
||||||
}
|
}
|
@@ -3,6 +3,7 @@ package ntrace
|
|||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
// https://github.com/nxtrace/NTrace-core/blob/main/fast_trace/fast_trace.go
|
// https://github.com/nxtrace/NTrace-core/blob/main/fast_trace/fast_trace.go
|
||||||
|
// 本包仅测试无实际使用
|
||||||
func TestTraceRoute(t *testing.T) {
|
func TestTraceRoute(t *testing.T) {
|
||||||
TraceRoute3("en", "GZ", "ipv4")
|
TraceRoute3("en", "GZ", "ipv4")
|
||||||
}
|
}
|
@@ -36,6 +36,6 @@ func DiskTest(language, testMethod, testPath string, isMultiCheck bool, autoChan
|
|||||||
if !strings.Contains(res, "\n") && res != "" {
|
if !strings.Contains(res, "\n") && res != "" {
|
||||||
res += "\n"
|
res += "\n"
|
||||||
}
|
}
|
||||||
fmt.Printf(res)
|
fmt.Printf("%s", res)
|
||||||
//fmt.Println("--------------------------------------------------")
|
//fmt.Println("--------------------------------------------------")
|
||||||
}
|
}
|
||||||
|
@@ -3,5 +3,5 @@ package disktest
|
|||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
func TestDiskIoTest(t *testing.T) {
|
func TestDiskIoTest(t *testing.T) {
|
||||||
DiskTest("zh", "sysbench", "", false)
|
DiskTest("zh", "sysbench", "", false, false)
|
||||||
}
|
}
|
||||||
|
61
go.mod
61
go.mod
@@ -1,23 +1,25 @@
|
|||||||
module github.com/oneclickvirt/ecs
|
module github.com/oneclickvirt/ecs
|
||||||
|
|
||||||
go 1.23.4
|
go 1.24.1
|
||||||
|
|
||||||
|
toolchain go1.24.2
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/imroc/req/v3 v3.49.0
|
github.com/imroc/req/v3 v3.50.0
|
||||||
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841
|
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841
|
||||||
github.com/oneclickvirt/UnlockTests v0.0.26-20250329125926
|
github.com/oneclickvirt/UnlockTests v0.0.27-20250628125053
|
||||||
github.com/oneclickvirt/backtrace v0.0.4-20250329130043
|
github.com/oneclickvirt/backtrace v0.0.5-20250629024536
|
||||||
github.com/oneclickvirt/basics v0.0.11-20250404123515
|
github.com/oneclickvirt/basics v0.0.13-20250629023612
|
||||||
github.com/oneclickvirt/cputest v0.0.10-20250404151448
|
github.com/oneclickvirt/cputest v0.0.10-20250404151448
|
||||||
github.com/oneclickvirt/defaultset v0.0.2-20240624082446
|
github.com/oneclickvirt/defaultset v0.0.2-20240624082446
|
||||||
github.com/oneclickvirt/disktest v0.0.7-20250404150324
|
github.com/oneclickvirt/disktest v0.0.8-20250701031254
|
||||||
github.com/oneclickvirt/gostun v0.0.3-20250329105202
|
github.com/oneclickvirt/gostun v0.0.3-20250329105202
|
||||||
github.com/oneclickvirt/memorytest v0.0.5-20250404130028
|
github.com/oneclickvirt/memorytest v0.0.6-20250630141424.0.20250701022859-5967f9d8d3eb
|
||||||
github.com/oneclickvirt/nt3 v0.0.4-20250329125813
|
github.com/oneclickvirt/nt3 v0.0.5-20250416131047
|
||||||
github.com/oneclickvirt/pingtest v0.0.6-20250329130728
|
github.com/oneclickvirt/pingtest v0.0.7-20250413051539
|
||||||
github.com/oneclickvirt/portchecker v0.0.3-20250329125750
|
github.com/oneclickvirt/portchecker v0.0.3-20250329125750
|
||||||
github.com/oneclickvirt/security v0.0.4-20250401123241
|
github.com/oneclickvirt/security v0.0.4-20250629033626
|
||||||
github.com/oneclickvirt/speedtest v0.0.9-20250329130205
|
github.com/oneclickvirt/speedtest v0.0.9-20250521034111
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@@ -27,10 +29,11 @@ require (
|
|||||||
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.5.0 // indirect
|
||||||
github.com/fatih/color v1.18.0 // indirect
|
github.com/fatih/color v1.18.0 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.8.0 // indirect
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||||
github.com/ghodss/yaml v1.0.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-task/slim-sprig/v3 v3.0.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/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
|
||||||
@@ -38,7 +41,6 @@ require (
|
|||||||
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/hashicorp/hcl v1.0.0 // indirect
|
|
||||||
github.com/huin/goupnp v1.2.0 // indirect
|
github.com/huin/goupnp v1.2.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.12.0 // indirect
|
||||||
@@ -50,22 +52,21 @@ require (
|
|||||||
github.com/libp2p/go-netroute v0.2.1 // indirect
|
github.com/libp2p/go-netroute v0.2.1 // indirect
|
||||||
github.com/lionsoul2014/ip2region v2.11.2+incompatible // indirect
|
github.com/lionsoul2014/ip2region v2.11.2+incompatible // indirect
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
||||||
github.com/magiconair/properties v1.8.9 // indirect
|
|
||||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||||
github.com/miekg/dns v1.1.61 // indirect
|
github.com/miekg/dns v1.1.61 // indirect
|
||||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||||
github.com/mitchellh/mapstructure v1.5.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.3.7 // indirect
|
github.com/nxtrace/NTrace-core v1.4.0 // indirect
|
||||||
github.com/oneclickvirt/dd v0.0.1-20250404124549 // indirect
|
github.com/oneclickvirt/dd v0.0.2-20250701030820 // indirect
|
||||||
github.com/oneclickvirt/fio v0.0.1-20250404141714 // indirect
|
github.com/oneclickvirt/fio v0.0.1-20250406060851 // indirect
|
||||||
|
github.com/oneclickvirt/mbw v0.0.1-20250630140849 // indirect
|
||||||
github.com/onsi/ginkgo/v2 v2.22.1 // 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.3 // 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
|
||||||
github.com/pion/logging v0.2.2 // indirect
|
github.com/pion/logging v0.2.2 // indirect
|
||||||
github.com/pion/stun/v2 v2.0.0 // indirect
|
github.com/pion/stun/v2 v2.0.0 // indirect
|
||||||
@@ -79,18 +80,17 @@ require (
|
|||||||
github.com/refraction-networking/utls v1.6.7 // indirect
|
github.com/refraction-networking/utls v1.6.7 // 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.7.0 // indirect
|
github.com/sagikazarmark/locafero v0.9.0 // indirect
|
||||||
github.com/sagikazarmark/slog-shim v0.1.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.24.5 // indirect
|
||||||
github.com/shoenig/go-m1cpu v0.1.6 // indirect
|
github.com/shoenig/go-m1cpu v0.1.6 // indirect
|
||||||
github.com/showwin/speedtest-go v1.7.7 // 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.12.0 // indirect
|
github.com/spf13/afero v1.14.0 // indirect
|
||||||
github.com/spf13/cast v1.7.1 // indirect
|
github.com/spf13/cast v1.7.1 // indirect
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
github.com/spf13/pflag v1.0.6 // indirect
|
||||||
github.com/spf13/viper v1.19.0 // 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
|
||||||
github.com/tidwall/match v1.1.1 // indirect
|
github.com/tidwall/match v1.1.1 // indirect
|
||||||
@@ -102,16 +102,15 @@ require (
|
|||||||
go.uber.org/mock v0.5.0 // indirect
|
go.uber.org/mock v0.5.0 // 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.32.0 // indirect
|
golang.org/x/crypto v0.37.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
|
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
|
||||||
golang.org/x/mod v0.22.0 // indirect
|
golang.org/x/mod v0.22.0 // indirect
|
||||||
golang.org/x/net v0.34.0 // indirect
|
golang.org/x/net v0.39.0 // indirect
|
||||||
golang.org/x/sync v0.10.0 // indirect
|
golang.org/x/sync v0.13.0 // indirect
|
||||||
golang.org/x/sys v0.29.0 // indirect
|
golang.org/x/sys v0.33.0 // indirect
|
||||||
golang.org/x/term v0.28.0 // indirect
|
golang.org/x/term v0.31.0 // indirect
|
||||||
golang.org/x/text v0.21.0 // indirect
|
golang.org/x/text v0.24.0 // indirect
|
||||||
golang.org/x/tools v0.29.0 // indirect
|
golang.org/x/tools v0.29.0 // indirect
|
||||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
|
||||||
gopkg.in/yaml.v2 v2.4.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
|
||||||
|
122
go.sum
122
go.sum
@@ -16,8 +16,8 @@ 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.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
|
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
||||||
github.com/fsnotify/fsnotify v1.8.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 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
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 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||||
@@ -27,6 +27,8 @@ 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-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||||
|
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=
|
||||||
@@ -46,12 +48,10 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY
|
|||||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||||
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/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
|
||||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
|
||||||
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.49.0 h1:5Rac2qvz7Dq0E3PeBo/c2szV3hagPQIGLoHtfBmYhu4=
|
github.com/imroc/req/v3 v3.50.0 h1:n3BVnZiTRpvkN5T1IB79LC/THhFU9iXksNRMH4ZNVaY=
|
||||||
github.com/imroc/req/v3 v3.49.0/go.mod h1:XZf4t94DNJzcA0UOBlA68hmSrWsAyvN407ADdH4mzCA=
|
github.com/imroc/req/v3 v3.50.0/go.mod h1:tsOk8K7zI6cU4xu/VWCZVtq9Djw9IWm4MslKzme5woU=
|
||||||
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.12.0 h1:xU2/MDJfWmBhJnujHY9qwXQLs3DBsf0/Xa9vECY0Tho=
|
||||||
@@ -78,8 +78,6 @@ github.com/lionsoul2014/ip2region v2.11.2+incompatible h1:+VRsGcrHz8ewXI/2UzTptJ
|
|||||||
github.com/lionsoul2014/ip2region v2.11.2+incompatible/go.mod h1:+ZBN7PBoh5gG6/y0ZQ85vJDBe21WnfbRrQQwTfliJJI=
|
github.com/lionsoul2014/ip2region v2.11.2+incompatible/go.mod h1:+ZBN7PBoh5gG6/y0ZQ85vJDBe21WnfbRrQQwTfliJJI=
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||||
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
|
|
||||||
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
|
||||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
@@ -92,55 +90,55 @@ github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2Em
|
|||||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
|
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
|
||||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
|
||||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||||
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.3.7 h1:ZnTbPrPqpyeraCvUyNbQTNyl4Gz3NRQDh06WdIIHh90=
|
github.com/nxtrace/NTrace-core v1.4.0 h1:pDN2BqxIYjedDKCDDOFBcDNOBnavGcx+4wbiG65Xqiw=
|
||||||
github.com/nxtrace/NTrace-core v1.3.7/go.mod h1:aW2owz9I+W5i+gJEDmnWli75mB+fuO4UTwdOPMcQHpE=
|
github.com/nxtrace/NTrace-core v1.4.0/go.mod h1:0AWqbqiIJbpbFG6W48vtJ6pWM8PPF+lQ1fi2371y+zA=
|
||||||
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.26-20250329125926 h1:H5//xwVjDR02bQ1hLa3G7LnwccsudPMjBVt7WCx2y/U=
|
github.com/oneclickvirt/UnlockTests v0.0.27-20250628125053 h1:Ug8kySZR1weRUcsnGOv+f3HAl791AfkA7EWV3JmiMQA=
|
||||||
github.com/oneclickvirt/UnlockTests v0.0.26-20250329125926/go.mod h1:yXWIZB6iLS88pEd9m4QJi1GENn+7I91zA72y5ONz2Oc=
|
github.com/oneclickvirt/UnlockTests v0.0.27-20250628125053/go.mod h1:yXWIZB6iLS88pEd9m4QJi1GENn+7I91zA72y5ONz2Oc=
|
||||||
github.com/oneclickvirt/backtrace v0.0.4-20250329130043 h1:d3ubN7FTY2xDKN8mmLc1RbvccpTkvfMADtMBvFCRdt0=
|
github.com/oneclickvirt/backtrace v0.0.5-20250629024536 h1:caHCa0DHmbYWBFN1bqKxpvPnN0wOxDEqJv1VDvDdLWs=
|
||||||
github.com/oneclickvirt/backtrace v0.0.4-20250329130043/go.mod h1:zvsC7xY/WZqs5KL2JB967OVnuqjNbxu9bW6wXRLo5h8=
|
github.com/oneclickvirt/backtrace v0.0.5-20250629024536/go.mod h1:5AH00bo41hH3d2/JVuCTlBkZUs3AXX4nlKVXb6piZcI=
|
||||||
github.com/oneclickvirt/basics v0.0.11-20250404123515 h1:2kisK9tBG/Km/HLQFA82lm/B+AWFJp3drjrtGvz8lhw=
|
github.com/oneclickvirt/basics v0.0.13-20250629023612 h1:cQg+cGBt2NMRrjhJPH+CbevZrwtMU8pIZIY2Lp6zmt4=
|
||||||
github.com/oneclickvirt/basics v0.0.11-20250404123515/go.mod h1:yN1IEOXN6v/GJqJSA70Pooo6nXBI/6rq72vTY72wJMQ=
|
github.com/oneclickvirt/basics v0.0.13-20250629023612/go.mod h1:yN1IEOXN6v/GJqJSA70Pooo6nXBI/6rq72vTY72wJMQ=
|
||||||
github.com/oneclickvirt/cputest v0.0.10-20250404151448 h1:ovGtCwFXG0qmpyNDRqcNDIiAmhrtemCjIUXTJ1fPH0o=
|
github.com/oneclickvirt/cputest v0.0.10-20250404151448 h1:ovGtCwFXG0qmpyNDRqcNDIiAmhrtemCjIUXTJ1fPH0o=
|
||||||
github.com/oneclickvirt/cputest v0.0.10-20250404151448/go.mod h1:MmaHN9+XMntI3rLycwj8Ne31fG18IfNoa8N2utDK1CY=
|
github.com/oneclickvirt/cputest v0.0.10-20250404151448/go.mod h1:MmaHN9+XMntI3rLycwj8Ne31fG18IfNoa8N2utDK1CY=
|
||||||
github.com/oneclickvirt/dd v0.0.1-20250404124549 h1:QT2QJaMoZabUijqN2a/vzC13ILeKwQR3vatFZxKszW0=
|
github.com/oneclickvirt/dd v0.0.2-20250701030820 h1:qezfANX8XbM9XodfF2/AikpsUfeOqbRuEn0gJWFtmeA=
|
||||||
github.com/oneclickvirt/dd v0.0.1-20250404124549/go.mod h1:tImu9sPTkLWo2tf1dEN1xQzrylWKauj9hbU8PHfyAeU=
|
github.com/oneclickvirt/dd v0.0.2-20250701030820/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=
|
||||||
github.com/oneclickvirt/defaultset v0.0.2-20240624082446/go.mod h1:e9Jt4tf2sbemCtc84/XgKcHy9EZ2jkc5x2sW1NiJS+E=
|
github.com/oneclickvirt/defaultset v0.0.2-20240624082446/go.mod h1:e9Jt4tf2sbemCtc84/XgKcHy9EZ2jkc5x2sW1NiJS+E=
|
||||||
github.com/oneclickvirt/disktest v0.0.7-20250404150324 h1:uNTjFzzPBTJruPa25/4VLleHDyCj7QHre6qsVJZLo20=
|
github.com/oneclickvirt/disktest v0.0.8-20250701031254 h1:qhNshDeuwq8jEUJUEGsNQL5rPsXr5uEhl/JAUg4zTnQ=
|
||||||
github.com/oneclickvirt/disktest v0.0.7-20250404150324/go.mod h1:LXhRiAYYW0poUMqvUHzgqNqhVnJPj4cxjSA8zTKszbI=
|
github.com/oneclickvirt/disktest v0.0.8-20250701031254/go.mod h1:/0zj8d+RpsRkmchM+3Flki+5VoU0Ogt6UMDxpLPe81U=
|
||||||
github.com/oneclickvirt/fio v0.0.1-20250404141714 h1:rnNQ46O6kE+mFKmPDiWohNMbLr8xR6hzTgAsZcah4QE=
|
github.com/oneclickvirt/fio v0.0.1-20250406060851 h1:b7xHKpPmU4q0NmvigRCEr3tQuAV/83ZIAGtHycLegw8=
|
||||||
github.com/oneclickvirt/fio v0.0.1-20250404141714/go.mod h1:NIq+XYTey68KNERGIy/oRDlzpwLzBVoHOCiqX8didsE=
|
github.com/oneclickvirt/fio v0.0.1-20250406060851/go.mod h1:NIq+XYTey68KNERGIy/oRDlzpwLzBVoHOCiqX8didsE=
|
||||||
github.com/oneclickvirt/gostun v0.0.3-20250329105202 h1:aJ6E91Lp94lq8iWRcCaxpXTjqOOaWvufr5oras6cFtM=
|
github.com/oneclickvirt/gostun v0.0.3-20250329105202 h1:aJ6E91Lp94lq8iWRcCaxpXTjqOOaWvufr5oras6cFtM=
|
||||||
github.com/oneclickvirt/gostun v0.0.3-20250329105202/go.mod h1:f7DPEXAxbmwXSW33dbxtb0/KzqvOBWhTs2Or5xBerQA=
|
github.com/oneclickvirt/gostun v0.0.3-20250329105202/go.mod h1:f7DPEXAxbmwXSW33dbxtb0/KzqvOBWhTs2Or5xBerQA=
|
||||||
github.com/oneclickvirt/memorytest v0.0.5-20250404130028 h1:2XLr8Ow922OnxHqFbGtyGFYNJtgTAcwXIr6AwvEp6UQ=
|
github.com/oneclickvirt/mbw v0.0.1-20250630140849 h1:p6RMhOPBnQKAm9+VEQ2axAFsidrdSdrhXMyheIyv2a8=
|
||||||
github.com/oneclickvirt/memorytest v0.0.5-20250404130028/go.mod h1:qp5uRoSv5lcpUtUqQuFCer4xaZKz9S8UxL+pZopn540=
|
github.com/oneclickvirt/mbw v0.0.1-20250630140849/go.mod h1:0Vq6NRpyLmGUdfHfL3uDcFsuZhi7KlG+OCs5ky2757Y=
|
||||||
github.com/oneclickvirt/nt3 v0.0.4-20250329125813 h1:ZK5DAz8GUa6oyRE/cWmUKkE02tfgDah4TXvN181em7c=
|
github.com/oneclickvirt/memorytest v0.0.6-20250630141424.0.20250701022859-5967f9d8d3eb h1:EKYQWLw4um/C2xm6z8aDl+owWtvaIp0z7nlyMj62kkk=
|
||||||
github.com/oneclickvirt/nt3 v0.0.4-20250329125813/go.mod h1:lDpHmjWwLZd6pO8cZCwzrc5rwd8dK+TIYk+DGmRpSGg=
|
github.com/oneclickvirt/memorytest v0.0.6-20250630141424.0.20250701022859-5967f9d8d3eb/go.mod h1:7xMacjQobvFAtODht2hxTsB9hM2IFS7vZk3gxx+bsjo=
|
||||||
github.com/oneclickvirt/pingtest v0.0.6-20250329130728 h1:XYMfpIj32Wuej5G7f7/NB5/i3I9DMX/mF3ZS8N5KKp8=
|
github.com/oneclickvirt/nt3 v0.0.5-20250416131047 h1:KL0xowq19cW+FMBGMJxdqpRNoeyR+eEmb+jYSubmlTk=
|
||||||
github.com/oneclickvirt/pingtest v0.0.6-20250329130728/go.mod h1:d3Ntx5m9lMll3a/k3+2B+5emj//vgDh4/NHTxs2qQE8=
|
github.com/oneclickvirt/nt3 v0.0.5-20250416131047/go.mod h1:CVsDJEaIdyyZHn3WKbhU8Wn6GOfmBNvJlC/dDLRqcSQ=
|
||||||
|
github.com/oneclickvirt/pingtest v0.0.7-20250413051539 h1:mYOsEmMtwKr40hwM2NimVLpnbR2cjwuOh1c/9fQr2Dw=
|
||||||
|
github.com/oneclickvirt/pingtest v0.0.7-20250413051539/go.mod h1:d3Ntx5m9lMll3a/k3+2B+5emj//vgDh4/NHTxs2qQE8=
|
||||||
github.com/oneclickvirt/portchecker v0.0.3-20250329125750 h1:TTNL0pnQlRsn046kW59I/9UWRpihttFHWnU7Ixycggk=
|
github.com/oneclickvirt/portchecker v0.0.3-20250329125750 h1:TTNL0pnQlRsn046kW59I/9UWRpihttFHWnU7Ixycggk=
|
||||||
github.com/oneclickvirt/portchecker v0.0.3-20250329125750/go.mod h1:HQxSTrqM8/QFqHMTBZ7S8H9eEO5FkUXU1eb7ZX5Mk+k=
|
github.com/oneclickvirt/portchecker v0.0.3-20250329125750/go.mod h1:HQxSTrqM8/QFqHMTBZ7S8H9eEO5FkUXU1eb7ZX5Mk+k=
|
||||||
github.com/oneclickvirt/security v0.0.4-20250401123241 h1:myeAQ1wOKIHx5r9qs9dCwx/5FepY+hZu/fDNquMwKaw=
|
github.com/oneclickvirt/security v0.0.4-20250629033626 h1:DEchQ7WKKz4CzQpMlweoqA993BGncvmp1rL1ICNDJ2g=
|
||||||
github.com/oneclickvirt/security v0.0.4-20250401123241/go.mod h1:Cyo3hwh1irn6yWnTh+YVKtkkVzHlwZgm7t7qR3IPRQA=
|
github.com/oneclickvirt/security v0.0.4-20250629033626/go.mod h1:/5eVnZLvP7RUjwhoI6d8iIMP7msbkHC5So3ZxM+A7Zg=
|
||||||
github.com/oneclickvirt/speedtest v0.0.9-20250329130205 h1:XWM6FhObi+2bEkntPcAAKkiS9w7r6j79DOtmlbq4hhs=
|
github.com/oneclickvirt/speedtest v0.0.9-20250521034111 h1:yygDk+s5qFhPMDRzdMfyopm1xU512peNqY6WYyvYcfY=
|
||||||
github.com/oneclickvirt/speedtest v0.0.9-20250329130205/go.mod h1:zd5ZgIGslmtQLQehEfRjyumlvgDHTpCSMchKfKXoASI=
|
github.com/oneclickvirt/speedtest v0.0.9-20250521034111/go.mod h1:zd5ZgIGslmtQLQehEfRjyumlvgDHTpCSMchKfKXoASI=
|
||||||
github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM=
|
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/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 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw=
|
||||||
github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=
|
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.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
|
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
|
||||||
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
|
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
||||||
github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8=
|
github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8=
|
||||||
github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
|
github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
|
||||||
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
||||||
@@ -173,10 +171,8 @@ github.com/rodaine/table v1.3.0 h1:4/3S3SVkHnVZX91EHFvAMV7K42AnJ0XuymRR2C5HlGE=
|
|||||||
github.com/rodaine/table v1.3.0/go.mod h1:47zRsHar4zw0jgxGxL9YtFfs7EGN6B/TaS+/Dmk4WxU=
|
github.com/rodaine/table v1.3.0/go.mod h1:47zRsHar4zw0jgxGxL9YtFfs7EGN6B/TaS+/Dmk4WxU=
|
||||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||||
github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
|
github.com/sagikazarmark/locafero v0.9.0 h1:GbgQGNtTrEmddYDSAH9QLRyfAHY12md+8YFTqyMTC9k=
|
||||||
github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
|
github.com/sagikazarmark/locafero v0.9.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk=
|
||||||
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
|
|
||||||
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
|
|
||||||
github.com/schollz/progressbar/v3 v3.14.4 h1:W9ZrDSJk7eqmQhd3uxFNNcTr0QL+xuGNI9dEMrw0r74=
|
github.com/schollz/progressbar/v3 v3.14.4 h1:W9ZrDSJk7eqmQhd3uxFNNcTr0QL+xuGNI9dEMrw0r74=
|
||||||
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=
|
||||||
@@ -191,14 +187,14 @@ github.com/showwin/speedtest-go v1.7.7 h1:VmK75SZOTKiuWjIVrs+mo7ZoKEw0utiGCvpnur
|
|||||||
github.com/showwin/speedtest-go v1.7.7/go.mod h1:uLgdWCNarXxlYsL2E5TOZpCIwpgSWnEANZp7gfHXHu0=
|
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.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs=
|
github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
|
||||||
github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4=
|
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.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
|
||||||
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
||||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
|
github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
|
||||||
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
|
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=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
@@ -244,8 +240,8 @@ 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.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
|
golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
|
||||||
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
|
golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
|
||||||
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA=
|
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/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=
|
||||||
@@ -262,14 +258,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.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
|
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
|
||||||
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
|
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
|
||||||
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.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
|
golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
|
||||||
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.13.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=
|
||||||
@@ -284,8 +280,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.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||||
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.33.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=
|
||||||
@@ -293,18 +289,18 @@ 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.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
|
golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o=
|
||||||
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
|
golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw=
|
||||||
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.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
|
||||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
|
||||||
golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg=
|
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||||
golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
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=
|
||||||
@@ -315,13 +311,11 @@ golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588
|
|||||||
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.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
|
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
|
||||||
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
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/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
|
||||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
|
||||||
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 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
|
87
goecs.sh
87
goecs.sh
@@ -1,23 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# From https://github.com/oneclickvirt/ecs
|
# From https://github.com/oneclickvirt/ecs
|
||||||
# 2025.04.02
|
# 2025.06.29
|
||||||
|
|
||||||
# curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh
|
# curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh
|
||||||
# 或
|
# 或
|
||||||
# curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh
|
# curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh
|
||||||
|
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
GGGGGGGG OOOOOOO EEEEEEEE CCCCCCCCC SSSSSSSSSS
|
,ad8888ba, ,ad8888ba, 88888888888 ,ad8888ba, ad88888ba
|
||||||
GG GG OO OO EE CC SS
|
d8"' `"8b d8"' `"8b 88 d8"' `"8b d8" "8b
|
||||||
GG OO OO EE CC SS
|
d8' d8' `8b 88 d8' Y8a
|
||||||
GG OO OO EE CC SS
|
88 88 88 88aaaaa 88 `"Y8aaaaa,
|
||||||
GG OO OO EEEEEEEE CC SSSSSSSSSS
|
88 88888 88 88 88""""" 88 `"""""8b,
|
||||||
GG GGGGGG OO OO EE CC SS
|
Y8, 88 Y8, ,8P 88 Y8, `8b
|
||||||
GG GG OO OO EE CC SS
|
Y8a. .a88 Y8a. .a8P 88 Y8a. .a8P Y8a a8P
|
||||||
GG GG OO OO EE CC SS
|
`"Y88888P" `"Y8888Y"' 88888888888 `"Y8888Y"' "Y88888P"
|
||||||
GGGGGGGG OOOOOOO EEEEEEEE CCCCCCCCC SSSSSSSSSS
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cd /root >/dev/null 2>&1
|
cd /root >/dev/null 2>&1
|
||||||
if [ ! -d "/usr/bin/" ]; then
|
if [ ! -d "/usr/bin/" ]; then
|
||||||
mkdir -p "/usr/bin/"
|
mkdir -p "/usr/bin/"
|
||||||
@@ -121,13 +119,31 @@ cleanup_epel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goecs_check() {
|
goecs_check() {
|
||||||
# Get system and architecture info with error handling
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
|
INSTALL_CMD="apt-get -y install"
|
||||||
|
elif command -v yum >/dev/null 2>&1; then
|
||||||
|
INSTALL_CMD="yum -y install"
|
||||||
|
elif command -v dnf >/dev/null 2>&1; then
|
||||||
|
INSTALL_CMD="dnf -y install"
|
||||||
|
elif command -v pacman >/dev/null 2>&1; then
|
||||||
|
INSTALL_CMD="pacman -S --noconfirm"
|
||||||
|
elif command -v apk >/dev/null 2>&1; then
|
||||||
|
INSTALL_CMD="apk add"
|
||||||
|
elif command -v zypper >/dev/null 2>&1; then
|
||||||
|
INSTALL_CMD="zypper install -y"
|
||||||
|
fi
|
||||||
|
if ! command -v unzip >/dev/null 2>&1; then
|
||||||
|
_green "Installing unzip"
|
||||||
|
${INSTALL_CMD} unzip
|
||||||
|
fi
|
||||||
|
if ! command -v curl >/dev/null 2>&1; then
|
||||||
|
_green "Installing curl"
|
||||||
|
${INSTALL_CMD} curl
|
||||||
|
fi
|
||||||
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")
|
||||||
# First check for China IP
|
|
||||||
check_china
|
check_china
|
||||||
# Get latest version number with multiple backup sources
|
ECS_VERSION="0.1.45"
|
||||||
ECS_VERSION=""
|
|
||||||
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" \
|
||||||
@@ -139,10 +155,9 @@ 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.27"
|
_yellow "Unable to get version info, using default version 0.1.45"
|
||||||
ECS_VERSION="0.1.27"
|
ECS_VERSION="0.1.45"
|
||||||
fi
|
fi
|
||||||
# Check if original goecs command exists
|
|
||||||
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
|
||||||
if [ -x "$(command -v $cmd_path 2>/dev/null)" ]; then
|
if [ -x "$(command -v $cmd_path 2>/dev/null)" ]; then
|
||||||
@@ -166,7 +181,6 @@ goecs_check() {
|
|||||||
_green "goecs not found, installation needed, starting in 5 seconds"
|
_green "goecs not found, installation needed, starting in 5 seconds"
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
# Download corresponding version with error handling
|
|
||||||
if [[ "$CN" == true ]]; then
|
if [[ "$CN" == true ]]; then
|
||||||
_yellow "Using China mirror for download..."
|
_yellow "Using China mirror for download..."
|
||||||
base_url="https://cnb.cool/oneclickvirt/ecs/-/git/raw/main"
|
base_url="https://cnb.cool/oneclickvirt/ecs/-/git/raw/main"
|
||||||
@@ -179,7 +193,6 @@ goecs_check() {
|
|||||||
base_url="https://github.com/oneclickvirt/ecs/releases/download/v${ECS_VERSION}"
|
base_url="https://github.com/oneclickvirt/ecs/releases/download/v${ECS_VERSION}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Build download URL with architecture support
|
|
||||||
local zip_file=""
|
local zip_file=""
|
||||||
case $os in
|
case $os in
|
||||||
Linux|linux|LINUX)
|
Linux|linux|LINUX)
|
||||||
@@ -217,7 +230,6 @@ goecs_check() {
|
|||||||
esac
|
esac
|
||||||
download_url="${base_url}/${zip_file}"
|
download_url="${base_url}/${zip_file}"
|
||||||
_green "Downloading $download_url"
|
_green "Downloading $download_url"
|
||||||
# Download file with retry mechanism
|
|
||||||
local max_retries=3
|
local max_retries=3
|
||||||
local retry_count=0
|
local retry_count=0
|
||||||
while [ $retry_count -lt $max_retries ]; do
|
while [ $retry_count -lt $max_retries ]; do
|
||||||
@@ -232,13 +244,11 @@ goecs_check() {
|
|||||||
_red "Download failed, please check your network connection or download manually"
|
_red "Download failed, please check your network connection or download manually"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
# Extract and install with error handling
|
|
||||||
if ! unzip -o goecs.zip >/dev/null 2>&1; then
|
if ! unzip -o goecs.zip >/dev/null 2>&1; then
|
||||||
_red "Extraction failed"
|
_red "Extraction failed"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
rm -f goecs.zip README.md LICENSE README_EN.md
|
rm -f goecs.zip README.md LICENSE README_EN.md
|
||||||
# Set execution permissions and install
|
|
||||||
chmod 777 goecs
|
chmod 777 goecs
|
||||||
for install_path in "/usr/bin" "/usr/local/bin"; do
|
for install_path in "/usr/bin" "/usr/local/bin"; do
|
||||||
if [ -d "$install_path" ]; then
|
if [ -d "$install_path" ]; then
|
||||||
@@ -246,7 +256,6 @@ goecs_check() {
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# Set system parameters
|
|
||||||
if [ "$os" != "Darwin" ]; then
|
if [ "$os" != "Darwin" ]; then
|
||||||
PARAM="net.ipv4.ping_group_range"
|
PARAM="net.ipv4.ping_group_range"
|
||||||
NEW_VALUE="0 2147483647"
|
NEW_VALUE="0 2147483647"
|
||||||
@@ -259,7 +268,6 @@ goecs_check() {
|
|||||||
sysctl -p >/dev/null 2>&1
|
sysctl -p >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Set special permissions
|
|
||||||
setcap cap_net_raw=+ep goecs 2>/dev/null
|
setcap cap_net_raw=+ep goecs 2>/dev/null
|
||||||
setcap cap_net_raw=+ep /usr/bin/goecs 2>/dev/null
|
setcap cap_net_raw=+ep /usr/bin/goecs 2>/dev/null
|
||||||
setcap cap_net_raw=+ep /usr/local/bin/goecs 2>/dev/null
|
setcap cap_net_raw=+ep /usr/local/bin/goecs 2>/dev/null
|
||||||
@@ -306,15 +314,15 @@ InstallSysbench() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
case "$Var_OSRelease" in
|
case "$Var_OSRelease" in
|
||||||
ubuntu | debian | astra)
|
ubuntu | debian | astra)
|
||||||
! apt-get install -y sysbench && apt-get --fix-broken install -y && apt-get install --no-install-recommends -y sysbench ;;
|
! apt-get install -y sysbench && apt-get --fix-broken install -y && apt-get install --no-install-recommends -y sysbench ;;
|
||||||
centos | rhel | almalinux | redhat | opencloudos)
|
centos | rhel | almalinux | redhat | opencloudos)
|
||||||
(yum -y install epel-release && yum -y install sysbench) || (dnf install epel-release -y && dnf install sysbench -y) ;;
|
(yum -y install epel-release && yum -y install sysbench) || (dnf install epel-release -y && dnf install sysbench -y) ;;
|
||||||
fedora)
|
fedora)
|
||||||
dnf -y install sysbench ;;
|
dnf -y install sysbench ;;
|
||||||
arch)
|
arch)
|
||||||
pacman -S --needed --noconfirm sysbench && pacman -S --needed --noconfirm libaio && ldconfig ;;
|
pacman -S --needed --noconfirm sysbench && pacman -S --needed --noconfirm libaio && ldconfig ;;
|
||||||
freebsd)
|
freebsd)
|
||||||
pkg install -y sysbench ;;
|
pkg install -y sysbench ;;
|
||||||
alpinelinux)
|
alpinelinux)
|
||||||
if [ "$noninteractive" != "true" ]; then
|
if [ "$noninteractive" != "true" ]; then
|
||||||
@@ -345,7 +353,7 @@ InstallSysbench() {
|
|||||||
echo -e "${Msg_Success}Sysbench installed successfully."
|
echo -e "${Msg_Success}Sysbench installed successfully."
|
||||||
fi
|
fi
|
||||||
fi ;;
|
fi ;;
|
||||||
*)
|
*)
|
||||||
_red "Sysbench Install Error: Unknown OS release: $Var_OSRelease" ;;
|
_red "Sysbench Install Error: Unknown OS release: $Var_OSRelease" ;;
|
||||||
esac
|
esac
|
||||||
if [[ $SYSTEM =~ ^(CentOS|RHEL|AlmaLinux)$ ]]; then
|
if [[ $SYSTEM =~ ^(CentOS|RHEL|AlmaLinux)$ ]]; then
|
||||||
@@ -428,7 +436,6 @@ env_check() {
|
|||||||
PACKAGE_INSTALL=("apt-get -y install" "apt-get -y install" "yum -y install" "yum -y install" "yum -y install" "pacman -Sy --noconfirm --needed" "pkg install -y" "apk add --no-cache" "pkg_add -I" "yum -y install")
|
PACKAGE_INSTALL=("apt-get -y install" "apt-get -y install" "yum -y install" "yum -y install" "yum -y install" "pacman -Sy --noconfirm --needed" "pkg install -y" "apk add --no-cache" "pkg_add -I" "yum -y install")
|
||||||
PACKAGE_REMOVE=("apt-get -y remove" "apt-get -y remove" "yum -y remove" "yum -y remove" "yum -y remove" "pacman -Rsc --noconfirm" "pkg delete" "apk del" "pkg_delete -I" "yum -y remove")
|
PACKAGE_REMOVE=("apt-get -y remove" "apt-get -y remove" "yum -y remove" "yum -y remove" "yum -y remove" "pacman -Rsc --noconfirm" "pkg delete" "apk del" "pkg_delete -I" "yum -y remove")
|
||||||
PACKAGE_UNINSTALL=("apt-get -y autoremove" "apt-get -y autoremove" "yum -y autoremove" "yum -y autoremove" "yum -y autoremove" "pacman -Rns --noconfirm" "pkg autoremove" "apk autoremove" "pkg_delete -a" "yum -y autoremove")
|
PACKAGE_UNINSTALL=("apt-get -y autoremove" "apt-get -y autoremove" "yum -y autoremove" "yum -y autoremove" "yum -y autoremove" "pacman -Rns --noconfirm" "pkg autoremove" "apk autoremove" "pkg_delete -a" "yum -y autoremove")
|
||||||
# Check system information
|
|
||||||
if [ -f /etc/opencloudos-release ]; then
|
if [ -f /etc/opencloudos-release ]; then
|
||||||
SYS="opencloudos"
|
SYS="opencloudos"
|
||||||
elif [ -s /etc/os-release ]; then
|
elif [ -s /etc/os-release ]; then
|
||||||
@@ -446,7 +453,6 @@ env_check() {
|
|||||||
else
|
else
|
||||||
SYS="$(uname -s)"
|
SYS="$(uname -s)"
|
||||||
fi
|
fi
|
||||||
# Match operating system
|
|
||||||
SYSTEM=""
|
SYSTEM=""
|
||||||
for ((int = 0; int < ${#REGEX[@]}; int++)); do
|
for ((int = 0; int < ${#REGEX[@]}; int++)); do
|
||||||
if [[ $(echo "$SYS" | tr '[:upper:]' '[:lower:]') =~ ${REGEX[int]} ]]; then
|
if [[ $(echo "$SYS" | tr '[:upper:]' '[:lower:]') =~ ${REGEX[int]} ]]; then
|
||||||
@@ -458,38 +464,32 @@ env_check() {
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# If system is unrecognized, try common package managers
|
|
||||||
if [ -z "$SYSTEM" ]; then
|
if [ -z "$SYSTEM" ]; then
|
||||||
_yellow "Unable to recognize system, trying common package managers..."
|
_yellow "Unable to recognize system, trying common package managers..."
|
||||||
# Try apt
|
|
||||||
if command -v apt-get >/dev/null 2>&1; then
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
SYSTEM="Unknown-Debian"
|
SYSTEM="Unknown-Debian"
|
||||||
UPDATE_CMD="apt-get update"
|
UPDATE_CMD="apt-get update"
|
||||||
INSTALL_CMD="apt-get -y install"
|
INSTALL_CMD="apt-get -y install"
|
||||||
REMOVE_CMD="apt-get -y remove"
|
REMOVE_CMD="apt-get -y remove"
|
||||||
UNINSTALL_CMD="apt-get -y autoremove"
|
UNINSTALL_CMD="apt-get -y autoremove"
|
||||||
# Try yum
|
|
||||||
elif command -v yum >/dev/null 2>&1; then
|
elif command -v yum >/dev/null 2>&1; then
|
||||||
SYSTEM="Unknown-RHEL"
|
SYSTEM="Unknown-RHEL"
|
||||||
UPDATE_CMD="yum -y update"
|
UPDATE_CMD="yum -y update"
|
||||||
INSTALL_CMD="yum -y install"
|
INSTALL_CMD="yum -y install"
|
||||||
REMOVE_CMD="yum -y remove"
|
REMOVE_CMD="yum -y remove"
|
||||||
UNINSTALL_CMD="yum -y autoremove"
|
UNINSTALL_CMD="yum -y autoremove"
|
||||||
# Try dnf
|
|
||||||
elif command -v dnf >/dev/null 2>&1; then
|
elif command -v dnf >/dev/null 2>&1; then
|
||||||
SYSTEM="Unknown-Fedora"
|
SYSTEM="Unknown-Fedora"
|
||||||
UPDATE_CMD="dnf -y update"
|
UPDATE_CMD="dnf -y update"
|
||||||
INSTALL_CMD="dnf -y install"
|
INSTALL_CMD="dnf -y install"
|
||||||
REMOVE_CMD="dnf -y remove"
|
REMOVE_CMD="dnf -y remove"
|
||||||
UNINSTALL_CMD="dnf -y autoremove"
|
UNINSTALL_CMD="dnf -y autoremove"
|
||||||
# Try pacman
|
|
||||||
elif command -v pacman >/dev/null 2>&1; then
|
elif command -v pacman >/dev/null 2>&1; then
|
||||||
SYSTEM="Unknown-Arch"
|
SYSTEM="Unknown-Arch"
|
||||||
UPDATE_CMD="pacman -Sy"
|
UPDATE_CMD="pacman -Sy"
|
||||||
INSTALL_CMD="pacman -S --noconfirm"
|
INSTALL_CMD="pacman -S --noconfirm"
|
||||||
REMOVE_CMD="pacman -R --noconfirm"
|
REMOVE_CMD="pacman -R --noconfirm"
|
||||||
UNINSTALL_CMD="pacman -Rns --noconfirm"
|
UNINSTALL_CMD="pacman -Rns --noconfirm"
|
||||||
# Try apk
|
|
||||||
elif command -v apk >/dev/null 2>&1; then
|
elif command -v apk >/dev/null 2>&1; then
|
||||||
SYSTEM="Unknown-Alpine"
|
SYSTEM="Unknown-Alpine"
|
||||||
UPDATE_CMD="apk update"
|
UPDATE_CMD="apk update"
|
||||||
@@ -530,14 +530,12 @@ env_check() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Install necessary commands
|
|
||||||
for cmd in sudo wget tar unzip iproute2 systemd-detect-virt dd fio; do
|
for cmd in sudo wget tar unzip iproute2 systemd-detect-virt dd fio; do
|
||||||
if ! command -v "$cmd" >/dev/null 2>&1; then
|
if ! command -v "$cmd" >/dev/null 2>&1; then
|
||||||
_green "Installing $cmd"
|
_green "Installing $cmd"
|
||||||
${INSTALL_CMD} "$cmd"
|
${INSTALL_CMD} "$cmd"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# sysbench installation
|
|
||||||
if ! command -v sysbench >/dev/null 2>&1; then
|
if ! command -v sysbench >/dev/null 2>&1; then
|
||||||
_green "Installing sysbench"
|
_green "Installing sysbench"
|
||||||
${INSTALL_CMD} sysbench
|
${INSTALL_CMD} sysbench
|
||||||
@@ -552,7 +550,6 @@ env_check() {
|
|||||||
Check_SysBench
|
Check_SysBench
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# geekbench and speedtest installation
|
|
||||||
if ! command -v geekbench >/dev/null 2>&1; then
|
if ! command -v geekbench >/dev/null 2>&1; then
|
||||||
_green "Installing geekbench"
|
_green "Installing geekbench"
|
||||||
curl -L "${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/cputest/main/dgb.sh" -o dgb.sh && chmod +x dgb.sh
|
curl -L "${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/cputest/main/dgb.sh" -o dgb.sh && chmod +x dgb.sh
|
||||||
@@ -571,7 +568,6 @@ env_check() {
|
|||||||
${INSTALL_CMD} iputils-ping >/dev/null 2>&1
|
${INSTALL_CMD} iputils-ping >/dev/null 2>&1
|
||||||
${INSTALL_CMD} ping >/dev/null 2>&1
|
${INSTALL_CMD} ping >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
# MacOS support
|
|
||||||
if [ "$(uname -s)" = "Darwin" ]; then
|
if [ "$(uname -s)" = "Darwin" ]; then
|
||||||
echo "Detected MacOS, installing sysbench iproute2mac..."
|
echo "Detected MacOS, installing sysbench iproute2mac..."
|
||||||
brew install --force sysbench iproute2mac
|
brew install --force sysbench iproute2mac
|
||||||
@@ -607,7 +603,7 @@ show_help() {
|
|||||||
3. 关键服务失败
|
3. 关键服务失败
|
||||||
推荐:
|
推荐:
|
||||||
环境依赖安装过程中挂起执行
|
环境依赖安装过程中挂起执行
|
||||||
|
|
||||||
可选组件:
|
可选组件:
|
||||||
sysbench/geekbench (CPU性能测试)
|
sysbench/geekbench (CPU性能测试)
|
||||||
sudo, tar, unzip, dd, fio
|
sudo, tar, unzip, dd, fio
|
||||||
@@ -634,7 +630,7 @@ Available commands:
|
|||||||
3. Critical service failures
|
3. Critical service failures
|
||||||
Recommended:
|
Recommended:
|
||||||
Hanging execution during environment dependency installation
|
Hanging execution during environment dependency installation
|
||||||
|
|
||||||
Optional components:
|
Optional components:
|
||||||
sysbench/geekbench (CPU testing)
|
sysbench/geekbench (CPU testing)
|
||||||
sudo, tar, unzip, dd, fio
|
sudo, tar, unzip, dd, fio
|
||||||
@@ -668,4 +664,3 @@ case "$1" in
|
|||||||
show_help
|
show_help
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@@ -31,5 +31,5 @@ func MemoryTest(language, testMethod string) {
|
|||||||
if !strings.Contains(res, "\n") && res != "" {
|
if !strings.Contains(res, "\n") && res != "" {
|
||||||
res += "\n"
|
res += "\n"
|
||||||
}
|
}
|
||||||
fmt.Printf(res)
|
fmt.Printf("%s", res)
|
||||||
}
|
}
|
||||||
|
@@ -6,5 +6,5 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Test(t *testing.T) {
|
func Test(t *testing.T) {
|
||||||
fmt.Printf(MediaTest("zh"))
|
fmt.Printf("%s", MediaTest("zh"))
|
||||||
}
|
}
|
||||||
|
174
utils/utils.go
174
utils/utils.go
@@ -3,13 +3,11 @@ package utils
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/imroc/req/v3"
|
|
||||||
"github.com/oneclickvirt/UnlockTests/uts"
|
|
||||||
"github.com/oneclickvirt/basics/system"
|
|
||||||
. "github.com/oneclickvirt/defaultset"
|
|
||||||
"github.com/oneclickvirt/security/network"
|
|
||||||
"io"
|
"io"
|
||||||
|
"net"
|
||||||
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
@@ -17,6 +15,12 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
|
"github.com/imroc/req/v3"
|
||||||
|
"github.com/oneclickvirt/UnlockTests/uts"
|
||||||
|
"github.com/oneclickvirt/basics/system"
|
||||||
|
. "github.com/oneclickvirt/defaultset"
|
||||||
|
"github.com/oneclickvirt/security/network"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PrintCenteredTitle 根据指定的宽度打印居中标题
|
// PrintCenteredTitle 根据指定的宽度打印居中标题
|
||||||
@@ -95,14 +99,14 @@ func CheckChina(enableLogger bool) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BasicsAndSecurityCheck 执行安全检查
|
// BasicsAndSecurityCheck 执行安全检查
|
||||||
func BasicsAndSecurityCheck(language, nt3CheckType string, securtyCheckStatus bool) (string, string, string) {
|
func BasicsAndSecurityCheck(language, nt3CheckType string, securityCheckStatus bool) (string, string, string) {
|
||||||
var wgt sync.WaitGroup
|
var wgt sync.WaitGroup
|
||||||
var ipInfo, securityInfo, systemInfo string
|
var ipInfo, securityInfo, systemInfo string
|
||||||
var err error
|
var err error
|
||||||
wgt.Add(1)
|
wgt.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer wgt.Done()
|
defer wgt.Done()
|
||||||
ipInfo, securityInfo, err = network.NetworkCheck("both", securtyCheckStatus, language)
|
ipInfo, securityInfo, err = network.NetworkCheck("both", securityCheckStatus, language)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err.Error())
|
fmt.Println(err.Error())
|
||||||
}
|
}
|
||||||
@@ -330,3 +334,159 @@ func ProcessAndUpload(output string, filePath string, enableUplaod bool) (string
|
|||||||
}
|
}
|
||||||
return "", ""
|
return "", ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ============================= 前置联网能力检测 =============================
|
||||||
|
|
||||||
|
var StackType string
|
||||||
|
|
||||||
|
type NetCheckResult struct {
|
||||||
|
HasIPv4 bool
|
||||||
|
HasIPv6 bool
|
||||||
|
Connected bool
|
||||||
|
StackType string // "IPv4", "IPv6", "DualStack", "None"
|
||||||
|
}
|
||||||
|
|
||||||
|
func makeResolver(proto, dnsAddr string) *net.Resolver {
|
||||||
|
return &net.Resolver{
|
||||||
|
PreferGo: true,
|
||||||
|
Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
|
||||||
|
d := net.Dialer{
|
||||||
|
Timeout: 5 * time.Second,
|
||||||
|
}
|
||||||
|
return d.DialContext(ctx, proto, dnsAddr)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func CheckPublicAccess(timeout time.Duration) NetCheckResult {
|
||||||
|
if timeout < 2*time.Second {
|
||||||
|
timeout = 2 * time.Second
|
||||||
|
}
|
||||||
|
var wg sync.WaitGroup
|
||||||
|
resultChan := make(chan string, 8)
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||||
|
defer cancel()
|
||||||
|
checks := []struct {
|
||||||
|
Tag string
|
||||||
|
Addr string
|
||||||
|
Kind string // udp4, udp6, http4, http6
|
||||||
|
}{
|
||||||
|
// UDP DNS
|
||||||
|
{"IPv4", "223.5.5.5:53", "udp4"}, // 阿里 DNS
|
||||||
|
{"IPv4", "8.8.8.8:53", "udp4"}, // Google DNS
|
||||||
|
{"IPv6", "[2400:3200::1]:53", "udp6"}, // 阿里 IPv6 DNS
|
||||||
|
{"IPv6", "[2001:4860:4860::8888]:53", "udp6"}, // Google IPv6 DNS
|
||||||
|
// HTTP HEAD
|
||||||
|
{"IPv4", "https://www.baidu.com", "http4"}, // 百度
|
||||||
|
{"IPv4", "https://1.1.1.1", "http4"}, // Cloudflare
|
||||||
|
{"IPv6", "https://[2400:3200::1]", "http6"}, // 阿里 IPv6
|
||||||
|
{"IPv6", "https://[2606:4700::1111]", "http6"}, // Cloudflare IPv6
|
||||||
|
}
|
||||||
|
for _, check := range checks {
|
||||||
|
wg.Add(1)
|
||||||
|
go func(tag, addr, kind string) {
|
||||||
|
defer wg.Done()
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
switch kind {
|
||||||
|
case "udp4", "udp6":
|
||||||
|
dialer := &net.Dialer{
|
||||||
|
Timeout: timeout / 4,
|
||||||
|
}
|
||||||
|
conn, err := dialer.DialContext(ctx, kind, addr)
|
||||||
|
if err == nil && conn != nil {
|
||||||
|
conn.Close()
|
||||||
|
select {
|
||||||
|
case resultChan <- tag:
|
||||||
|
case <-ctx.Done():
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case "http4", "http6":
|
||||||
|
var resolver *net.Resolver
|
||||||
|
if kind == "http4" {
|
||||||
|
resolver = makeResolver("udp4", "223.5.5.5:53")
|
||||||
|
} else {
|
||||||
|
resolver = makeResolver("udp6", "[2400:3200::1]:53")
|
||||||
|
}
|
||||||
|
dialer := &net.Dialer{
|
||||||
|
Timeout: timeout / 4,
|
||||||
|
Resolver: resolver,
|
||||||
|
}
|
||||||
|
transport := &http.Transport{
|
||||||
|
DialContext: dialer.DialContext,
|
||||||
|
MaxIdleConns: 1,
|
||||||
|
MaxIdleConnsPerHost: 1,
|
||||||
|
IdleConnTimeout: time.Second,
|
||||||
|
TLSHandshakeTimeout: timeout / 4,
|
||||||
|
ResponseHeaderTimeout: timeout / 4,
|
||||||
|
DisableKeepAlives: true,
|
||||||
|
}
|
||||||
|
client := &http.Client{
|
||||||
|
Timeout: timeout / 4,
|
||||||
|
Transport: transport,
|
||||||
|
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
||||||
|
return http.ErrUseLastResponse
|
||||||
|
},
|
||||||
|
}
|
||||||
|
req, err := http.NewRequestWithContext(ctx, "HEAD", addr, nil)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := client.Do(req)
|
||||||
|
if err == nil && resp != nil {
|
||||||
|
if resp.Body != nil {
|
||||||
|
resp.Body.Close()
|
||||||
|
}
|
||||||
|
if resp.StatusCode < 500 {
|
||||||
|
select {
|
||||||
|
case resultChan <- tag:
|
||||||
|
case <-ctx.Done():
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}(check.Tag, check.Addr, check.Kind)
|
||||||
|
}
|
||||||
|
go func() {
|
||||||
|
wg.Wait()
|
||||||
|
close(resultChan)
|
||||||
|
}()
|
||||||
|
hasV4 := false
|
||||||
|
hasV6 := false
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case res, ok := <-resultChan:
|
||||||
|
if !ok {
|
||||||
|
goto result
|
||||||
|
}
|
||||||
|
if res == "IPv4" {
|
||||||
|
hasV4 = true
|
||||||
|
}
|
||||||
|
if res == "IPv6" {
|
||||||
|
hasV6 = true
|
||||||
|
}
|
||||||
|
case <-ctx.Done():
|
||||||
|
goto result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result:
|
||||||
|
stack := "None"
|
||||||
|
if hasV4 && hasV6 {
|
||||||
|
stack = "DualStack"
|
||||||
|
} else if hasV4 {
|
||||||
|
stack = "IPv4"
|
||||||
|
} else if hasV6 {
|
||||||
|
stack = "IPv6"
|
||||||
|
}
|
||||||
|
StackType = stack
|
||||||
|
return NetCheckResult{
|
||||||
|
HasIPv4: hasV4,
|
||||||
|
HasIPv6: hasV6,
|
||||||
|
Connected: hasV4 || hasV6,
|
||||||
|
StackType: stack,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
17
utils/utils_test.go
Normal file
17
utils/utils_test.go
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestCheckPublicAccess(t *testing.T) {
|
||||||
|
timeout := 3 * time.Second
|
||||||
|
result := CheckPublicAccess(timeout)
|
||||||
|
if result.Connected {
|
||||||
|
fmt.Printf("✅ 本机有公网连接,类型: %s\n", result.StackType)
|
||||||
|
} else {
|
||||||
|
fmt.Println("❌ 本机未检测到公网连接")
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user