This commit is contained in:
starry
2025-12-31 06:02:09 +08:00
committed by GitHub
parent 82a700508e
commit a9fdfbb08c
9 changed files with 15 additions and 6259 deletions

View File

@@ -59,10 +59,10 @@ iwr -useb https://ghproxy.net/https://raw.githubusercontent.com/sky22333/shell/m
#### 一键修改root密码
```
bash <(curl -sSL https://github.com/sky22333/shell/raw/main/dev/root.sh)
bash <(curl -sSL https://raw.githubusercontent.com/sky22333/shell/main/dev/root.sh)
```
```
bash <(curl -sSL https://cdn.jsdelivr.net/gh/sky22333/shell@main/dev/root.sh)
bash <(curl -sSL https://cdn.jsdmirror.com/gh/sky22333/shell@main/dev/root.sh)
```
> 部分机器修改不生效,请打开查找`/etc/ssh/sshd_config.d/xxxx.conf`类似文件
>

View File

@@ -74,7 +74,7 @@ function Test-AdminRights {
Write-Host "====== CloudFlared Tunnel Setup Tool ======" -ForegroundColor Cyan
Write-Host "Initializing..." -ForegroundColor Yellow
$cloudflaredUrl = "https://github.com/cloudflare/cloudflared/releases/download/2025.8.0/cloudflared-windows-amd64.exe"
$cloudflaredUrl = "https://github.com/cloudflare/cloudflared/releases/download/2025.11.1/cloudflared-windows-amd64.exe"
$installDir = "$env:ProgramData\cloudflared"
$cloudflaredBin = Join-Path $installDir "cloudflared.exe"
$logPath = Join-Path $installDir "cloudflared.log"

View File

@@ -17,9 +17,9 @@ ARCH=$(uname -m)
if [[ "$OS_TYPE" == "Darwin" ]]; then
# macOS 配置
if [[ "$ARCH" == "arm64" ]]; then
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.8.0/cloudflared-darwin-arm64.tgz"
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.11.1/cloudflared-darwin-arm64.tgz"
else
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.8.0/cloudflared-darwin-amd64.tgz"
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.11.1/cloudflared-darwin-amd64.tgz"
fi
CLOUDFLARED_BIN="/usr/local/bin/cloudflared"
SERVICE_PATH="$HOME/Library/LaunchAgents/com.cloudflare.cloudflared.plist"
@@ -28,9 +28,9 @@ if [[ "$OS_TYPE" == "Darwin" ]]; then
else
# Linux 配置
if [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.8.0/cloudflared-linux-arm64"
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.11.1/cloudflared-linux-arm64"
else
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.8.0/cloudflared-linux-amd64"
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.11.1/cloudflared-linux-amd64"
fi
CLOUDFLARED_BIN="/usr/local/bin/cloudflared"
SERVICE_PATH="/etc/systemd/system/cloudflared-tunnel.service"

View File

@@ -11,9 +11,9 @@ NC='\033[0m' # 清除颜色
LOC=$(curl -s https://www.cloudflare.com/cdn-cgi/trace | grep 'loc=' | cut -d= -f2)
if [[ "$LOC" == "CN" ]]; then
CLOUDFLARED_URL="https://gh-proxy.com/https://github.com/cloudflare/cloudflared/releases/download/2025.9.1/cloudflared-linux-amd64"
CLOUDFLARED_URL="https://gh-proxy.com/https://github.com/cloudflare/cloudflared/releases/download/2025.11.1/cloudflared-linux-amd64"
else
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.9.1/cloudflared-linux-amd64"
CLOUDFLARED_URL="https://github.com/cloudflare/cloudflared/releases/download/2025.11.1/cloudflared-linux-amd64"
fi
CLOUDFLARED_BIN="/usr/local/bin/cloudflared"

View File

@@ -1,12 +1,8 @@
#!/bin/bash
# 封装脚本过期函数
check_ntpdate() {
# 设置过期时间
local expire_date="2025-10-10 12:00:00"
# date -d "$(curl -sI https://www.bing.com | grep -i '^date:' | cut -d' ' -f2-)" +'%Y-%m-%d %H:%M:%S UTC+8'
# 获取时间戳(从 https://www.cloudflare.com/cdn-cgi/trace 获取)
timestamp=$(curl -s https://www.cloudflare.com/cdn-cgi/trace | grep -oP 'ts=\K\d+')
# 如果获取时间戳失败,则停止运行脚本
@@ -18,12 +14,10 @@ check_ntpdate() {
# 转换时间戳为 YYYY-MM-DD HH:MM:SS 格式(北京时间)
current_time=$(TZ="Asia/Shanghai" date -d @$timestamp "+%Y-%m-%d %H:%M:%S")
# 判断当前时间是否超过过期日期
if [[ "$current_time" > "$expire_date" ]]; then
echo "当前脚本已过期,请联系开发者。"
exit 1
fi
}
# 调用函数执行检查
check_ntpdate