Compare commits

...

9 Commits

12 changed files with 93 additions and 66 deletions

View File

@@ -4,7 +4,9 @@
[![Hits](https://hits.spiritlhl.net/goecs.svg?action=hit&title=Hits&title_bg=%23555555&count_bg=%230eecf8&edge_flat=false)](https://hits.spiritlhl.net) [![Hits](https://hits.spiritlhl.net/goecs.svg?action=hit&title=Hits&title_bg=%23555555&count_bg=%230eecf8&edge_flat=false)](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,11 +26,11 @@ 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 | | |
@@ -357,7 +359,7 @@ 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进行检测感谢互联网各网站提供的查询资源
感谢 感谢

View File

@@ -4,7 +4,9 @@
[![Hits](https://hits.spiritlhl.net/goecs.svg?action=hit&title=Hits&title_bg=%23555555&count_bg=%230eecf8&edge_flat=false)](https://hits.spiritlhl.net) [![Hits](https://hits.spiritlhl.net/goecs.svg?action=hit&title=Hits&title_bg=%23555555&count_bg=%230eecf8&edge_flat=false)](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 | | |
@@ -355,7 +357,7 @@ 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

View File

@@ -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)
} }

View File

@@ -15,6 +15,7 @@ import (
// } // }
//} //}
// 本包仅测试,无实际使用
func TestBackTrace(t *testing.T) { func TestBackTrace(t *testing.T) {
BackTrace() BackTrace(false)
} }

View File

@@ -4,6 +4,7 @@ import (
"testing" "testing"
) )
// 本包仅测试无实际使用
func TestMedia(t *testing.T) { func TestMedia(t *testing.T) {
ComMediaTest("zh") ComMediaTest("zh")
} }

View File

@@ -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")
} }

14
go.mod
View File

@@ -3,18 +3,18 @@ module github.com/oneclickvirt/ecs
go 1.23.4 go 1.23.4
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.26-20250329125926
github.com/oneclickvirt/backtrace v0.0.4-20250329130043 github.com/oneclickvirt/backtrace v0.0.5-20250413040820
github.com/oneclickvirt/basics v0.0.11-20250404123515 github.com/oneclickvirt/basics v0.0.11-20250404123515
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.7-20250406062845
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.5-20250406063420
github.com/oneclickvirt/nt3 v0.0.4-20250329125813 github.com/oneclickvirt/nt3 v0.0.4-20250329125813
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-20250401123241
github.com/oneclickvirt/speedtest v0.0.9-20250329130205 github.com/oneclickvirt/speedtest v0.0.9-20250329130205
@@ -61,8 +61,8 @@ require (
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.3.7 // indirect
github.com/oneclickvirt/dd v0.0.1-20250404124549 // indirect github.com/oneclickvirt/dd v0.0.1-20250406062523 // indirect
github.com/oneclickvirt/fio v0.0.1-20250404141714 // indirect github.com/oneclickvirt/fio v0.0.1-20250406060851 // 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.3 // indirect

28
go.sum
View File

@@ -50,8 +50,8 @@ 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/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=
@@ -105,28 +105,28 @@ github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841 h1:Zef93z9UiZQwRA
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.26-20250329125926 h1:H5//xwVjDR02bQ1hLa3G7LnwccsudPMjBVt7WCx2y/U=
github.com/oneclickvirt/UnlockTests v0.0.26-20250329125926/go.mod h1:yXWIZB6iLS88pEd9m4QJi1GENn+7I91zA72y5ONz2Oc= github.com/oneclickvirt/UnlockTests v0.0.26-20250329125926/go.mod h1:yXWIZB6iLS88pEd9m4QJi1GENn+7I91zA72y5ONz2Oc=
github.com/oneclickvirt/backtrace v0.0.4-20250329130043 h1:d3ubN7FTY2xDKN8mmLc1RbvccpTkvfMADtMBvFCRdt0= github.com/oneclickvirt/backtrace v0.0.5-20250413040820 h1:kaAlk3A3IQOz9tuzc3H1ABIvAZnv81L1Ave5PaMuELY=
github.com/oneclickvirt/backtrace v0.0.4-20250329130043/go.mod h1:zvsC7xY/WZqs5KL2JB967OVnuqjNbxu9bW6wXRLo5h8= github.com/oneclickvirt/backtrace v0.0.5-20250413040820/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.11-20250404123515 h1:2kisK9tBG/Km/HLQFA82lm/B+AWFJp3drjrtGvz8lhw=
github.com/oneclickvirt/basics v0.0.11-20250404123515/go.mod h1:yN1IEOXN6v/GJqJSA70Pooo6nXBI/6rq72vTY72wJMQ= github.com/oneclickvirt/basics v0.0.11-20250404123515/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.1-20250406062523 h1:jegTww4fuoFEqwFozvGJEqUNI/5ew3QJ0XcKZZ/zuTs=
github.com/oneclickvirt/dd v0.0.1-20250404124549/go.mod h1:tImu9sPTkLWo2tf1dEN1xQzrylWKauj9hbU8PHfyAeU= github.com/oneclickvirt/dd v0.0.1-20250406062523/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.7-20250406062845 h1:2UAn1TYdRs6IXAqRhsf3WSd2yuVfV481a48B3d7Yz2o=
github.com/oneclickvirt/disktest v0.0.7-20250404150324/go.mod h1:LXhRiAYYW0poUMqvUHzgqNqhVnJPj4cxjSA8zTKszbI= github.com/oneclickvirt/disktest v0.0.7-20250406062845/go.mod h1:sqVu6HwbnLmbnRj4389Xn08c301IhLnWCcbaEk2WzEc=
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/memorytest v0.0.5-20250406063420 h1:eHqpqFIx8Ss062uyNf7Ruv7FC4AdZbElR7u9vX2Oj3g=
github.com/oneclickvirt/memorytest v0.0.5-20250404130028/go.mod h1:qp5uRoSv5lcpUtUqQuFCer4xaZKz9S8UxL+pZopn540= github.com/oneclickvirt/memorytest v0.0.5-20250406063420/go.mod h1:HTd0sSxRjT4BcV8kcCh4fF2Nia0xgZNaVjhefsnypic=
github.com/oneclickvirt/nt3 v0.0.4-20250329125813 h1:ZK5DAz8GUa6oyRE/cWmUKkE02tfgDah4TXvN181em7c= github.com/oneclickvirt/nt3 v0.0.4-20250329125813 h1:ZK5DAz8GUa6oyRE/cWmUKkE02tfgDah4TXvN181em7c=
github.com/oneclickvirt/nt3 v0.0.4-20250329125813/go.mod h1:lDpHmjWwLZd6pO8cZCwzrc5rwd8dK+TIYk+DGmRpSGg= github.com/oneclickvirt/nt3 v0.0.4-20250329125813/go.mod h1:lDpHmjWwLZd6pO8cZCwzrc5rwd8dK+TIYk+DGmRpSGg=
github.com/oneclickvirt/pingtest v0.0.6-20250329130728 h1:XYMfpIj32Wuej5G7f7/NB5/i3I9DMX/mF3ZS8N5KKp8= github.com/oneclickvirt/pingtest v0.0.7-20250413051539 h1:mYOsEmMtwKr40hwM2NimVLpnbR2cjwuOh1c/9fQr2Dw=
github.com/oneclickvirt/pingtest v0.0.6-20250329130728/go.mod h1:d3Ntx5m9lMll3a/k3+2B+5emj//vgDh4/NHTxs2qQE8= 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-20250401123241 h1:myeAQ1wOKIHx5r9qs9dCwx/5FepY+hZu/fDNquMwKaw=

View File

@@ -7,22 +7,21 @@ import (
"fmt" "fmt"
"github.com/oneclickvirt/CommonMediaTests/commediatests" "github.com/oneclickvirt/CommonMediaTests/commediatests"
unlocktestmodel "github.com/oneclickvirt/UnlockTests/model" unlocktestmodel "github.com/oneclickvirt/UnlockTests/model"
backtraceori "github.com/oneclickvirt/backtrace/bk" "github.com/oneclickvirt/backtrace/bk"
backtracemodel "github.com/oneclickvirt/backtrace/model"
basicmodel "github.com/oneclickvirt/basics/model" basicmodel "github.com/oneclickvirt/basics/model"
cputestmodel "github.com/oneclickvirt/cputest/model" cputestmodel "github.com/oneclickvirt/cputest/model"
disktestmodel "github.com/oneclickvirt/disktest/disk" disktestmodel "github.com/oneclickvirt/disktest/disk"
"github.com/oneclickvirt/ecs/backtrace"
"github.com/oneclickvirt/ecs/commediatest"
"github.com/oneclickvirt/ecs/cputest" "github.com/oneclickvirt/ecs/cputest"
"github.com/oneclickvirt/ecs/disktest" "github.com/oneclickvirt/ecs/disktest"
"github.com/oneclickvirt/ecs/memorytest" "github.com/oneclickvirt/ecs/memorytest"
"github.com/oneclickvirt/ecs/ntrace"
"github.com/oneclickvirt/ecs/speedtest" "github.com/oneclickvirt/ecs/speedtest"
"github.com/oneclickvirt/ecs/unlocktest" "github.com/oneclickvirt/ecs/unlocktest"
"github.com/oneclickvirt/ecs/utils" "github.com/oneclickvirt/ecs/utils"
gostunmodel "github.com/oneclickvirt/gostun/model" gostunmodel "github.com/oneclickvirt/gostun/model"
memorytestmodel "github.com/oneclickvirt/memorytest/memory" memorytestmodel "github.com/oneclickvirt/memorytest/memory"
nt3model "github.com/oneclickvirt/nt3/model" nt3model "github.com/oneclickvirt/nt3/model"
"github.com/oneclickvirt/nt3/nt"
ptmodel "github.com/oneclickvirt/pingtest/model" ptmodel "github.com/oneclickvirt/pingtest/model"
"github.com/oneclickvirt/pingtest/pt" "github.com/oneclickvirt/pingtest/pt"
"github.com/oneclickvirt/portchecker/email" "github.com/oneclickvirt/portchecker/email"
@@ -39,7 +38,7 @@ import (
) )
var ( var (
ecsVersion = "v0.1.27" ecsVersion = "v0.1.31"
menuMode bool menuMode bool
onlyChinaTest bool onlyChinaTest bool
input, choice string input, choice string
@@ -168,7 +167,7 @@ func main() {
commediatests.EnableLoger = true commediatests.EnableLoger = true
unlocktestmodel.EnableLoger = true unlocktestmodel.EnableLoger = true
ptmodel.EnableLoger = true ptmodel.EnableLoger = true
backtraceori.EnableLoger = true backtracemodel.EnableLoger = true
nt3model.EnableLoger = true nt3model.EnableLoger = true
speedtestmodel.EnableLoger = true speedtestmodel.EnableLoger = true
} }
@@ -358,9 +357,17 @@ func main() {
} }
// 给打印操作一些时间完成 // 给打印操作一些时间完成
time.Sleep(100 * time.Millisecond) time.Sleep(100 * time.Millisecond)
if runtime.GOOS == "windows" || runtime.GOOS == "darwin" {
fmt.Println("Press Enter to exit...")
fmt.Scanln()
}
os.Exit(0) os.Exit(0)
case <-time.After(30 * time.Second): case <-time.After(30 * time.Second):
fmt.Println("上传超时,程序退出") fmt.Println("上传超时,程序退出")
if runtime.GOOS == "windows" || runtime.GOOS == "darwin" {
fmt.Println("Press Enter to exit...")
fmt.Scanln()
}
os.Exit(1) os.Exit(1)
} }
} }
@@ -436,7 +443,7 @@ func main() {
output = utils.PrintAndCapture(func() { output = utils.PrintAndCapture(func() {
if commTestStatus && !onlyChinaTest { if commTestStatus && !onlyChinaTest {
utils.PrintCenteredTitle("御三家流媒体解锁", width) utils.PrintCenteredTitle("御三家流媒体解锁", width)
commediatest.ComMediaTest(language) fmt.Printf(commediatests.MediaTests(language))
} }
}, tempOutput, output) }, tempOutput, output)
output = utils.PrintAndCapture(func() { output = utils.PrintAndCapture(func() {
@@ -463,14 +470,18 @@ func main() {
output = utils.PrintAndCapture(func() { output = utils.PrintAndCapture(func() {
if backtraceStatus && !onlyChinaTest { if backtraceStatus && !onlyChinaTest {
utils.PrintCenteredTitle("三网回程线路检测", width) utils.PrintCenteredTitle("三网回程线路检测", width)
backtrace.BackTrace() if strings.Contains(output, "IPV6") {
backtrace.BackTrace(true)
} else {
backtrace.BackTrace(false)
}
} }
}, tempOutput, output) }, tempOutput, output)
// nexttrace 在win上不支持检测报错 bind: An invalid argument was supplied. // nexttrace 在win上不支持检测报错 bind: An invalid argument was supplied.
output = utils.PrintAndCapture(func() { output = utils.PrintAndCapture(func() {
if nt3Status && !onlyChinaTest { if nt3Status && !onlyChinaTest {
utils.PrintCenteredTitle("三网回程路由检测", width) utils.PrintCenteredTitle("三网回程路由检测", width)
ntrace.TraceRoute3(language, nt3Location, nt3CheckType) nt.TraceRoute(language, nt3Location, nt3CheckType)
} }
}, tempOutput, output) }, tempOutput, output)
output = utils.PrintAndCapture(func() { output = utils.PrintAndCapture(func() {

View File

@@ -1,23 +1,21 @@
#!/bin/bash #!/bin/bash
# From https://github.com/oneclickvirt/ecs # From https://github.com/oneclickvirt/ecs
# 2025.04.02 # 2025.04.07
# 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/"
@@ -139,8 +137,8 @@ goecs_check() {
sleep 1 sleep 1
done done
if [ -z "$ECS_VERSION" ]; then if [ -z "$ECS_VERSION" ]; then
_yellow "Unable to get version info, using default version 0.1.27" _yellow "Unable to get version info, using default version 0.1.31"
ECS_VERSION="0.1.27" ECS_VERSION="0.1.31"
fi fi
# Check if original goecs command exists # Check if original goecs command exists
version_output="" version_output=""
@@ -232,7 +230,23 @@ 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 ! command -v unzip >/dev/null 2>&1; then
_green "Installing $cmd"
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
${INSTALL_CMD} "$cmd"
fi
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
@@ -461,35 +475,30 @@ env_check() {
# If system is unrecognized, try common package managers # 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"