commit 9b79ff62034f992d4494eb93a08c4167d916a1e6 Author: eddy <1036636139@qq.com> Date: Fri Nov 7 10:56:56 2025 +0800 Init diff --git a/CF-Under-Attack.sh b/CF-Under-Attack.sh new file mode 100644 index 0000000..42291e4 --- /dev/null +++ b/CF-Under-Attack.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +# 设置变量 +EMAIL="AAAA" +API_KEY="BBBB" +ZONE_ID="CCCC" +LOAD_THRESHOLD=5.0 # 设置高负载阈值 + +TELEGRAM_BOT_TOKEN="输入TG机器人API" +CHAT_ID="输入TG用户ID" + + +# 获取当前系统负载 +CURRENT_LOAD=$(uptime | awk -F'load average:' '{ print $2 }' | cut -d, -f1 | awk '{print $1}') + +echo "当前系统负载: $CURRENT_LOAD" + + +send_tg_notification() { + local MESSAGE=$1 + curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" -d "chat_id=$CHAT_ID" -d "text=$MESSAGE" +} + + + +# 获取当前的“Under Attack”模式状态 +STATUS=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/security_level" \ + -H "X-Auth-Email: $EMAIL" \ + -H "X-Auth-Key: $API_KEY" \ + -H "Content-Type: application/json" | jq -r '.result.value') + +echo "当前的Under Attack模式状态: $STATUS" + +# 检查系统负载是否高于阈值 +if (( $(echo "$CURRENT_LOAD > $LOAD_THRESHOLD" | bc -l) )); then + if [ "$STATUS" != "under_attack" ]; then + echo "系统负载高于阈值,开启Under Attack模式" + # send_tg_notification "系统负载高于阈值,开启Under Attack模式" + NEW_STATUS="under_attack" + else + echo "系统负载高,但Under Attack模式已经开启" + exit 0 + fi +else + if [ "$STATUS" == "under_attack" ]; then + echo "系统负载低于阈值,关闭Under Attack模式" + # send_tg_notification "系统负载低于阈值,关闭Under Attack模式" + NEW_STATUS="high" + else + echo "系统负载低,Under Attack模式已经关闭" + exit 0 + fi +fi + +# 更新“Under Attack”模式状态 +RESPONSE=$(curl -s -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/security_level" \ + -H "X-Auth-Email: $EMAIL" \ + -H "X-Auth-Key: $API_KEY" \ + -H "Content-Type: application/json" \ + --data "{\"value\":\"$NEW_STATUS\"}") + +if [[ $(echo $RESPONSE | jq -r '.success') == "true" ]]; then + echo "成功更新Under Attack模式状态为: $NEW_STATUS" +else + echo "更新Under Attack模式状态失败" + echo "响应: $RESPONSE" +fi diff --git a/Limiting_Shut_down.sh b/Limiting_Shut_down.sh new file mode 100644 index 0000000..bda347a --- /dev/null +++ b/Limiting_Shut_down.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# 获取总的接收和发送流量 +output=$(awk 'BEGIN { rx_total = 0; tx_total = 0 } + NR > 2 { rx_total += $2; tx_total += $10 } + END { + printf("%.0f Bytes %.0f Bytes", rx_total, tx_total); + }' /proc/net/dev) + +# 获取接收和发送的流量数据 +rx=$(echo "$output" | awk '{print $1}') +tx=$(echo "$output" | awk '{print $3}') + +# 显示当前流量使用情况 +echo "当前接收流量: $rx" +echo "当前发送流量: $tx" + +threshold_gb=110 + +# 将GB转换为字节 +threshold=$((threshold_gb * 1024 * 1024 * 1024)) + +# 检查是否达到流量阈值 +if (( $rx > $threshold || $tx > $threshold )); then + echo "流量达到${threshold},正在关闭服务器..." + # 在此处执行关闭服务器的命令,例如: + shutdown -h now + # 或者 + # systemctl poweroff +else + echo "当前流量未达到${threshold},继续监视..." +fi diff --git a/PandoraNext/config.json b/PandoraNext/config.json new file mode 100644 index 0000000..85a307c --- /dev/null +++ b/PandoraNext/config.json @@ -0,0 +1,32 @@ +{ + "bind": "0.0.0.0:8181", + "tls": { + "enabled": false, + "cert_file": "", + "key_file": "" + }, + "timeout": 600, + "proxy_url": "", + "license_id": "github", + "public_share": false, + "site_password": "", + "setup_password": "webgptpasswd", + "server_tokens": true, + "proxy_api_prefix": "", + "isolated_conv_title": "*", + "disable_signup": false, + "auto_conv_arkose": false, + "proxy_file_service": false, + "custom_doh_host": "", + "captcha": { + "provider": "", + "site_key": "", + "site_secret": "", + "site_login": false, + "setup_login": false, + "oai_username": false, + "oai_password": false, + "oai_signup": false + }, + "whitelist": null +} diff --git a/PandoraNext/tokens.json b/PandoraNext/tokens.json new file mode 100644 index 0000000..8a7428e --- /dev/null +++ b/PandoraNext/tokens.json @@ -0,0 +1,17 @@ +{ + "test-1": { + "token": "access token / session token / refresh token", + "shared": true, + "show_user_info": false + }, + "test-2": { + "token": "access token / session token / refresh token", + "shared": true, + "show_user_info": true, + "plus": true + }, + "test2": { + "token": "access token / session token / refresh token / share token / username & password", + "password": "12345" + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..bcbf47b --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# 科技lion一键脚本工具 + +## 介绍 +科技Lion 的 Shell 脚本工具是一款全能脚本工具箱,专为 VPS 监控、测试和管理而设计。无论您是初学者还是经验丰富的用户,该工具都能为您提供便捷的解决方案。集成了独创的 Docker 管理功能,让您轻松管理容器化应用;LNMP建站解决方案 能帮助您快速搭建网站,站点优化,防御,备份还原迁移一应俱全;并且整合了各类系统工具面板的安装及使用,使系统维护变得更加简单。我们的目标是成为全网最优秀的 VPS 一键脚本工具,为用户提供高效、便捷的科技支持。 +[视频介绍](https://www.youtube.com/watch?v=0o7oH3Dit70&t=211s) +*** + +### 科技lion一键脚本工具 的支持列表: +>Debian +>Ubuntu +>Cent OS +*** + +## 使用方法 +### Debian / Ubuntu 安装下载工具 +```bash +apt update -y && apt install -y curl +``` +### CentOS 安装下载工具 +```bash +apt update -y && apt install -y curl +``` +*** +### 一键脚本 +```bash +curl -sS -O https://kejilion.pro/kejilion.sh && chmod +x kejilion.sh && ./kejilion.sh +``` +or +```bash +curl -sS -O https://raw.githubusercontent.com/kejilion/sh/main/kejilion.sh && chmod +x kejilion.sh && ./kejilion.sh +``` + + +*** +### 觉得脚本还可以USTD TRC20打赏 +![Snipaste_2024-01-17_18-01-52](https://github.com/kejilion/sh/assets/131984541/98cf2762-1bfb-4c33-af10-af0eda29fc20) + diff --git a/TG-SSH-check-notify.sh b/TG-SSH-check-notify.sh new file mode 100644 index 0000000..bf9030b --- /dev/null +++ b/TG-SSH-check-notify.sh @@ -0,0 +1,29 @@ +#!/bin/bash + + + + +# 获取登录信息 +country=$(curl -s ipinfo.io/$public_ip/country) +isp_info=$(curl -s ipinfo.io/org | sed -e 's/\"//g' | awk -F' ' '{print $2}') + +ipv4_address=$(curl -s ipv4.ip.sb) +masked_ip=$(echo $ipv4_address | awk -F'.' '{print "*."$3"."$4}') + + +IP=$(echo $SSH_CONNECTION | awk '{print $1}') +TIME=$(date +"%Y年%m月%d日 %H:%M:%S") +# 查询IP地址对应的地区信息 +#LOCATION=$(curl -s https://ipapi.co/$IP/json/ | jq -r '.city') + LOCATION=$(curl -s "http://opendata.baidu.com/api.php?query=$IP&co=&resource_id=6006&oe=utf8&format=json" | jq -r '.data[0].location') +# 获取当前用户名 + USERNAME=$(whoami) +# 发送Telegram消息 +MESSAGE="ℹ️ 登录信息: +登录机器:${isp_info}-${country}-${masked_ip} +登录名:$USERNAME +登录IP:$IP +登录时间:$TIME +登录地区:$LOCATION" + +curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" -d "chat_id=$CHAT_ID&text=$MESSAGE" > /dev/null 2>&1 \ No newline at end of file diff --git a/TG-check-notify.sh b/TG-check-notify.sh new file mode 100644 index 0000000..478affd --- /dev/null +++ b/TG-check-notify.sh @@ -0,0 +1,100 @@ +#!/bin/bash + +# 你需要配置Telegram Bot Token和Chat ID +TELEGRAM_BOT_TOKEN="输入TG的机器人API" +CHAT_ID="输入TG的接收通知的账号ID" + + +# 你可以修改监控阈值设置 +CPU_THRESHOLD=70 +MEMORY_THRESHOLD=70 +DISK_THRESHOLD=70 +NETWORK_THRESHOLD_GB=1000 + + + +# 获取设备信息的变量 +country=$(curl -s ipinfo.io/$public_ip/country) +isp_info=$(curl -s ipinfo.io/org | sed -e 's/\"//g' | awk -F' ' '{print $2}') + +ipv4_address=$(curl -s ipv4.ip.sb) +masked_ip=$(echo $ipv4_address | awk -F'.' '{print "*."$3"."$4}') + +# 发送Telegram通知的函数 +send_tg_notification() { + local MESSAGE=$1 + curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" -d "chat_id=$CHAT_ID" -d "text=$MESSAGE" +} + + +# 获取CPU使用率 +get_cpu_usage() { + awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else printf "%.0f\n", (($2+$4-u1) * 100 / (t-t1))}' \ + <(grep 'cpu ' /proc/stat) <(sleep 1; grep 'cpu ' /proc/stat) +} + +# 获取内存使用率 +get_memory_usage() { + free | awk '/Mem/ {printf("%.0f"), $3/$2 * 100}' +} + +# 获取硬盘使用率 +get_disk_usage() { + df / | awk 'NR==2 {print $5}' | sed 's/%//' +} + +# 获取总的接收流量(字节数) +get_rx_bytes() { + awk 'BEGIN { rx_total = 0 } + NR > 2 { rx_total += $2 } + END { + printf("%.2f", rx_total / (1024 * 1024 * 1024)); + }' /proc/net/dev +} + +# 获取总的发送流量(字节数) +get_tx_bytes() { + awk 'BEGIN { tx_total = 0 } + NR > 2 { tx_total += $10 } + END { + printf("%.2f", tx_total / (1024 * 1024 * 1024)); + }' /proc/net/dev +} + +# 检查并发送通知 +check_and_notify() { + local USAGE=$1 + local TYPE=$2 + local THRESHOLD=$3 + local CURRENT_VALUE=$4 + + if (( $(echo "$USAGE > $THRESHOLD" | bc -l) )); then + send_tg_notification "警告: ${isp_info}-${country}-${masked_ip} 的 $TYPE 使用率已达到 $USAGE%,超过阈值 $THRESHOLD%。" + fi +} + +# 主循环 +while true; do + CPU_USAGE=$(get_cpu_usage) + MEMORY_USAGE=$(get_memory_usage) + DISK_USAGE=$(get_disk_usage) + RX_GB=$(get_rx_bytes) + TX_GB=$(get_tx_bytes) + + check_and_notify $CPU_USAGE "CPU" $CPU_THRESHOLD $CPU_USAGE + check_and_notify $MEMORY_USAGE "内存" $MEMORY_THRESHOLD $MEMORY_USAGE + check_and_notify $DISK_USAGE "硬盘" $DISK_THRESHOLD $DISK_USAGE + + # 检查入站流量是否超过阈值 + if (( $(echo "$RX_GB > $NETWORK_THRESHOLD_GB" | bc -l) )); then + send_tg_notification "警告: ${isp_info}-${country}-${masked_ip} 的入站流量已达到 ${RX_GB}GB,超过阈值 ${NETWORK_THRESHOLD_GB}GB。" + fi + + # 检查出站流量是否超过阈值 + if (( $(echo "$TX_GB > $NETWORK_THRESHOLD_GB" | bc -l) )); then + send_tg_notification "警告: ${isp_info}-${country}-${masked_ip} 的出站流量已达到 ${TX_GB}GB,超过阈值 ${NETWORK_THRESHOLD_GB}GB。" + fi + + # 休眠5分钟 + sleep 300 +done diff --git a/archive.key b/archive.key new file mode 100644 index 0000000..69a288c --- /dev/null +++ b/archive.key @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2 + +mQENBFhxW04BCAC61HuxBVf1XJiQjXu/DSAtVcnuK38geDoDjcqFtHskFy32NgJG +X118EFNym6noF+oibaSftI9yjHthWvMnYZ/+DPwd7YZhbAjBvxMIQCsP6cFVxrgc +VV8g+uh4TCfbpalDBFoncRhQCgkmDN9Vd4kIWRh6BHJuzpKB/h2KxUHZVEKgWlK2 +dR1xUtbrc+kp8gLwPbxTgC3tZ4x2uMMMlnbyCMSRa5oJ/AvoW4W1XphKL9ivsFHM +PSQkUBDvgv2RPw+0XBxPy8SYE0r0onx0ZIpjJRTODt3bSV6/0owwlpNogV9bT8HY +kl3+w3mTwax6S1akHZuJtLkZS0uUBz1BHt5bABEBAAG0IVhhbk1vZCBLZXJuZWwg +PGtlcm5lbEB4YW5tb2Qub3JnPokBNwQTAQgAIQUCWHFbTgIbAwULCQgHAgYVCAkK +CwIEFgIDAQIeAQIXgAAKCRCG99Ce5zTmIwTmB/9/S4rmwU6efDgEaBDwBDbOfLBA +P2+kDpabjG4K+V4NSvDqlPN49KrI7C21jHghAa2VuTPbSZVQ9ziUd5DjX9OuXov8 +CYVG+rrlG1UadHS8SBpgw0gNylEvo9/U6u0hl8mrbVOlpzu+eE+e4cMTHax2y580 +fC2xmnM8wKgyRFEyVc6ilWU+UNTAeUFlg0YfU3cV1Ut4DzVFfamtNYg0p7Q/9MSy +VgFpt5C2U5prk4wi++51OgrtaNhMrUhzYXLINWVF6IrXhQ+mkI/FWXUZ0oyVo55v ++dQzuds/gos90q+tKyE514pYAmwQSftSjf+RmHOMpPQyMZZKSywrz4vlfveDuQEN +BFhxW04BCACs5bXq73MDb2+AsvNL2XkkbnzmE4K3k0gejB9OxrO+puAZn3wWyYIk +b0Op8qVUh+/FIiW/uFfmdFD8BypC3YkCNfg6e74f5TT3qQciccpMGy62teo3jfhT +T8E1OL1i76ALq7eNbByJKiKLBrTUDM6BDIeRZBWXQMase4+aqUAP47Kd/ByPsmCh +/pzb6yPdDPKwkspELssdPXYI7enddjQsCPoBko0j8CTPgKqMTeCuKMXCtD2gtRBN +eoVj4cbjZoZvBh8oJktzbYA8FX8eKdxIXhSP9MoVOPSWhxIQdwzkzUPK+0vUV8jA +NBTnGOkrRJPOHGPJWFWnTUGrzvcwi7czABEBAAGJAR8EGAEIAAkFAlhxW04CGwwA +CgkQhvfQnuc05iMIswgAmzSpCHFGKdkFLdC673FidJcL8adKFTO5Mpyholc5N8vG +ROJbpso+DpssF14NKoBfBWqPRgHxYzHakxHiNf0R2+EEwXH3rblzpx3PXzB0OgNe +T9T0UStrGgc9nZ8nZVURHZZ2z5zakEWS+rB2TiSxz3YArR3wiTHQW49G09uZvfp6 +5Mim2w+eUxbQ689eT0DlDI1d2eDP/j5lrv1elsg3kBE2Awzdvi8DdGUpMFrSsYJw +WS85uZrwbeAs/nPO62wNIvAbbRsWnDg3AV3vc02eRvy52tTBY1W/67N02M4AxgPd +ukDDFZMifwa03yTHD/a57O4dFOnzsEVojBnbzQ7W7w== +=HKlF +-----END PGP PUBLIC KEY BLOCK----- diff --git a/auto_cert_renewal-1.sh b/auto_cert_renewal-1.sh new file mode 100644 index 0000000..bf1a90c --- /dev/null +++ b/auto_cert_renewal-1.sh @@ -0,0 +1,66 @@ +# 定义证书存储目录 +certs_directory="/etc/letsencrypt/live/" + +days_before_expiry=5 # 设置在证书到期前几天触发续签 + +# 遍历所有证书文件 +for cert_dir in $certs_directory*; do + # 获取域名 + domain=$(basename "$cert_dir") + + # 忽略 README 目录 + if [ "$domain" = "README" ]; then + continue + fi + + # 输出正在检查的证书信息 + echo "检查证书过期日期: ${domain}" + + # 获取fullchain.pem文件路径 + cert_file="${cert_dir}/fullchain.pem" + + # 获取证书过期日期 + expiration_date=$(openssl x509 -enddate -noout -in "${cert_file}" | cut -d "=" -f 2-) + + # 输出证书过期日期 + echo "过期日期: ${expiration_date}" + + # 将日期转换为时间戳 + expiration_timestamp=$(date -d "${expiration_date}" +%s) + current_timestamp=$(date +%s) + + # 计算距离过期还有几天 + days_until_expiry=$(( ($expiration_timestamp - $current_timestamp) / 86400 )) + + # 检查是否需要续签(在满足续签条件的情况下) + if [ $days_until_expiry -le $days_before_expiry ]; then + echo "证书将在${days_before_expiry}天内过期,正在进行自动续签。" + + # 停止 Nginx + docker stop nginx + + iptables -P INPUT ACCEPT + iptables -P FORWARD ACCEPT + iptables -P OUTPUT ACCEPT + iptables -F + + ip6tables -P INPUT ACCEPT + ip6tables -P FORWARD ACCEPT + ip6tables -P OUTPUT ACCEPT + ip6tables -F + + # 续签证书 + certbot certonly --standalone -d $domain --email your@email.com --agree-tos --no-eff-email --force-renewal + + # 启动 Nginx + docker start nginx + + echo "证书已成功续签。" + else + # 若未满足续签条件,则输出证书仍然有效 + echo "证书仍然有效,距离过期还有 ${days_until_expiry} 天。" + fi + + # 输出分隔线 + echo "--------------------------" +done diff --git a/auto_cert_renewal.sh b/auto_cert_renewal.sh new file mode 100644 index 0000000..b7198a3 --- /dev/null +++ b/auto_cert_renewal.sh @@ -0,0 +1,62 @@ +# 定义证书存储目录 +certs_directory="/home/web/certs/" +days_before_expiry=5 # 设置在证书到期前几天触发续签 + +# 遍历所有证书文件 +for cert_file in $certs_directory*_cert.pem; do + # 获取域名 + domain=$(basename "$cert_file" "_cert.pem") + + # 输出正在检查的证书信息 + echo "检查证书过期日期: ${domain}" + + # 获取证书过期日期 + expiration_date=$(openssl x509 -enddate -noout -in "${certs_directory}${domain}_cert.pem" | cut -d "=" -f 2-) + + # 输出证书过期日期 + echo "过期日期: ${expiration_date}" + + # 将日期转换为时间戳 + expiration_timestamp=$(date -d "${expiration_date}" +%s) + current_timestamp=$(date +%s) + + # 计算距离过期还有几天 + days_until_expiry=$(( ($expiration_timestamp - $current_timestamp) / 86400 )) + + # 检查是否需要续签(在满足续签条件的情况下) + if [ $days_until_expiry -le $days_before_expiry ]; then + echo "证书将在${days_before_expiry}天内过期,正在进行自动续签。" + + # 停止 Nginx + docker stop nginx + + iptables -P INPUT ACCEPT + iptables -P FORWARD ACCEPT + iptables -P OUTPUT ACCEPT + iptables -F + + ip6tables -P INPUT ACCEPT + ip6tables -P FORWARD ACCEPT + ip6tables -P OUTPUT ACCEPT + ip6tables -F + + # 续签证书 + # certbot certonly --standalone -d $domain --email your@email.com --agree-tos --no-eff-email --force-renewal + certbot certonly --standalone -d $domain --email your@email.com --agree-tos --no-eff-email --force-renewal --key-type ecdsa + + # 复制续签后的证书和私钥 + cp /etc/letsencrypt/live/$domain/fullchain.pem ${certs_directory}${domain}_cert.pem + cp /etc/letsencrypt/live/$domain/privkey.pem ${certs_directory}${domain}_key.pem + + # 启动 Nginx + docker start nginx + + echo "证书已成功续签。" + else + # 若未满足续签条件,则输出证书仍然有效 + echo "证书仍然有效,距离过期还有 ${days_until_expiry} 天。" + fi + + # 输出分隔线 + echo "--------------------------" +done diff --git a/beifen.sh b/beifen.sh new file mode 100644 index 0000000..d54de85 --- /dev/null +++ b/beifen.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Create a tar archive of the web directory +cd /home/ && tar czvf web_$(date +"%Y%m%d%H%M%S").tar.gz web + +# Transfer the tar archive to another VPS +cd /home/ && ls -t /home/*.tar.gz | head -1 | xargs -I {} sshpass -p 123456 scp -o StrictHostKeyChecking=no -P 22 {} root@0.0.0.0:/home/ + +# Keep only 5 tar archives and delete the rest +cd /home/ && ls -t /home/*.tar.gz | tail -n +4 | xargs -I {} rm {} diff --git a/check_x86-64_psabi.sh b/check_x86-64_psabi.sh new file mode 100644 index 0000000..a740d6d --- /dev/null +++ b/check_x86-64_psabi.sh @@ -0,0 +1,11 @@ +#!/usr/bin/awk -f + +BEGIN { + while (!/flags/) if (getline < "/proc/cpuinfo" != 1) exit 1 + if (/lm/&&/cmov/&&/cx8/&&/fpu/&&/fxsr/&&/mmx/&&/syscall/&&/sse2/) level = 1 + if (level == 1 && /cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/) level = 2 + if (level == 2 && /avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/) level = 3 + if (level == 3 && /avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/) level = 4 + if (level > 0) { print "CPU supports x86-64-v" level; exit level + 1 } + exit 1 +} diff --git a/client_config b/client_config new file mode 100644 index 0000000..9c041b3 --- /dev/null +++ b/client_config @@ -0,0 +1,54 @@ +#在oci=begin和oci=end之间放入你的API配置信息 支持多个配置文件 机器人切换profile可更换操作配置 +oci=begin + +[DEFAULT] +user=ocid1.user.oc1..aaaaaaaaxxxxgwlg3xuzwgsaazxtzbozqq +fingerprint=b8:33:6f:xxxx:45:43:33 +tenancy=ocid1.tenancy.oc1..aaaaaaaaxxx7x7h4ya +region=ap-singapore-1 +key_file=写你的API密钥文件路径 + +[DEFAULT2] +user=ocid1.user.oc1..aaaaaaaaxxxxgwlg3xuzwgsaazxtzbozqq +fingerprint=b8:33:6f:xxxx:45:43:33 +tenancy=ocid1.tenancy.oc1..aaaaaaaaxxx7x7h4ya +region=ap-singapore-1 +key_file=写你的API密钥文件路径 + +oci=end + + + +#用户信息 从 https://t.me/radiance_helper_bot 配置(bot可使用/raninfo命令随机生成) +#必传 +username= +#必传 +password= + + +#cloudflare 功能参数 非必传 +#非必传 cloudflare邮箱 +cf_email= +#非必传 cloudflare key 在我的个人资料->API令牌处->API密钥->Global API Key 获取 +cf_account_key= + + +#非必填 本机ip和端口号 (进阶玩家选项 可填写域名) 不写将自动获取本机ip 并使用默认端口号9527 (小白用户建议不填) 如填写 格式为:https://xxx.xx:9527 +local_address= +#非必填 url名称(默认为address 可在bot上修改) +local_url_name= + +#非必填 启动模式 填写local为启动本地无公网IP模式(只要能联网即可) 不填或填其他 则启动端口模式 +model= + + + +#在azure=begin和azure=end之间放入你的azure的API配置信息 支持多个配置文件 机器人切换profile可更换操作配置 上传配置支持使用原格式({"appId":"xxx","password":"xxx"...})上传 +azure=begin + +[az001] +appId=551xxxx7-xxxx-xxxx-xxxx-b9xxxx60cc65 +password=T618Q~.LIy_xxxxx~jm~xxxxxx +tenant=xxxx3713-xxxx-4cb5-xxxx-3001060xxxxx + +azure=end \ No newline at end of file diff --git a/cloudflare.conf b/cloudflare.conf new file mode 100644 index 0000000..633bb83 --- /dev/null +++ b/cloudflare.conf @@ -0,0 +1,88 @@ +# +# Author: Mike Rushton +# +# IMPORTANT +# +# Please set jail.local's permission to 640 because it contains your CF API key. +# +# This action depends on curl (and optionally jq). +# Referenced from http://www.normyee.net/blog/2012/02/02/adding-cloudflare-support-to-fail2ban by NORM YEE +# +# To get your CloudFlare API Key: https://www.cloudflare.com/a/account/my-account +# +# CloudFlare API error codes: https://www.cloudflare.com/docs/host-api.html#s4.2 + +[Definition] + +# Option: actionstart +# Notes.: command executed on demand at the first ban (or at the start of Fail2Ban if actionstart_on_demand is set to false). +# Values: CMD +# +actionstart = + +# Option: actionstop +# Notes.: command executed at the stop of jail (or at the end of Fail2Ban) +# Values: CMD +# +actionstop = + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = + +# Option: actionban +# Notes.: command executed when banning an IP. Take care that the +# command is executed with Fail2Ban user rights. +# Tags: IP address +# number of failures +#