Compare commits

...

7 Commits

12 changed files with 226 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
package network1
import "github.com/oneclickvirt/security/network"
import "github.com/oneclickvirt/basics/network"
// 本包在main中不使用
func NetworkCheck(checkType string, enableSecurityCheck bool, language string) (string, string, error) {

View File

@@ -47,15 +47,14 @@ Shell 版本:[https://github.com/spiritLHLS/ecs](https://github.com/spiritLHLS
|----------------|---------------------------|
| Android(arm64) | 存在权限问题未修复非安卓系统的ARM架构无问题 |
| OpenBSD/NetBSD | 部分Goalng的官方库未支持本系统(尤其是net相关项目) |
| Windows虚拟机 | 无Admin权限的mbw测试性能不准确(内存测试) |
| Windows物理机(非Admin下) | 无Admin权限的mbw测试性能不准确(内存测试) |
---
## **功能**
- 系统基础信息查询IP基础信息并发查询[basics](https://github.com/oneclickvirt/basics)、[gostun](https://github.com/oneclickvirt/gostun)
- CPU 测试:[cputest](https://github.com/oneclickvirt/cputest),支持 sysbench(lua/golang版本)、geekbench、winsat
- 内存测试:[memorytest](https://github.com/oneclickvirt/memorytest),支持 sysbench、dd
- 内存测试:[memorytest](https://github.com/oneclickvirt/memorytest),支持 sysbench、dd、winsat、mbw、stream
- 硬盘测试:[disktest](https://github.com/oneclickvirt/disktest),支持 dd、fio、winsat
- 流媒体解锁信息并发查询:[netflix-verify](https://github.com/sjlleo/netflix-verify) 等逻辑,开发至 [CommonMediaTests](https://github.com/oneclickvirt/CommonMediaTests)
- 常见流媒体测试并发查询:[UnlockTests](https://github.com/oneclickvirt/UnlockTests),逻辑借鉴 [RegionRestrictionCheck](https://github.com/lmc999/RegionRestrictionCheck) 等

View File

@@ -47,8 +47,6 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
|--------|-------------------------------------------------------------------------------------------------|
| Android(arm64) | Permission issues that are not fixed, no problems with ARM architecture for non-Android systems |
| OpenBSD/NetBSD | Some of Goalng's official libraries do not support this system (especially net-related items) |
| Windows(Virtual Machines) | Inaccurate mbw test performance without Admin rights (memory tests) |
| Windows(Physical Machines)(not under Admin) | Inaccurate mbw test performance without Admin rights (memory tests) |
---
@@ -56,7 +54,7 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
- System basic information query and concurrent IP basic information query: Self-developed [basics](https://github.com/oneclickvirt/basics), [gostun](https://github.com/oneclickvirt/gostun)
- CPU test: Self-developed [cputest](https://github.com/oneclickvirt/cputest) supporting sysbench(lua/golang version), geekbench, winsat
- Memory test: Self-developed [memorytest](https://github.com/oneclickvirt/memorytest) supporting sysbench, dd
- Memory test: Self-developed [memorytest](https://github.com/oneclickvirt/memorytest) supporting sysbench, dd, winsat, mbw, stream
- Disk test: Self-developed [disktest](https://github.com/oneclickvirt/disktest) supporting dd, fio, winsat
- Streaming media unlock information concurrent query: Modified from [netflix-verify](https://github.com/sjlleo/netflix-verify) and more to [CommonMediaTests](https://github.com/oneclickvirt/CommonMediaTests)
- Common streaming media tests concurrent query: Self-developed to [UnlockTests](https://github.com/oneclickvirt/UnlockTests), logic modified from [RegionRestrictionCheck](https://github.com/lmc999/RegionRestrictionCheck) and others

View File

@@ -136,7 +136,8 @@ AMD的7950x单核满血性能得分在6500左右AMD的5950x单核满血性能
依赖项目:[https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest)
一般来说,只需要判断 IO 速度是否低于 `10240 MB/s (≈10 GB/s)`
一般来说,只需要判断 IO 速度是否低于 `10240 MB/s (≈10 GB/s)`
如果低于这个值,那么证明内存性能不佳,极大概率存在超售超卖问题。
至于超开的原因可能是:
@@ -160,6 +161,16 @@ AMD的7950x单核满血性能得分在6500左右AMD的5950x单核满血性能
* **20 \~ 40 GB/s (20480 \~ 40960 MB/s)** → 大概率 DDR4
* **≈ 50 GB/s (≈ 51200 MB/s)** → 基本就是 DDR5
对于各种测试参数对应方法的比较:
| 参数方法 | 测试准确性 | 测试速度 | 适应架构 | 依赖情况 |
|------------|------------|----------|----------|----------|----------|
| **stream** | 高 —— 结果稳定,更符合实际情况 | 快速 | 跨平台Linux/Windows/Unix | 自带依赖无需额外安装 |
| **sysbench** | 高 —— 可测试 CPU、内存、IO、线程等结果较可靠 | 中等 | 跨平台Linux、Windows 部分支持) | 需环境额外安装 |
| **winsat** | 中等偏高 —— Windows 内置工具,结果和环境相关 | 中等 | 仅限 Windows | 物理机器上自带,虚拟机不可用 |
| **mbw** | 中等 —— 结果可能受缓存/调度影响 | 非常快 | 跨平台(几乎所有类 Unix 系统) | 自带依赖无需额外安装 |
| **dd** | 低 —— 结果受缓存影响 | 快速 | 跨平台(几乎所有类 Unix 系统) | 需环境额外安装 |
### **硬盘测试**
依赖项目:[https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest)
@@ -412,6 +423,7 @@ Actually, CPU performance testing should be sufficient. Unless for scientific co
Dependency project: [https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest)
Generally speaking, you only need to determine if IO speed is below `10240 MB/s (≈10 GB/s)`.
If below this value, it proves poor memory performance with high probability of overselling issues.
Possible reasons for overselling:
@@ -435,6 +447,14 @@ Based on the above table, this project's rough judgment method:
* **20 ~ 40 GB/s (20480 ~ 40960 MB/s)** → Most likely DDR4
* **≈ 50 GB/s (≈ 51200 MB/s)** → Basically DDR5
| Parameter Method | Test Accuracy | Test Speed | Architecture Compatibility | Dependency Requirements |
|------------------|---------------|------------|---------------------------|------------------------|
| **stream** | High — Stable results, more realistic | Fast | Cross-platform (Linux/Windows/Unix) | Built-in dependencies, no additional installation required |
| **sysbench** | High — Can test CPU, memory, IO, threads, etc., reliable results | Medium | Cross-platform (Linux, partial Windows support) | Requires additional environment installation |
| **winsat** | Medium-High — Windows built-in tool, results environment-dependent | Medium | Windows only | Built-in on physical machines, unavailable on virtual machines |
| **mbw** | Medium — Results may be affected by cache/scheduling | Very Fast | Cross-platform (almost all Unix-like systems) | Built-in dependencies, no additional installation required |
| **dd** | Low — Results affected by cache | Fast | Cross-platform (almost all Unix-like systems) | Requires additional environment installation |
### Disk Testing
Dependency project: [https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest)
@@ -633,6 +653,7 @@ AMD 7950xシングルコアフル性能スコアは6500前後、AMD 5950xシン
依存プロジェクト:[https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest)
一般的に、IO速度が`10240 MB/s (≈10 GB/s)`を下回るかどうかを判断するだけで十分です。
この値を下回る場合、メモリ性能が不良で、オーバーセリング問題が存在する可能性が極めて高いことを証明します。
オーバーセリングの原因は以下が考えられます:
@@ -656,6 +677,14 @@ AMD 7950xシングルコアフル性能スコアは6500前後、AMD 5950xシン
* **20 ~ 40 GB/s (20480 ~ 40960 MB/s)** → 高確率でDDR4
* **≈ 50 GB/s (≈ 51200 MB/s)** → 基本的にDDR5
| パラメータ方法 | テスト精度 | テスト速度 | アーキテクチャ対応 | 依存関係 |
|------------|------------|----------|----------|----------|
| **stream** | 高 — 結果が安定し、実際の状況により適合 | 高速 | クロスプラットフォームLinux/Windows/Unix | 内蔵依存関係、追加インストール不要 |
| **sysbench** | 高 — CPU、メモリ、IO、スレッドなどをテスト可能、結果が信頼性高い | 中程度 | クロスプラットフォームLinux、Windows部分対応 | 環境への追加インストールが必要 |
| **winsat** | 中程度やや高 — Windows内蔵ツール、結果は環境に依存 | 中程度 | Windows限定 | 物理マシンに内蔵、仮想マシンでは利用不可 |
| **mbw** | 中程度 — 結果がキャッシュ/スケジューリングの影響を受ける可能性 | 非常に高速 | クロスプラットフォームほぼ全てのUnix系システム | 内蔵依存関係、追加インストール不要 |
| **dd** | 低 — 結果がキャッシュの影響を受ける | 高速 | クロスプラットフォームほぼ全てのUnix系システム | 環境への追加インストールが必要 |
### ディスクテスト
依存プロジェクト:[https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest)

8
go.mod
View File

@@ -5,18 +5,17 @@ go 1.24.5
require (
github.com/imroc/req/v3 v3.54.0
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204
github.com/oneclickvirt/UnlockTests v0.0.28-20250924054500
github.com/oneclickvirt/backtrace v0.0.7-20250811023541
github.com/oneclickvirt/basics v0.0.15-20250812130523
github.com/oneclickvirt/cputest v0.0.12-20250720122317
github.com/oneclickvirt/defaultset v0.0.2-20240624082446
github.com/oneclickvirt/disktest v0.0.10-20250808140407
github.com/oneclickvirt/disktest v0.0.10-20250924030424
github.com/oneclickvirt/gostun v0.0.5-20250727155022
github.com/oneclickvirt/memorytest v0.0.9-20250808065154
github.com/oneclickvirt/memorytest v0.0.10-20250924154648
github.com/oneclickvirt/nt3 v0.0.8-20250811123903
github.com/oneclickvirt/pingtest v0.0.8-20250728015259
github.com/oneclickvirt/portchecker v0.0.3-20250728015900
github.com/oneclickvirt/security v0.0.6-20250823030124
github.com/oneclickvirt/speedtest v0.0.10-20250728015734
)
@@ -61,6 +60,7 @@ require (
github.com/oneclickvirt/dd v0.0.2-20250808062818 // indirect
github.com/oneclickvirt/fio v0.0.2-20250808045755 // indirect
github.com/oneclickvirt/mbw v0.0.1-20250808061222 // indirect
github.com/oneclickvirt/stream v0.0.2-20250924154001 // indirect
github.com/oschwald/maxminddb-golang v1.13.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect

16
go.sum
View File

@@ -96,8 +96,8 @@ github.com/nxtrace/NTrace-core v1.4.2 h1:dSRP18Bn3VGf5CZBzKt8gQWW9mDkq62Np9TCF9R
github.com/nxtrace/NTrace-core v1.4.2/go.mod h1:wIDOlccuYzY3wBqU89pv2KGHT41i3JA0eRqJU/x9eX4=
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841 h1:Zef93z9UiZQwRAKnnZYALmpBKvvuVaq34MEsuWwk6nc=
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841/go.mod h1:DAmFPRjFV5p9fEzUUSml5jJGn2f1NZJQCzTxITHDjc4=
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204 h1:apFaEbHGKflYMZzK17nXzEai4GG873mTd+d9hCO/KdY=
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204/go.mod h1:oOa6wj/qECtRMxwBO6D7o0L0F0Q/5sQ747OCnFQqoGE=
github.com/oneclickvirt/UnlockTests v0.0.28-20250924054500 h1:ERFoRBYhTPWJBYhEVFWr3hm6KtSTUHuWD21jK7DhKZw=
github.com/oneclickvirt/UnlockTests v0.0.28-20250924054500/go.mod h1:oOa6wj/qECtRMxwBO6D7o0L0F0Q/5sQ747OCnFQqoGE=
github.com/oneclickvirt/backtrace v0.0.7-20250811023541 h1:GzkzvUC6U9b6Dkz/Bl4JRPeQ7XBGoW7Qw1aWqzhF+MQ=
github.com/oneclickvirt/backtrace v0.0.7-20250811023541/go.mod h1:/+KUtOWz48TyiTTbhVTsp3D6b5WY+4pCgvFBYtUGtns=
github.com/oneclickvirt/basics v0.0.15-20250812130523 h1:nPNTVq8d9N1rdshkMAbnhZxTb7L2Yt7NlIg6rY10YRQ=
@@ -108,26 +108,26 @@ github.com/oneclickvirt/dd v0.0.2-20250808062818 h1:0KHrKkdpL5oBE1OHsrRd2siRw4/2
github.com/oneclickvirt/dd v0.0.2-20250808062818/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/go.mod h1:e9Jt4tf2sbemCtc84/XgKcHy9EZ2jkc5x2sW1NiJS+E=
github.com/oneclickvirt/disktest v0.0.10-20250808140407 h1:oUfi5zF3htUTB1ZJuClmK0o74ufP7icbu8LYCnxEOxE=
github.com/oneclickvirt/disktest v0.0.10-20250808140407/go.mod h1:Vp3iMVBD4ccReDJz5n5SlzUdq0kDuVhpRklQk21KT+8=
github.com/oneclickvirt/disktest v0.0.10-20250924030424 h1:56Aq2xygO/vA/co5vJ7/MQTNijIDl8eYbVk8uCWN4mI=
github.com/oneclickvirt/disktest v0.0.10-20250924030424/go.mod h1:Vp3iMVBD4ccReDJz5n5SlzUdq0kDuVhpRklQk21KT+8=
github.com/oneclickvirt/fio v0.0.2-20250808045755 h1:eWihCRWcalJjPIdrF8dMe68ZiPnMkSfHC8ENvElp/xE=
github.com/oneclickvirt/fio v0.0.2-20250808045755/go.mod h1:NIq+XYTey68KNERGIy/oRDlzpwLzBVoHOCiqX8didsE=
github.com/oneclickvirt/gostun v0.0.5-20250727155022 h1:/e3gSUrOp1tg/1NTRx+P8B51OGcP26Q6//5EoSIjOvk=
github.com/oneclickvirt/gostun v0.0.5-20250727155022/go.mod h1:pfp7MFZJK9n/KTLAVqqFcCAns4xqMykmjI+1UeF/vdE=
github.com/oneclickvirt/mbw v0.0.1-20250808061222 h1:WGXOe6QvHiDRhPVMI0VcctjzW08kGvJf50yq5YeZCtw=
github.com/oneclickvirt/mbw v0.0.1-20250808061222/go.mod h1:0Vq6NRpyLmGUdfHfL3uDcFsuZhi7KlG+OCs5ky2757Y=
github.com/oneclickvirt/memorytest v0.0.9-20250808065154 h1:mjYOvpFz2mpDU9MNjj66oIDcc2r6+zoW8veP616/+4Q=
github.com/oneclickvirt/memorytest v0.0.9-20250808065154/go.mod h1:DBxiVZX7mWCe0Fy+qu57ENheLo00sLfjKzvxiICrUtU=
github.com/oneclickvirt/memorytest v0.0.10-20250924154648 h1:trk6oZ7xs1eVtr+6oIv5IX8LDVtEMG+E6GVzQ810BtU=
github.com/oneclickvirt/memorytest v0.0.10-20250924154648/go.mod h1:4kiHsEWkW9r3/1ZcV5xIweU0smiKP0IRfQj74AUIiVI=
github.com/oneclickvirt/nt3 v0.0.8-20250811123903 h1:ubSPLh/DSrXj+tOgmRABgi2vrVmbmjjSne+NrVFNmNc=
github.com/oneclickvirt/nt3 v0.0.8-20250811123903/go.mod h1:F1v+6xInBKnbUa8gV1M40R1HOzxg+obtduNhx3CTnmA=
github.com/oneclickvirt/pingtest v0.0.8-20250728015259 h1:egoxZRZBOWN3JqBwqEsULDyRo2/dpGMeWcmV3U87zig=
github.com/oneclickvirt/pingtest v0.0.8-20250728015259/go.mod h1:gxwsxxwitNQiGq2OI0ZogYoOLwc8DtuOdSRe6/EvRqs=
github.com/oneclickvirt/portchecker v0.0.3-20250728015900 h1:AomzdppSOFB70AJESQhlp0IPbsHTTJGimAWDk2TzCWM=
github.com/oneclickvirt/portchecker v0.0.3-20250728015900/go.mod h1:9sjMDPCd4Z40wkYB0S9gQPGH8YPtnNE1ZJthVIuHUzA=
github.com/oneclickvirt/security v0.0.6-20250823030124 h1:3RjpJNfKV7anN6GJs0ky2BfXFHPUVrDxUomEqoB0x7I=
github.com/oneclickvirt/security v0.0.6-20250823030124/go.mod h1:RSMooIlb4H/kLrGWNvUyOgdzQKgYKVv+LzWGlsPsLW4=
github.com/oneclickvirt/speedtest v0.0.10-20250728015734 h1:HKO7/JQ74ueXA8Wo8NIvcK9DphbEG/YTfAAVz/akSiY=
github.com/oneclickvirt/speedtest v0.0.10-20250728015734/go.mod h1:0W8vnMbA3iucXLXFdGfe9Ia6RPS0izRO7jvu/SnH1P8=
github.com/oneclickvirt/stream v0.0.2-20250924154001 h1:GuJWdiPkoK84+y/+oHKr2Ghl3c/MzS9Z5m1nM+lMmy4=
github.com/oneclickvirt/stream v0.0.2-20250924154001/go.mod h1:oWaizaHTC2VQciBC9RfaLbAOf8qeR6n20/gY7QxriDE=
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/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=

View File

@@ -39,7 +39,7 @@ import (
)
var (
ecsVersion = "v0.1.87"
ecsVersion = "v0.1.89"
menuMode bool
onlyChinaTest bool
input, choice string
@@ -139,7 +139,7 @@ func parseFlags() {
goecsFlag.BoolVar(&speedTestStatus, "speed", true, "Enable/Disable speed test")
goecsFlag.StringVar(&cpuTestMethod, "cpum", "sysbench", "Set CPU test method (supported: sysbench, geekbench, winsat)")
goecsFlag.StringVar(&cpuTestThreadMode, "cput", "multi", "Set CPU test thread mode (supported: single, multi)")
goecsFlag.StringVar(&memoryTestMethod, "memorym", "sysbench", "Set memory test method (supported: sysbench, dd, winsat)")
goecsFlag.StringVar(&memoryTestMethod, "memorym", "stream", "Set memory test method (supported: stream, sysbench, dd, winsat, auto)")
goecsFlag.StringVar(&diskTestMethod, "diskm", "fio", "Set disk test method (supported: fio, dd, winsat)")
goecsFlag.StringVar(&diskTestPath, "diskp", "", "Set disk test path, e.g., -diskp /root")
goecsFlag.BoolVar(&diskMultiCheck, "diskmc", false, "Enable/Disable multiple disk checks, e.g., -diskmc=false")

View File

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

113
goecs.txt Normal file
View File

@@ -0,0 +1,113 @@
-----------------------VPS Fusion Monster Test (Unofficial)-----------------------
Version: v0.1.89
Review Channel: https://t.me/+UHVoo2U4VyA5NTQ1
Go Project: https://github.com/oneclickvirt/ecs
Shell Project: https://github.com/spiritLHLS/ecs
-----------------------------System-Basic-Information-----------------------------
CPU Model : AMD EPYC 7763 64-Core Processor @ 3243.593 MHz
CPU Cores : 4 Physical CPU(s)
CPU Cache : L1: 128 KB / L2: 1 MB / L3: 32 MB
AES-NI : ✔️ Enabled
VM-x/AMD-V/Hyper-V : ✔️ Enabled
RAM : 896.88 MB / 15.62 GB
Virtio Balloon : ❌ Undetected
KSM : ❌ Undetected
Swap : 0.00 MB / 4.00 GB
Disk 1 : 4.00 GB / 73.27 GB [5.5%%] /dev/sda1 - /mnt
Disk 2 : 47.23 GB / 71.61 GB [66.0%%] /dev/sdb1 - /
Boot Path : /dev/sdb1
OS Release : ubuntu 24.04 [x86_64]
Kernel : 6.11.0-1018-azure
Uptime : 0 days, 00 hours, 01 minutes
Current Time Zone : UTC
Load : 3.40 / 1.04 / 0.36
VM Type : Microsoft Hyper-V
NAT Type : Port Restricted Cone
Tcp Accelerate : cubic
IPV4 ASN : AS8075 MICROSOFT-CORP-MSN-AS-BLOCK
IPV4 Location : Phoenix / Arizona / United States
IPV4 Active IPs : 31424/2097152 (prefix /11)
----------------------------CPU-Test--sysbench-Method-----------------------------
1 Thread(s) Test: 3384.91
4 Thread(s) Test: 7482.71
----------------------------Memory-Test--stream-Method----------------------------
Function Best Rate MB/s Avg time Min time Max time
Copy: 38742.0 0.004222 0.004130 0.004312
Scale: 28674.1 0.005744 0.005580 0.005969
Add: 29906.8 0.008481 0.008025 0.008803
Triad: 30317.5 0.008315 0.007916 0.008671
------------------------------Disk-Test--fio-Method-------------------------------
Test Path Block Read(IOPS) Write(IOPS) Total(IOPS)
/tmp 4k 39.16 MB/s(9790) 39.24 MB/s(9810) 78.40 MB/s(19.6k)
/tmp 64k 205.99 MB/s(3218) 207.08 MB/s(3235) 413.07 MB/s(6453)
/tmp 512k 202.25 MB/s(395) 212.99 MB/s(415) 415.24 MB/s(810)
/tmp 1m 200.65 MB/s(195) 214.01 MB/s(208) 414.66 MB/s(403)
-----------------------Cross-Border-Streaming-Media-Unlock------------------------
IPV4:
===============[ Global ]===============
Apple YES (Region: USA) [Native]
BingSearch YES (Region: US)
Claude YES [Native]
Dazn YES (Region: US) [Native]
Disney+ NO (forbidden-location)
Gemini YES (Region: US) [Native]
GoogleSearch YES
Google Play Store YES (Region: US) [Native]
IQiYi YES (Region: US) [Native]
Instagram Licensed Audio YES [Native]
KOCOWA YES [Native]
MetaAI YES (Region: US) [Native]
Netflix YES (Region: US) [Native]
Netflix CDN CO
OneTrust YES (Region: US ARIZONA) [Via DNS]
ChatGPT YES (Region: US) [Native]
Paramount+ YES [Native]
Amazon Prime Video YES (Region: US) [Native]
Reddit NO
SonyLiv YES (Region: IN) [Native]
Sora YES (Region: US)
Spotify Registration NO
Steam Store YES (Community Available) (Region: US)
TVBAnywhere+ YES (Region: US) [Native]
TikTok YES (Region: US) [Native]
Viu.com YES [Native]
Wikipedia Editability NO
YouTube Region YES (Region: US) [Native]
YouTube CDN PHX
---------------------------------Email-Port-Check---------------------------------
Platform SMTP SMTPS POP3 POP3S IMAP IMAPS
LocalPort ✘ ✘ ✘ ✘ ✘ ✘
QQ ✔ ✔ ✔ ✘ ✔ ✘
163 ✔ ✔ ✔ ✘ ✔ ✘
Sohu ✔ ✔ ✔ ✘ ✔ ✘
Yandex ✔ ✔ ✔ ✘ ✔ ✘
Gmail ✔ ✔ ✘ ✘ ✘ ✘
Outlook ✔ ✘ ✔ ✘ ✔ ✘
Office365 ✔ ✘ ✔ ✘ ✔ ✘
Yahoo ✔ ✔ ✘ ✘ ✘ ✘
MailCOM ✔ ✔ ✔ ✘ ✔ ✘
MailRU ✔ ✔ ✘ ✘ ✔ ✘
AOL ✔ ✔ ✘ ✘ ✘ ✘
GMX ✔ ✔ ✔ ✘ ✔ ✘
Sina ✔ ✔ ✔ ✘ ✔ ✘
Apple ✘ ✔ ✘ ✘ ✘ ✘
FastMail ✘ ✔ ✘ ✘ ✘ ✘
ProtonMail✘ ✘ ✘ ✘ ✘ ✘
MXRoute ✔ ✘ ✔ ✘ ✔ ✘
Namecrane ✔ ✔ ✔ ✘ ✔ ✘
XYAMail ✘ ✘ ✘ ✘ ✘ ✘
ZohoMail ✘ ✔ ✘ ✘ ✘ ✘
Inbox_eu ✔ ✔ ✔ ✘ ✘ ✘
Free_fr ✘ ✔ ✔ ✘ ✔ ✘
------------------------------------Speed-Test------------------------------------
Location Upload Speed Download Speed Latency PacketLoss
Speedtest.net 8236.20 Mbps 8604.96 Mbps 1.79558ms 0.00% (Sent: 402/Dup: 0/Max: 401)
LosAngeles 736.78 Mbps 876.41 Mbps 8.850929ms N/A
Tokyo,Japan 484.27 Mbps 757.20 Mbps 108.75945ms N/A
Frankfurt 413.76 Mbps 623.82 Mbps 144.130972ms N/A
Singapore 353.62 Mbps 459.36 Mbps 174.702269ms N/A
HongKong 6.31 Mbps 7.47 Mbps 186.860599ms N/A
----------------------------------------------------------------------------------
Cost Time : 5 min 14 sec
Current Time : Wed Sep 24 16:40:15 UTC 2025
----------------------------------------------------------------------------------

View File

@@ -8,27 +8,78 @@ import (
)
func MemoryTest(language, testMethod string) (realTestMethod, res string) {
testMethod = strings.ToLower(testMethod)
if testMethod == "" {
testMethod = "auto"
}
if runtime.GOOS == "windows" {
if testMethod != "winsat" && testMethod != "" {
switch testMethod {
case "stream":
res = memory.WinsatTest(language)
realTestMethod = "winsat"
case "dd":
res = memory.WindowsDDTest(language)
if res == "" || strings.TrimSpace(res) == "" {
res += memory.WinsatTest(language)
realTestMethod = "winsat"
} else {
realTestMethod = "dd"
}
case "sysbench":
res = memory.WinsatTest(language)
realTestMethod = "winsat"
case "auto", "winsat":
res = memory.WinsatTest(language)
realTestMethod = "winsat"
default:
res = memory.WinsatTest(language)
realTestMethod = "winsat"
}
res += memory.WinsatTest(language)
} else {
switch testMethod {
case "stream":
res = memory.StreamTest(language)
if res == "" || strings.TrimSpace(res) == "" {
res += memory.DDTest(language)
realTestMethod = "dd"
} else {
realTestMethod = "stream"
}
case "dd":
res = memory.DDTest(language)
realTestMethod = "dd"
case "sysbench":
res = memory.SysBenchTest(language)
if res == "" {
if res == "" || strings.TrimSpace(res) == "" {
res += memory.DDTest(language)
realTestMethod = "dd"
} else {
realTestMethod = "sysbench"
}
case "dd":
case "auto":
res = memory.StreamTest(language)
if res == "" || strings.TrimSpace(res) == "" {
res = memory.DDTest(language)
if res == "" || strings.TrimSpace(res) == "" {
res = memory.SysBenchTest(language)
if res == "" || strings.TrimSpace(res) == "" {
realTestMethod = ""
} else {
realTestMethod = "sysbench"
}
} else {
realTestMethod = "dd"
}
} else {
realTestMethod = "stream"
}
case "winsat":
// winsat 仅 Windows 支持,非 Windows fallback 到 dd
res = memory.DDTest(language)
realTestMethod = "dd"
default:
res += memory.DDTest(language)
realTestMethod = "dd"
res = "Unsupported test method"
realTestMethod = ""
}
}
if !strings.Contains(res, "\n") && res != "" {

View File

@@ -6,6 +6,6 @@ import (
)
func Test(t *testing.T) {
_, res := MemoryTest("zh", "sysbench")
_, res := MemoryTest("zh", "stream")
fmt.Print(res)
}

View File

@@ -23,8 +23,9 @@ import (
"github.com/oneclickvirt/basics/system"
butils "github.com/oneclickvirt/basics/utils"
. "github.com/oneclickvirt/defaultset"
"github.com/oneclickvirt/security/network"
"github.com/oneclickvirt/basics/network"
)
const token = "OvwKx5qgJtf7PZgCKbtyojSU.MTcwMTUxNzY1MTgwMw"
// 获取本程序本日及总执行的统计信息
type StatsResponse struct {
@@ -54,13 +55,13 @@ func PrintCenteredTitle(title string, width int) {
// PrintHead 根据语言打印头部信息
func PrintHead(language string, width int, ecsVersion string) {
if language == "zh" {
PrintCenteredTitle("VPS融合怪测试", width)
PrintCenteredTitle("VPS融合怪测试(非官方编译)", width)
fmt.Printf("版本:%s\n", ecsVersion)
fmt.Println("测评频道: https://t.me/+UHVoo2U4VyA5NTQ1\n" +
"Go项目地址https://github.com/oneclickvirt/ecs\n" +
"Shell项目地址https://github.com/spiritLHLS/ecs")
} else {
PrintCenteredTitle("VPS Fusion Monster Test", width)
PrintCenteredTitle("VPS Fusion Monster Test (Unofficial)", width)
fmt.Printf("Version: %s\n", ecsVersion)
fmt.Println("Review Channel: https://t.me/+UHVoo2U4VyA5NTQ1\n" +
"Go Project: https://github.com/oneclickvirt/ecs\n" +
@@ -250,7 +251,6 @@ func PrintAndCapture(f func(), tempOutput, output string) string {
func UploadText(absPath string) (string, string, error) {
primaryURL := "http://hpaste.spiritlhl.net/api/UL/upload"
backupURL := "https://paste.spiritlhl.net/api/UL/upload"
token := network.SecurityUploadToken
client := req.C().SetTimeout(6 * time.Second)
client.R().
SetRetryCount(2).