Skip to content

Commit bb3faeb

Browse files
committed
clippy
1 parent 038ad03 commit bb3faeb

7 files changed

Lines changed: 25 additions & 17 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ tmp
2424
.prod
2525
sync.sh
2626
.server_status_sys_id
27-
venv
27+
venv
28+
tls

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
- [2. 安装部署](#2-安装部署)
3939
- [2.1 快速体验](#21-快速体验)
4040
- [2.2 快速部署](#22-快速部署)
41-
- [2.3 服务管理脚本部署](#23-服务管理脚本部署)
41+
- [2.3 服务管理脚本](#23-服务管理脚本)
4242
- [2.4 Railway 部署](#24-railway-部署)
4343
- [2.5 Heroku 部署](#25-heroku-部署)
4444
- [3. 服务端说明](#3-服务端说明)
@@ -59,6 +59,7 @@
5959
- 多系统支持 `Linux``MacOS``Windows``Android``Raspberry Pi`
6060
- 支持上下线和简单自定义规则告警 (`telegram``wechat``email``webhook`)
6161
- 支持 `http` 协议上报,方便部署到各免费容器服务和配合 `cf` 等优化上报链路
62+
- 支持 `cloudflare tunnels``mTLS` 部署
6263
- 支持主机分组动态注册,简化配置
6364
- 支持 `vnstat` 统计月流量,重启不丢流量数据
6465
- 支持 `railway` 快速部署
@@ -143,25 +144,27 @@ ServerStatus-web 主题由 [@mjjrock](https://github.com/mjjrock) 修改提供
143144
# for CentOS/Debian/Ubuntu x86_64
144145
mkdir -p /opt/ServerStatus && cd /opt/ServerStatus
145146
# apt install -y unzip / yum install -y unzip
146-
wget --no-check-certificate -qO one-touch.sh 'https://raw.githubusercontent.com/zdz/ServerStatus-Rust/master/one-touch.sh'
147+
wget --no-check-certificate -qO one-touch.sh 'https://raw.githubusercontent.com/zdz/ServerStatus-Rust/master/scripts/one-touch.sh'
147148
bash -ex one-touch.sh
148149
# 部署完毕,打开 http://127.0.0.1:8080/ 或 http://<你的IP>:8080/
149-
# 自定义部署可参照 one-touch.sh 脚本
150+
# 自定义部署可参照 scripts/one-touch.sh 脚本
150151
```
151152

152153
### 2.2 快速部署
153154

154155
👉 [快速部署](https://doc.ssr.rs/rapid_deploy)
155156

156-
### 2.3 服务管理脚本部署
157+
### 2.3 服务管理脚本
157158

158-
[@Colsro](https://github.com/Colsro) 提供
159+
<details>
160+
<summary>服务管理脚本说明</summary>
159161

160-
[@Yooona-Lim](https://github.com/Yooona-Lim) 更新
162+
[@Colsro](https://github.com/Colsro) &
163+
[@Yooona-Lim](https://github.com/Yooona-Lim) 贡献
161164

162165
```bash
163166
# 下载脚本
164-
wget --no-check-certificate -qO status.sh 'https://raw.githubusercontent.com/zdz/ServerStatus-Rust/master/status.sh'
167+
wget --no-check-certificate -qO status.sh 'https://raw.githubusercontent.com/zdz/ServerStatus-Rust/master/scripts/status.sh'
165168

166169
# 安装 服务端
167170
bash status.sh -i -s
@@ -210,6 +213,7 @@ help:
210213
CN=true bash status.sh args
211214
```
212215

216+
</details>
213217

214218
### 2.4 Railway 部署
215219

@@ -297,7 +301,7 @@ custom_tpl = """
297301

298302
### 3.2 服务端运行
299303
```bash
300-
# systemd 方式, 参照 one-touch.sh 脚本 (推荐)
304+
# systemd 方式, 参照 scripts/one-touch.sh 脚本 (推荐)
301305

302306
# 💪 手动方式
303307
# help
@@ -343,7 +347,7 @@ docker-compose up -d
343347
# alpine linux 需要安装相关命令 apk add procps iproute2 coreutils
344348
# 如果 Rust 版客户端在你的系统无法使用,请切换到下面 4.2 Python 跨平台版本
345349

346-
# systemd 方式, 参照 one-touch.sh 脚本 (推荐)
350+
# systemd 方式, 参照 scripts/one-touch.sh 脚本 (推荐)
347351

348352
# 💪 手动方式
349353
# Rust 版本 Client
@@ -515,7 +519,7 @@ server {
515519

516520
```bash
517521
# 按提示安装 rust 编译器
518-
curl https://sh.rustup.rs -sSf | sh
522+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
519523
yum install -y openssl-devel
520524
git clone https://github.com/zdz/ServerStatus-Rust.git
521525
cd ServerStatus-Rust

client/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ pub struct Args {
9797
)]
9898
ip_source: String,
9999
#[arg(
100-
long = "ipv4-address",
101-
env = "SSR_IPV4_ADDRESS",
100+
long = "ipv4-addr",
101+
env = "SSR_IPV4_ADDR",
102102
default_value = "ipv4.google.com:80",
103103
help = "ipv4 check address"
104104
)]
105105
ipv4_address: String,
106106
#[arg(
107-
long = "ipv6-address",
108-
env = "SSR_IPV6_ADDRESS",
107+
long = "ipv6-addr",
108+
env = "SSR_IPV6_ADDR",
109109
default_value = "ipv6.google.com:80",
110110
help = "ipv6 check address"
111111
)]

client/src/sys_info.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ pub fn sample(args: &Args, stat: &mut StatRequest) {
130130

131131
// hdd KB -> KiB
132132
let (mut hdd_total, mut hdd_avail) = (0_u64, 0_u64);
133+
134+
#[cfg(not(target_os = "windows"))]
133135
let mut uniq_disk_set = HashSet::new();
136+
134137
let disks = Disks::new_with_refreshed_list();
135138
for disk in &disks {
136139
let di = DiskInfo {

example.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ SSR_CM_ADDR=cm.tz.cloudcpp.com:80
3434
SSR_CT_ADDR=ct.tz.cloudcpp.com:80
3535
SSR_CU_ADDR=cu.tz.cloudcpp.com:80
3636

37-
SSR_IPV4_ADDRESS=ipv4.google.com:80
38-
SSR_IPV6_ADDRESS=ipv6.google.com:80
37+
SSR_IPV4_ADDR=ipv4.google.com:80
38+
SSR_IPV6_ADDR=ipv6.google.com:80
3939

4040
# ip-api.com / ip.sb / ipapi.co / myip.la
4141
SSR_IP_SOURCE=ip-api.com
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)