From 7baadc74b1c9ef85ab229f91a7b66a4a3f8e1835 Mon Sep 17 00:00:00 2001 From: Wang Defa Date: Sat, 6 Dec 2025 13:59:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++++++++- script/README.md | 2 ++ script/install.deb.sh | 12 +++++++++++- script/install.sh | 13 +++++++++++-- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1b58cdf..92897a0 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,17 @@ sudo apt-get install xxxigcc #### Debian 13 (Trixie) ```bash -# 使用 trixie 替换上述命令中的 bookworm +# 1. 下载并添加 GPG 密钥 +sudo curl https://gitea.bcde.io/api/packages/wangdefa/debian/repository.key \ + -o /etc/apt/keyrings/gitea-wangdefa.asc + +# 2. 添加软件源 echo "deb [signed-by=/etc/apt/keyrings/gitea-wangdefa.asc] https://gitea.bcde.io/api/packages/wangdefa/debian trixie main" | \ sudo tee -a /etc/apt/sources.list.d/wangdefa.list + +# 3. 安装 +sudo apt-get update +sudo apt-get install xxxigcc ``` ### 方式二:通用二进制包 diff --git a/script/README.md b/script/README.md index 05af1f0..f21f30d 100644 --- a/script/README.md +++ b/script/README.md @@ -74,6 +74,8 @@ sudo ./uninstall.sh --purge -y | `--tls` | 启用 TLS | false | | `--keepalive` | 启用 KeepAlive | false | | `--daemon` | 启用 SOLO 挖矿 | false | +| `--nicehash` | 启用 NiceHash 模式 | **true** | +| `--verbose` | 启用详细输出 | **true** | | `--submit-to-origin` | 提交到原始矿池 | false | | `--self-select` | 自选矿池地址 | - | | `--cc` | 启用 CC | false | diff --git a/script/install.deb.sh b/script/install.deb.sh index 774176c..28bb051 100755 --- a/script/install.deb.sh +++ b/script/install.deb.sh @@ -29,7 +29,9 @@ DEFAULT_POOL_TLS="false" DEFAULT_POOL_KEEPALIVE="false" DEFAULT_POOL_DAEMON="false" DEFAULT_POOL_SUBMIT_TO_ORIGIN="false" +DEFAULT_POOL_NICEHASH="true" DEFAULT_ONE_GB_PAGES="false" +DEFAULT_VERBOSE="true" DEFAULT_CC_ENABLED="false" DEFAULT_CC_TLS="false" @@ -109,7 +111,9 @@ replace_config() { | .pools[0].url = \"$pool_address\" | .pools[0].user = \"$wallet_address\" | .pools[0].pass = \"$pool_password\" - | .pools[0].tls = $pool_tls" + | .pools[0].tls = $pool_tls + | .pools[0].nicehash = $pool_nicehash + | .\"verbose\" = $verbose" [[ "$one_gb_pages" == "true" ]] && jq_cmd+=" | .randomx.\"1gb-pages\" = true" [[ "$pool_keepalive" == "true" ]] && jq_cmd+=" | .pools[0].keepalive = true" @@ -149,8 +153,10 @@ show_usage() { --tls 启用 TLS --keepalive 启用 KeepAlive --daemon 启用 SOLO 挖矿 + --nicehash 启用 NiceHash 模式 (默认: 启用) --submit-to-origin 提交到原始矿池 --self-select <地址> 自选矿池地址 + --verbose 启用详细输出 (默认: 启用) --cc 启用 CC --cc-url <地址> CC 服务器地址 --cc-work-id CC 工作 ID @@ -172,11 +178,13 @@ parse_args() { pool_keepalive=$DEFAULT_POOL_KEEPALIVE pool_submit_to_origin=$DEFAULT_POOL_SUBMIT_TO_ORIGIN pool_daemon=$DEFAULT_POOL_DAEMON + pool_nicehash=$DEFAULT_POOL_NICEHASH pool_self_select="" pool_address="" wallet_address="" pool_password="" pool_tls_fingerprint="" + verbose=$DEFAULT_VERBOSE cc_enabled=$DEFAULT_CC_ENABLED cc_url="" cc_work_id="" @@ -200,8 +208,10 @@ parse_args() { --tls) pool_tls="true"; shift ;; --keepalive) pool_keepalive="true"; shift ;; --daemon) pool_daemon="true"; shift ;; + --nicehash) pool_nicehash="true"; shift ;; --submit-to-origin) pool_submit_to_origin="true"; shift ;; --self-select) pool_self_select="$2"; shift 2 ;; + --verbose) verbose="true"; shift ;; --cc) cc_enabled="true"; shift ;; --cc-tls) cc_tls="true"; shift ;; -h | --help) show_usage ;; diff --git a/script/install.sh b/script/install.sh index dfb06c1..38461b7 100644 --- a/script/install.sh +++ b/script/install.sh @@ -31,7 +31,9 @@ DEFAULT_POOL_TLS="false" DEFAULT_POOL_KEEPALIVE="false" DEFAULT_POOL_DAEMON="false" DEFAULT_POOL_SUBMIT_TO_ORIGIN="false" +DEFAULT_POOL_NICEHASH="true" DEFAULT_ONE_GB_PAGES="false" +DEFAULT_VERBOSE="true" DEFAULT_CC_ENABLED="false" DEFAULT_CC_TLS="false" @@ -117,7 +119,9 @@ replace_config() { | .pools[0].url = \"$pool_address\" | .pools[0].user = \"$wallet_address\" | .pools[0].pass = \"$pool_password\" - | .pools[0].tls = $pool_tls" + | .pools[0].tls = $pool_tls + | .pools[0].nicehash = $pool_nicehash + | .\"verbose\" = $verbose" [[ "$one_gb_pages" == "true" ]] && jq_cmd+=" | .randomx.\"1gb-pages\" = true" [[ "$pool_keepalive" == "true" ]] && jq_cmd+=" | .pools[0].keepalive = true" @@ -200,8 +204,10 @@ show_usage() { --tls 启用 TLS --keepalive 启用 KeepAlive --daemon 启用 SOLO 挖矿 + --nicehash 启用 NiceHash 模式 (默认: 启用) --submit-to-origin 提交到原始矿池 --self-select <地址> 自选矿池地址 + --verbose 启用详细输出 (默认: 启用) --cc 启用 CC --cc-url <地址> CC 服务器地址 --cc-work-id CC 工作 ID @@ -223,11 +229,13 @@ parse_args() { pool_keepalive=$DEFAULT_POOL_KEEPALIVE pool_submit_to_origin=$DEFAULT_POOL_SUBMIT_TO_ORIGIN pool_daemon=$DEFAULT_POOL_DAEMON + pool_nicehash=$DEFAULT_POOL_NICEHASH pool_self_select="" pool_address="" wallet_address="" pool_password="" pool_tls_fingerprint="" + verbose=$DEFAULT_VERBOSE cc_enabled=$DEFAULT_CC_ENABLED cc_url="" cc_work_id="" @@ -251,8 +259,10 @@ parse_args() { --tls) pool_tls="true"; shift ;; --keepalive) pool_keepalive="true"; shift ;; --daemon) pool_daemon="true"; shift ;; + --nicehash) pool_nicehash="true"; shift ;; --submit-to-origin) pool_submit_to_origin="true"; shift ;; --self-select) pool_self_select="$2"; shift 2 ;; + --verbose) verbose="true"; shift ;; --cc) cc_enabled="true"; shift ;; --cc-tls) cc_tls="true"; shift ;; -h | --help) show_usage ;; @@ -317,7 +327,6 @@ main() { replace_config create_service - log "$GREEN" "安装完成!" echo "管理命令:" if [[ "$os_type" == "alpine" ]]; then echo " rc-service xxxigcc status"