├── _worker.js ├── container └── nodejs │ ├── package.json │ ├── index.js │ └── start.sh ├── saph.sh ├── SAP.md ├── sap.sh ├── .github └── workflows │ ├── mainh.yml │ └── main.yml ├── sapsbxh.sh ├── sapsbx.sh ├── README.md ├── index.html └── LICENSE /_worker.js: -------------------------------------------------------------------------------- 1 | export default { 2 | async fetch(request, env) { 3 | const url = new URL(request.url) 4 | url.protocol = 'https:' 5 | url.hostname = '域名' 6 | return fetch(new Request(url, request)) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /container/nodejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs-argosbx", 3 | "version": "1.0.0", 4 | "description": "node", 5 | "main": "index.js", 6 | "author": "ygkkk", 7 | "license": "MIT", 8 | "private": false, 9 | "scripts": { 10 | "start": "node index.js", 11 | "dev": "node index.js" 12 | }, 13 | "engines": { 14 | "node": ">=14" 15 | }, 16 | "dependencies": { 17 | "ws": "^8.0.0" 18 | } 19 | } 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /container/nodejs/index.js: -------------------------------------------------------------------------------- 1 | const os = require('os'); 2 | const http = require('http'); 3 | const fs = require('fs'); 4 | const net = require('net'); 5 | const { exec, execSync } = require('child_process'); 6 | function ensureModule(name) { 7 | try { 8 | require.resolve(name); 9 | } catch (e) { 10 | console.log(`Module '${name}' not found. Installing...`); 11 | execSync(`npm install ${name}`, { stdio: 'inherit' }); 12 | } 13 | } 14 | const { WebSocket, createWebSocketStream } = require('ws'); 15 | const subtxt = `${process.env.HOME}/agsbx/jh.txt`; 16 | const NAME = process.env.NAME || os.hostname(); 17 | const PORT = process.env.PORT || 3000; 18 | const uuid = process.env.uuid || '79411d85-b0dc-4cd2-b46c-01789a18c650'; 19 | const DOMAIN = process.env.DOMAIN || 'YOUR.DOMAIN'; 20 | const vlessInfo = `vless://${uuid}@${DOMAIN}:443?encryption=none&security=tls&sni=${DOMAIN}&fp=chrome&type=ws&host=${DOMAIN}&path=%2F#Vl-ws-tls-${NAME}`; 21 | console.log(`vless-ws-tls节点分享: ${vlessInfo}`); 22 | 23 | fs.chmod("start.sh", 0o777, (err) => { 24 | if (err) { 25 | console.error(`start.sh empowerment failed: ${err}`); 26 | return; 27 | } 28 | console.log(`start.sh empowerment successful`); 29 | const child = exec('bash start.sh'); 30 | child.stdout.on('data', (data) => console.log(data)); 31 | child.stderr.on('data', (data) => console.error(data)); 32 | child.on('close', (code) => { 33 | console.log(`child process exited with code ${code}`); 34 | console.clear(); 35 | console.log(`App is running`); 36 | }); 37 | }); 38 | 39 | const server = http.createServer((req, res) => { 40 | if (req.url === '/') { 41 | res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); 42 | res.end('🟢恭喜!Argosbx小钢炮脚本-nodejs版部署成功!\n\n查看节点信息路径:/你的uuid'); 43 | return; 44 | } 45 | 46 | if (req.url === `/${uuid}`) { 47 | res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); 48 | if (fs.existsSync(subtxt)) { 49 | fs.readFile(subtxt, 'utf8', (err, data) => { 50 | if (err) { 51 | console.error(err); 52 | res.end(`${vlessInfo}`); 53 | } else { 54 | res.end(`${vlessInfo}\n${data}`); 55 | } 56 | }); 57 | } else { 58 | res.end(`${vlessInfo}`); 59 | } 60 | return; 61 | } 62 | 63 | res.writeHead(404, { 'Content-Type': 'text/plain; charset=utf-8' }); 64 | res.end('404 Not Found'); 65 | }); 66 | 67 | server.listen(PORT, () => { 68 | console.log(`Server is running on port ${PORT}`); 69 | }); 70 | 71 | const wss = new (require('ws').Server)({ server }); 72 | const uuidkey = uuid.replace(/-/g, ""); 73 | wss.on('connection', ws => { 74 | ws.once('message', msg => { 75 | const [VERSION] = msg; 76 | const id = msg.slice(1, 17); 77 | if (!id.every((v, i) => v == parseInt(uuidkey.substr(i * 2, 2), 16))) return; 78 | let i = msg.slice(17, 18).readUInt8() + 19; 79 | const port = msg.slice(i, i += 2).readUInt16BE(0); 80 | const ATYP = msg.slice(i, i += 1).readUInt8(); 81 | const host = ATYP == 1 ? msg.slice(i, i += 4).join('.') : 82 | (ATYP == 2 ? new TextDecoder().decode(msg.slice(i + 1, i += 1 + msg.slice(i, i + 1).readUInt8())) : 83 | (ATYP == 3 ? msg.slice(i, i += 16) 84 | .reduce((s, b, i, a) => (i % 2 ? s.concat(a.slice(i - 1, i + 1)) : s), []) 85 | .map(b => b.readUInt16BE(0).toString(16)).join(':') : '')); 86 | ws.send(new Uint8Array([VERSION, 0])); 87 | const duplex = createWebSocketStream(ws); 88 | net.connect({ host, port }, function () { 89 | this.write(msg.slice(i)); 90 | duplex.on('error', () => { }).pipe(this).on('error', () => { }).pipe(duplex); 91 | }).on('error', () => { }); 92 | }).on('error', () => { }); 93 | }); 94 | -------------------------------------------------------------------------------- /saph.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LANG=en_US.UTF-8 3 | if ! command -v apk >/dev/null 2>&1 && ! command -v apt >/dev/null 2>&1; then 4 | echo "脚本仅支持Alpine、Debian、Ubuntu系统" && exit 5 | fi 6 | [[ $EUID -ne 0 ]] && echo "请以root模式运行脚本" && exit 7 | sapsbxinstall(){ 8 | URL="https://raw.githubusercontent.com/yonggekkk/argosbx/main/sapsbxh.sh" 9 | DEST="$HOME/sapsbxh.sh" 10 | command -v curl > /dev/null 2>&1 && curl -sSL $URL -o $DEST || wget -q $URL -O $DEST 11 | if [ -s "$HOME/sapsbxh.sh" ]; then 12 | chmod +x $HOME/sapsbxh.sh 13 | 14 | echo 15 | while true; do 16 | read -p "必填!请输入SAP邮箱账号(每个账号邮箱空一格): " input 17 | if [ -z "$input" ]; then 18 | echo "输入不能为空,请重新输入!" 19 | else 20 | break 21 | fi 22 | done 23 | quoted=$(printf '%s ' $input) 24 | sed -i "50s/^.*$/CF_USERNAMES=\"${quoted% }\"/" $HOME/sapsbxh.sh 25 | 26 | echo 27 | while true; do 28 | read -p "必填!请输入SAP密码(每个账号对应密码空一格): " input 29 | if [ -z "$input" ]; then 30 | echo "输入不能为空,请重新输入!" 31 | else 32 | break 33 | fi 34 | done 35 | quoted=$(printf '%s ' $input) 36 | sed -i "53s/^.*$/CF_PASSWORDS=\"${quoted% }\"/" $HOME/sapsbxh.sh 37 | 38 | echo 39 | while true; do 40 | read -p "必填!请输入SAP地区(详见地区变量对照表,每个账号对应地区空一格): " input 41 | if [ -z "$input" ]; then 42 | echo "输入不能为空,请重新输入!" 43 | else 44 | break 45 | fi 46 | done 47 | quoted=$(printf '%s ' $input) 48 | sed -i "56s/^.*$/REGIONS=\"${quoted% }\"/" $HOME/sapsbxh.sh 49 | 50 | echo 51 | while true; do 52 | read -p "必填!请输入UUID(每个账号对应UUID空一格): " input 53 | if [ -z "$input" ]; then 54 | echo "输入不能为空,请重新输入!" 55 | else 56 | break 57 | fi 58 | done 59 | quoted=$(printf '%s ' $input) 60 | sed -i "59s/^.*$/UUIDS=\"${quoted% }\"/" $HOME/sapsbxh.sh 61 | 62 | echo 63 | read -p "选填!请输入8:10-9:00点的保活时间间隔(单位:分钟,回车默认5分钟间隔): " input 64 | if [ -z "$input" ]; then 65 | sed -i "62s/^.*$/crontime=5/" $HOME/sapsbxh.sh 66 | else 67 | sed -i "62s/^.*$/crontime=$input/" $HOME/sapsbxh.sh 68 | fi 69 | echo "脚本安装设置完毕" 70 | echo "每天上午8:10-9:00之间脚本自动运行保活,可以再次进入脚本选择2测试执行一次" && sleep 3 71 | command -v curl > /dev/null 2>&1 && bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/saph.sh) || bash <(wget -qO- https://raw.githubusercontent.com/yonggekkk/argosbx/main/saph.sh) 72 | else 73 | echo "下载文件失败,请检查当前服务器是否支持curl或wget,网络是否支持github" 74 | fi 75 | } 76 | unins(){ 77 | echo "请稍等……" 78 | apt-get remove --purge -y cf8-cli >/dev/null 2>&1 79 | rm -rf /usr/local/bin/cf8 "$HOME"/{sapsbxh.sh,sap.log,saph.sh} 80 | crontab -l 2>/dev/null > /tmp/crontab.tmp 81 | sed -i '/sapsbx/d' /tmp/crontab.tmp >/dev/null 2>&1 82 | crontab /tmp/crontab.tmp 83 | rm /tmp/crontab.tmp 84 | echo "卸载完成" 85 | } 86 | goagain(){ 87 | if [ -s "$HOME/sapsbxh.sh" ]; then 88 | bash $HOME/sapsbxh.sh 89 | else 90 | echo "未安装脚本,请卸载重装" 91 | fi 92 | } 93 | showlog(){ 94 | if [ -s "$HOME/sap.log" ] && [ -s "$HOME/sapsbxh.sh" ]; then 95 | cat $HOME/sap.log 96 | else 97 | echo "无自动执行日志,请明天上午9点后再来看" 98 | fi 99 | } 100 | 101 | echo "*****************************************************" 102 | echo "*****************************************************" 103 | echo "甬哥Github项目 :github.com/yonggekkk" 104 | echo "甬哥Blogger博客 :ygkkk.blogspot.com" 105 | echo "甬哥YouTube频道 :www.youtube.com/@ygkkk" 106 | echo "Argosbx小钢炮脚本-SAP多账户自动保活脚本【VPS】" 107 | echo "版本:V25.10.19" 108 | echo "*****************************************************" 109 | echo "*****************************************************" 110 | cf_line=$(sed -n '50p' "$HOME/sapsbxh.sh" 2>/dev/null) 111 | cf_value=$(echo "$cf_line" | sed -E 's/CF_USERNAMES="(.*)"/\1/' | xargs 2>/dev/null) 112 | [ -z "$cf_value" ] && echo "当前未设置SAP变量,选择1添加变量" || { echo "当前已设置过SAP变量,详情如下显示,可选择2执行一次"; sed -n '47,64p' "$HOME/sapsbxh.sh" 2>/dev/null; } 113 | echo "*****************************************************" 114 | echo " 1. 安装脚本并添加/重置变量" 115 | echo " 2. 手动测试执行一次" 116 | echo " 3. 查看最近一次自动执行日志" 117 | echo " 4. 卸载脚本" 118 | echo " 0. 退出" 119 | read -p "请输入数字【0-4】:" Input 120 | case "$Input" in 121 | 1 ) sapsbxinstall;; 122 | 2 ) goagain;; 123 | 3 ) showlog;; 124 | 4 ) unins;; 125 | * ) exit 126 | esac 127 | -------------------------------------------------------------------------------- /SAP.md: -------------------------------------------------------------------------------- 1 | Argosbx在SAP平台部署代理节点,基于[eooce](https://github.com/eooce/Auto-deploy-sap-and-keepalive)相关功能现实,可用vless-ws-tls(cdn)、vmess-ws-argo-cdn、vmess-ws-tls-argo-cdn 2 | 3 | Vless-ws-tls为默认安装,Argo固定或临时隧道为可选,也可使用[workers/pages反代方式](https://github.com/yonggekkk/argosbx/blob/main/_worker.js)启用Vless-ws-tls的CDN替代Argo的CDN 4 | 5 | SAP个人注册地址:https://www.sap.com/products/technology-platform/trial.html 6 | 7 | ----------------------------------------- 8 | 9 | #### 注意:目前以下三种方式自动部署,方式二与三带保活!!! 10 | 11 | * 方式一:[Github方式](https://github.com/yonggekkk/argosbx/blob/main/.github/workflows/main.yml),请自建私库设置运行。安装启动同时进行,无定时保活 12 | 13 | * 方式二:Docker方式,镜像地址:```ygkkk/sapsbx```,可在clawcloud爪云等docker平台上运行。安装启动同时进行,自带8:10-9:00每5分钟的定时保活 14 | 15 | * 方式三:VPS服务器方式。安装启动同时进行,支持自定义8:10-9:00定时保活时间段间隔 16 | 17 | VPS服务器方式脚本地址:(再次进入快捷方式```bash sap.sh```): 18 | 19 | ```curl -sSL https://raw.githubusercontent.com/yonggekkk/argosbx/main/sap.sh -o sap.sh && chmod +x sap.sh && bash sap.sh``` 20 | 21 | 或者 22 | 23 | ```wget -q https://raw.githubusercontent.com/yonggekkk/argosbx/main/sap.sh -O sap.sh && chmod +x sap.sh && bash sap.sh``` 24 | 25 | ----------------------------------------- 26 | 27 | #### 注意:以下三种方式仅支持保活!仅```CF_USERNAMES ``` ```CF_PASSWORDS``` ```REGIONS``` ```UUIDS```四个变量可用且为必填 28 | 29 | * 方式一:[Github方式](https://github.com/yonggekkk/argosbx/blob/main/.github/workflows/mainh.yml),请自建私库设置运行。仅适用手动保活 30 | 31 | * 方式二:Docker方式,镜像地址:```ygkkk/sapsbxh```,可在clawcloud爪云等docker平台上运行。仅保活,自带8:10-9:00每5分钟的定时保活 32 | 33 | * 方式三:VPS服务器方式。仅保活,支持自定义8:10-9:00定时保活时间段间隔 34 | 35 | VPS服务器方式脚本地址:(再次进入快捷方式```bash saph.sh```): 36 | 37 | ```curl -sSL https://raw.githubusercontent.com/yonggekkk/argosbx/main/saph.sh -o saph.sh && chmod +x saph.sh && bash saph.sh``` 38 | 39 | 或者 40 | 41 | ```wget -q https://raw.githubusercontent.com/yonggekkk/argosbx/main/saph.sh -O saph.sh && chmod +x saph.sh && bash saph.sh``` 42 | 43 | ----------------------------------------- 44 | 45 | * 变量设置说明:每个变量的多个账号需按顺序依次对应填写,多个之间空一格,多个中如有个别留空则填```no```代替 46 | 47 | | 变量名称 | 变量值 | 是否必填 | 变量作用 | 48 | | :----- | :-------- | :-------- | :--- | 49 | | CF_USERNAMES | 单个或多个SAP账号邮箱 | 必填 | 登录账号 | 50 | | CF_PASSWORDS | 单个或多个SAP密码 | 必填 | 登录密码 | 51 | | REGIONS | 单个或多个地区变量代码 | 必填 | 登录实例地区 | 52 | | UUIDS | 单个或多个UUID | 必填 | 代理协议UUID | 53 | | APP_NAMES | 单个或多个应用程序app名称 | 可选,留空填```no```,则为地区码+邮箱 | 应用程序app名称 | 54 | | VMPTS | 单个或多个argo固定/临时隧道端口| 可选,留空填```no```,则关闭argo隧道 | 启用argo固定/临时隧道时必填 | 55 | | AGNS | 单个或多个argo固定隧道域名 | 可选,留空填```no```,则启用临时隧道 | 使用argo固定域名时必填 | 56 | | AGKS | 单个或多个argo固定隧道token | 可选,留空填```no```,则启用临时隧道 | 使用argo固定域名时必填 | 57 | | DELAPP | 单个或多个应用程序名app | 优先独立执行 | 删除指定应用程序app,github或docker执行后务必还原留空状态 | 58 | 59 | 60 | --------------------------------------- 61 | 62 | 视频教程:[🔥SAP搭建免费节点一条龙教程:多平台多账号搭建+保活一次搞定,支持Argo/workers/pags多种CDN方式](https://youtu.be/NRYZNKWoLj8) 63 | 64 | ----------------------------------------- 65 | 66 | 试用90天账户专区: 67 | 68 | | IP服务商 | 地区 | 国家城市 | REGIONS地区变量代码(大写) | 69 | | :----- | :-------- | :-------- | :--- | 70 | | Azure微软 | 亚洲 | 新加坡 | SG | 71 | | AWS亚马逊 | 北美 | 美国 | US | 72 | 73 | 74 | 企业账户专区: 75 | 76 | | IP服务商 | 地区 | 国家城市 | REGIONS地区变量代码(大写) | 77 | | :----- | :-------- | :---------- | :------ | 78 | | AWS亚马逊 | 亚洲 | 澳大利亚-悉尼 | AU-A | 79 | | AWS亚马逊 | 亚洲 | 日本-东京 | JP-A | 80 | | AWS亚马逊 | 亚洲 | 新加坡 | SG-A | 81 | | AWS亚马逊 | 亚洲 | 韩国-首尔 | KR-A | 82 | | AWS亚马逊 | 北美 | 加拿大-蒙特利尔 | CA-A | 83 | | AWS亚马逊 | 北美 | 美国-弗吉尼亚 | US-V-A | 84 | | AWS亚马逊 | 北美 | 美国-俄勒冈 | US-O-A | 85 | | AWS亚马逊 | 南美 | 巴西-圣保罗 | BR-A | 86 | | AWS亚马逊 | 欧洲 | 德国-法兰克福 | DE-A | 87 | | Google谷歌 | 亚洲 | 澳大利亚-悉尼 | AU-G | 88 | | Google谷歌 | 亚洲 | 日本-大阪 | JP-O-G | 89 | | Google谷歌 | 亚洲 | 日本-东京 | JP-T-G | 90 | | Google谷歌 | 亚洲 | 印度-孟买 | IN-G | 91 | | Google谷歌 | 亚洲 | 以色列-特拉维夫 | IL-G | 92 | | Google谷歌 | 亚洲 | 沙特-达曼 | SA-G | 93 | | Google谷歌 | 北美 | 美国-爱荷华 | US-G | 94 | | Google谷歌 | 南美 | 巴西-圣保罗 | BR-G | 95 | | Google谷歌 | 欧洲 | 德国-法兰克福 | DE-G | 96 | | Azure微软 | 亚洲 | 澳大利亚-悉尼 | AU-M | 97 | | Azure微软 | 亚洲 | 日本-东京 | JP-M | 98 | | Azure微软 | 亚洲 | 新加坡 | SG-M | 99 | | Azure微软 | 北美 | 加拿大-多伦多 | CA-M | 100 | | Azure微软 | 北美 | 美国-弗吉尼亚 | US-V-M | 101 | | Azure微软 | 北美 | 美国-华盛顿 | US-W-M | 102 | | Azure微软 | 南美 | 巴西-圣保罗 | BR-M | 103 | | Azure微软 | 欧洲 | 荷兰-阿姆斯特丹 | NL-M | 104 | | SAP | 亚洲 | 阿联酋-迪拜 | AE-N | 105 | | SAP | 亚洲 | 沙特-利雅得 | SA-N | 106 | -------------------------------------------------------------------------------- /sap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LANG=en_US.UTF-8 3 | if ! command -v apk >/dev/null 2>&1 && ! command -v apt >/dev/null 2>&1; then 4 | echo "脚本仅支持Alpine、Debian、Ubuntu系统" && exit 5 | fi 6 | [[ $EUID -ne 0 ]] && echo "请以root模式运行脚本" && exit 7 | sapsbxinstall(){ 8 | URL="https://raw.githubusercontent.com/yonggekkk/argosbx/main/sapsbx.sh" 9 | DEST="$HOME/sapsbx.sh" 10 | command -v curl > /dev/null 2>&1 && curl -sSL $URL -o $DEST || wget -q $URL -O $DEST 11 | if [ -s "$HOME/sapsbx.sh" ]; then 12 | chmod +x $HOME/sapsbx.sh 13 | 14 | echo 15 | while true; do 16 | read -p "必填!请输入SAP邮箱账号(每个账号邮箱空一格): " input 17 | if [ -z "$input" ]; then 18 | echo "输入不能为空,请重新输入!" 19 | else 20 | break 21 | fi 22 | done 23 | quoted=$(printf '%s ' $input) 24 | sed -i "50s/^.*$/CF_USERNAMES=\"${quoted% }\"/" $HOME/sapsbx.sh 25 | 26 | echo 27 | while true; do 28 | read -p "必填!请输入SAP密码(每个账号对应密码空一格): " input 29 | if [ -z "$input" ]; then 30 | echo "输入不能为空,请重新输入!" 31 | else 32 | break 33 | fi 34 | done 35 | quoted=$(printf '%s ' $input) 36 | sed -i "53s/^.*$/CF_PASSWORDS=\"${quoted% }\"/" $HOME/sapsbx.sh 37 | 38 | echo 39 | while true; do 40 | read -p "必填!请输入SAP地区(详见地区变量对照表,每个账号对应地区空一格): " input 41 | if [ -z "$input" ]; then 42 | echo "输入不能为空,请重新输入!" 43 | else 44 | break 45 | fi 46 | done 47 | quoted=$(printf '%s ' $input) 48 | sed -i "56s/^.*$/REGIONS=\"${quoted% }\"/" $HOME/sapsbx.sh 49 | 50 | echo 51 | while true; do 52 | read -p "必填!请输入UUID(每个账号对应UUID空一格): " input 53 | if [ -z "$input" ]; then 54 | echo "输入不能为空,请重新输入!" 55 | else 56 | break 57 | fi 58 | done 59 | quoted=$(printf '%s ' $input) 60 | sed -i "59s/^.*$/UUIDS=\"${quoted% }\"/" $HOME/sapsbx.sh 61 | 62 | echo 63 | echo "每个账号对应SAP应用程序名称APP空一格,回车则每个实例都自动生成,多个账号中有个别账号自动生成填no" 64 | read -p "选填!请输入SAP应用程序名称APP: " input 65 | if [ -z "$input" ]; then 66 | sed -i "62s/^.*$/APP_NAMES=\"\"/" $HOME/sapsbx.sh 67 | else 68 | quoted=$(printf '%s ' $input) 69 | sed -i "62s/^.*$/APP_NAMES=\"${quoted% }\"/" $HOME/sapsbx.sh 70 | fi 71 | 72 | echo 73 | echo "每个账号对应Argo隧道端口空一格,回车则每个实例都不启用Argo,多个账号中有个别账号不启用填no" 74 | read -p "选填!当使用Argo固定/临时隧道时,此端口变量必填: " input 75 | if [ -z "$input" ]; then 76 | sed -i "65s/^.*$/VMPTS=\"\"/" $HOME/sapsbx.sh 77 | sed -i "68s/^.*$/AGNS=\"\"/" $HOME/sapsbx.sh 78 | sed -i "71s/^.*$/AGKS=\"\"/" $HOME/sapsbx.sh 79 | else 80 | quoted=$(printf '%s ' $input) 81 | sed -i "65s/^.*$/VMPTS=\"${quoted% }\"/" $HOME/sapsbx.sh 82 | 83 | echo 84 | echo "每个账号对应Argo固定隧道域名空一格,回车则每个实例都启用Argo临时隧道,多个账号中有个别账号不启用填no" 85 | read -p "选填!Argo固定隧道域名: " input 86 | if [ -z "$input" ]; then 87 | sed -i "68s/^.*$/AGNS=\"\"/" $HOME/sapsbx.sh 88 | sed -i "71s/^.*$/AGKS=\"\"/" $HOME/sapsbx.sh 89 | else 90 | quoted=$(printf '%s ' $input) 91 | sed -i "68s/^.*$/AGNS=\"${quoted% }\"/" $HOME/sapsbx.sh 92 | 93 | while true; do 94 | echo 95 | echo "每个账号对应Argo固定隧道token空一格,个别账号不启用填no" 96 | read -p "选填!Argo固定隧道token: " input 97 | if [ -z "$input" ]; then 98 | echo "输入不能为空,请重新输入!" 99 | else 100 | break 101 | fi 102 | done 103 | quoted=$(printf '%s ' $input) 104 | sed -i "71s/^.*$/AGKS=\"${quoted% }\"/" $HOME/sapsbx.sh 105 | fi 106 | fi 107 | echo 108 | read -p "选填!请输入8:10-9:00点的保活时间间隔(单位:分钟,回车默认5分钟间隔): " input 109 | if [ -z "$input" ]; then 110 | sed -i "74s/^.*$/crontime=5/" $HOME/sapsbx.sh 111 | else 112 | sed -i "74s/^.*$/crontime=$input/" $HOME/sapsbx.sh 113 | fi 114 | echo "脚本安装设置完毕" 115 | echo "每天上午8:10-9:00之间脚本自动运行保活,可以再次进入脚本选择2测试执行一次" && sleep 3 116 | command -v curl > /dev/null 2>&1 && bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/sap.sh) || bash <(wget -qO- https://raw.githubusercontent.com/yonggekkk/argosbx/main/sap.sh) 117 | else 118 | echo "下载文件失败,请检查当前服务器是否支持curl或wget,网络是否支持github" 119 | fi 120 | } 121 | unins(){ 122 | echo "请稍等……" 123 | apt-get remove --purge -y cf8-cli >/dev/null 2>&1 124 | rm -rf /usr/local/bin/cf8 "$HOME"/{sapsbx.sh,sap.log,sap.sh} 125 | crontab -l 2>/dev/null > /tmp/crontab.tmp 126 | sed -i '/sapsbx/d' /tmp/crontab.tmp >/dev/null 2>&1 127 | crontab /tmp/crontab.tmp 128 | rm /tmp/crontab.tmp 129 | echo "卸载完成" 130 | } 131 | goagain(){ 132 | if [ -s "$HOME/sapsbx.sh" ]; then 133 | bash $HOME/sapsbx.sh 134 | else 135 | echo "未安装脚本,请卸载重装" 136 | fi 137 | } 138 | showlog(){ 139 | if [ -s "$HOME/sap.log" ] && [ -s "$HOME/sapsbx.sh" ]; then 140 | cat $HOME/sap.log 141 | else 142 | echo "无自动执行日志,请明天上午9点后再来看" 143 | fi 144 | } 145 | delapp(){ 146 | if [ -n "$cf_value" ]; then 147 | while true; do 148 | echo 149 | read -p "删除账户内的APP名称,多个APP空一格: " input 150 | if [ -z "$input" ]; then 151 | echo "输入不能为空,请重新输入!" 152 | else 153 | break 154 | fi 155 | done 156 | quoted=$(printf '%s ' $input) 157 | sed -i "79s/^.*$/DELAPP=\"${quoted% }\"/" $HOME/sapsbx.sh 158 | bash $HOME/sapsbx.sh 159 | sed -i "79s/^.*$/DELAPP=\"\"/" $HOME/sapsbx.sh 160 | else 161 | echo "未安装脚本,请卸载重装" 162 | fi 163 | } 164 | echo "*****************************************************" 165 | echo "*****************************************************" 166 | echo "甬哥Github项目 :github.com/yonggekkk" 167 | echo "甬哥Blogger博客 :ygkkk.blogspot.com" 168 | echo "甬哥YouTube频道 :www.youtube.com/@ygkkk" 169 | echo "Argosbx小钢炮脚本-SAP多账户自动部署并保活脚本【VPS】" 170 | echo "版本:V25.10.5" 171 | echo "*****************************************************" 172 | echo "*****************************************************" 173 | cf_line=$(sed -n '50p' "$HOME/sapsbx.sh" 2>/dev/null) 174 | cf_value=$(echo "$cf_line" | sed -E 's/CF_USERNAMES="(.*)"/\1/' | xargs 2>/dev/null) 175 | [ -z "$cf_value" ] && echo "当前未设置SAP变量,选择1添加变量" || { echo "当前已设置过SAP变量,详情如下显示,可选择2执行一次"; sed -n '47,76p' "$HOME/sapsbx.sh" 2>/dev/null; } 176 | echo "*****************************************************" 177 | echo " 1. 安装脚本并添加/重置变量" 178 | echo " 2. 手动测试执行一次" 179 | echo " 3. 查看最近一次自动执行日志" 180 | echo " 4. 删除已创建的应用程序名称APP" 181 | echo " 5. 卸载脚本" 182 | echo " 0. 退出" 183 | read -p "请输入数字【0-5】:" Input 184 | case "$Input" in 185 | 1 ) sapsbxinstall;; 186 | 2 ) goagain;; 187 | 3 ) showlog;; 188 | 4 ) delapp;; 189 | 5 ) unins;; 190 | * ) exit 191 | esac 192 | -------------------------------------------------------------------------------- /.github/workflows/mainh.yml: -------------------------------------------------------------------------------- 1 | name: SAP多账户仅保活 2 | # 请设为私库!!! 3 | on: 4 | workflow_dispatch: 5 | 6 | concurrency: 7 | group: keepalive 8 | cancel-in-progress: true 9 | 10 | jobs: 11 | deploy-app: 12 | runs-on: ubuntu-latest 13 | env: 14 | # 必填!每个账号邮箱空一格 15 | CF_USERNAMES: "" 16 | 17 | # 必填!每个账号对应密码空一格 18 | CF_PASSWORDS: "" 19 | 20 | # 必填!每个账号对应地区空一格 21 | REGIONS: "" 22 | 23 | # 必填!每个账号对应UUID空一格 24 | UUIDS: "" 25 | 26 | steps: 27 | - name: Checkout code 28 | uses: actions/checkout@v4 29 | 30 | - name: Install Cloud Foundry CLI 31 | run: | 32 | wget -q https://github.com/cloudfoundry/cli/releases/download/v8.16.0/cf8-cli_8.16.0_linux_x86-64.tgz 33 | tar -xzf cf8-cli_8.16.0_linux_x86-64.tgz 34 | sudo mv cf8 /usr/local/bin/cf8 35 | sudo ln -sf /usr/local/bin/cf8 /usr/local/bin/cf 36 | sudo chmod +x /usr/local/bin/cf8 37 | 38 | - name: deployment 39 | run: | 40 | read -ra CF_USERNAMES <<< "$CF_USERNAMES" 41 | read -ra CF_PASSWORDS <<< "$CF_PASSWORDS" 42 | read -ra REGIONS <<< "$REGIONS" 43 | read -ra UUIDS <<< "$UUIDS" 44 | echo "*****************************************************" 45 | echo "*****************************************************" 46 | echo "甬哥Github项目 :github.com/yonggekkk" 47 | echo "甬哥Blogger博客 :ygkkk.blogspot.com" 48 | echo "甬哥YouTube频道 :www.youtube.com/@ygkkk" 49 | echo "Argosbx小钢炮脚本-SAP多账户保活脚本【Github】" 50 | echo "版本:V25.10.19" 51 | echo "*****************************************************" 52 | echo "*****************************************************" 53 | pushout(){ 54 | if echo "$push_out" | grep -iq "insufficient"; then 55 | echo "🔴第 $((i+1)) 个实例部署:$apps 失败了,SAP资源被人抢光了,明早8:15-9:00再来吧,再见!!" 56 | return 1 57 | elif echo "$push_out" | grep -q "mapped"; then 58 | echo "🔴第 $((i+1)) 个实例部署:$apps 失败了,请更换应用程序APP名称:$apps,再运行一次" 59 | return 1 60 | elif echo "$push_out" | grep -q "FAILED"; then 61 | echo "🔴第 $((i+1)) 个实例部署:$apps 失败了,SAP繁忙中!请自查参数设置是否有误,后台实例是否超配额" 62 | return 1 63 | else 64 | echo "$apps 完成" 65 | return 0 66 | fi 67 | } 68 | result(){ 69 | ROUTE=$(cf app "$apps" | grep "routes:" | awk '{print $2}') 70 | url="https://$ROUTE/$UUID" 71 | if curl -s "$url" | grep -iq "requested"; then 72 | echo "🔴 $apps SAP创建失败,SAP资源被人抢光了,明早8:10-9:00再来吧,再见!!" 73 | return 1 74 | else 75 | echo "🚀第 $((i+1)) 个实例部署成功" 76 | echo "🟢实例名称: $apps" 77 | echo "🟢服务器地区: $REGION" 78 | echo "🌐点击打开代理节点的链接网址🔗: https://$ROUTE/$UUID" 79 | echo 80 | return 0 81 | fi 82 | } 83 | for i in "${!CF_USERNAMES[@]}"; do 84 | set +e 85 | CF_EMAIL="${CF_USERNAMES[$i]}" 86 | CF_PASSWORD="${CF_PASSWORDS[$i]}" 87 | REGION="${REGIONS[$i]}" 88 | UUID="${UUIDS[$i]}" 89 | case "$REGION" in 90 | SG) CF_API="https://api.cf.ap21.hana.ondemand.com" ;; 91 | US) CF_API="https://api.cf.us10-001.hana.ondemand.com" ;; 92 | AU-A) CF_API="https://api.cf.ap10.hana.ondemand.com" ;; 93 | BR-A) CF_API="https://api.cf.br10.hana.ondemand.com" ;; 94 | KR-A) CF_API="https://api.cf.ap12.hana.ondemand.com" ;; 95 | CA-A) CF_API="https://api.cf.ca10.hana.ondemand.com" ;; 96 | US-V-A) CF_API="https://api.cf.us10-001.hana.ondemand.com" ;; 97 | US-O-A) CF_API="https://api.cf.us11.hana.ondemand.com" ;; 98 | DE-A) CF_API="https://api.cf.eu10-005.hana.ondemand.com" ;; 99 | JP-A) CF_API="https://api.cf.jp10.hana.ondemand.com" ;; 100 | SG-A) CF_API="https://api.cf.ap11.hana.ondemand.com" ;; 101 | AU-G) CF_API="https://api.cf.ap30.hana.ondemand.com" ;; 102 | BR-G) CF_API="https://api.cf.br30.hana.ondemand.com" ;; 103 | US-G) CF_API="https://api.cf.us30.hana.ondemand.com" ;; 104 | DE-G) CF_API="https://api.cf.eu30.hana.ondemand.com" ;; 105 | JP-O-G) CF_API="https://api.cf.jp30.hana.ondemand.com" ;; 106 | JP-T-G) CF_API="https://api.cf.jp31.hana.ondemand.com" ;; 107 | IL-G) CF_API="https://api.cf.il30.hana.ondemand.com" ;; 108 | IN-G) CF_API="https://api.cf.in30.hana.ondemand.com" ;; 109 | SA-G) CF_API="https://api.cf.sa31.hana.ondemand.com" ;; 110 | AU-M) CF_API="https://api.cf.ap20.hana.ondemand.com" ;; 111 | BR-M) CF_API="https://api.cf.br20.hana.ondemand.com" ;; 112 | CA-M) CF_API="https://api.cf.ca20.hana.ondemand.com" ;; 113 | US-V-M) CF_API="https://api.cf.us21.hana.ondemand.com" ;; 114 | US-W-M) CF_API="https://api.cf.us20.hana.ondemand.com" ;; 115 | NL-M) CF_API="https://api.cf.eu20-001.hana.ondemand.com" ;; 116 | JP-M) CF_API="https://api.cf.jp20.hana.ondemand.com" ;; 117 | SG-M) CF_API="https://api.cf.ap21.hana.ondemand.com" ;; 118 | AE-N) CF_API="https://api.cf.neo-ae1.hana.ondemand.com" ;; 119 | SA-N) CF_API="https://api.cf.neo-sa1.hana.ondemand.com" ;; 120 | *) echo "未知区域: $REGION"; continue ;; 121 | esac 122 | echo "==============================================" 123 | echo "=========第 $((i+1)) 个实例开始启动============" 124 | echo "==============================================" 125 | cf login -a "$CF_API" -u "$CF_EMAIL" -p "$CF_PASSWORD" 126 | ORG=$(cf orgs | sed -n '4p') 127 | SPACE=$(cf spaces | sed -n '4p') 128 | cf target -o "$ORG" -s "$SPACE" 129 | echo "🔐 登录 SAP Cloud Foundry" 130 | apps=$(cf apps | awk 'NR>3 {print $1}' | grep -v '^$') 131 | ROUTE=$(cf app "$apps" | grep "routes:" | awk '{print $2}') 132 | if [ -n "$ROUTE" ]; then 133 | url="https://$ROUTE/$UUID" 134 | if curl -s "$url" | grep -iq "vless"; then 135 | echo "✅ $apps 正在运行中,跳过执行。" 136 | result 137 | continue 138 | else 139 | echo "🟡$apps 已部署,但未启动,现重启……" 140 | push_out="$(timeout 180 cf restart "$apps" 2>&1)" 141 | pushout 142 | if [ $? -ne 0 ]; then 143 | continue 144 | fi 145 | result 146 | continue 147 | fi 148 | else 149 | echo "🔴$apps 部署未成功,请自查参数设置是否有误,空间是否被删除" 150 | fi 151 | done 152 | -------------------------------------------------------------------------------- /sapsbxh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LANG=en_US.UTF-8 3 | if ! command -v cf8 >/dev/null 2>&1; then 4 | if command -v apk >/dev/null 2>&1; then 5 | apk add --no-cache curl tar bash 6 | curl -L "https://github.com/cloudfoundry/cli/releases/download/v8.16.0/cf8-cli_8.16.0_linux_x86-64.tgz" | tar -xz -C /usr/local/bin 7 | chmod +x /usr/local/bin/cf8 8 | elif command -v apt >/dev/null 2>&1; then 9 | apt-get update && apt-get install -y wget gnupg 10 | wget -qO- https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/cloudfoundry-cli-archive-keyring.gpg 11 | echo "deb [signed-by=/usr/share/keyrings/cloudfoundry-cli-archive-keyring.gpg] https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list > /dev/null 12 | apt-get update && apt-get install -y cf8-cli 13 | else 14 | echo "脚本仅支持Alpine、Debian、Ubuntu系统" 15 | exit 1 16 | fi 17 | fi 18 | 19 | if command -v apt >/dev/null 2>&1; then 20 | if ! dpkg -l tzdata >/dev/null 2>&1; then 21 | apt-get update -y >/dev/null 2>&1 && apt-get install -y tzdata >/dev/null 2>&1 22 | ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime >/dev/null 2>&1 23 | fi 24 | elif command -v apk >/dev/null 2>&1; then 25 | if ! apk info | grep tzdata >/dev/null 2>&1; then 26 | apk add --no-cache tzdata >/dev/null 2>&1 27 | cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime >/dev/null 2>&1 28 | echo "Asia/Shanghai" > /etc/timezone >/dev/null 2>&1 29 | fi 30 | fi 31 | 32 | if ! command -v crond >/dev/null 2>&1; then 33 | if command -v apk >/dev/null 2>&1; then 34 | apk add --no-cache cronie >/dev/null 2>&1 35 | rc-update add crond >/dev/null 2>&1 && rc-service crond start >/dev/null 2>&1 36 | fi 37 | elif ! command -v cron >/dev/null 2>&1; then 38 | if command -v apt >/dev/null 2>&1; then 39 | apt-get update -y >/dev/null 2>&1 && apt-get install -y cron >/dev/null 2>&1 40 | fi 41 | fi 42 | 43 | echo "*************************************" 44 | echo "中国时间 $(date): SAP开始执行任务" 45 | echo "运行cat $HOME/sap.log查看最近一次定时执行日志" 46 | echo "*************************************" 47 | # 设置区===================================================================== 48 | 49 | # 必填!每个账号邮箱空一格 50 | CF_USERNAMES="" 51 | 52 | # 必填!每个账号对应密码空一格 53 | CF_PASSWORDS="" 54 | 55 | # 必填!每个账号对应地区空一格 56 | REGIONS="" 57 | 58 | # 必填!每个账号对应UUID空一格 59 | UUIDS="" 60 | 61 | # 8-9点保活时间间隔,单位:分钟 62 | crontime=5 63 | 64 | # 设置区===================================================================== 65 | 66 | echo "*****************************************************" 67 | echo "*****************************************************" 68 | echo "甬哥Github项目 :github.com/yonggekkk" 69 | echo "甬哥Blogger博客 :ygkkk.blogspot.com" 70 | echo "甬哥YouTube频道 :www.youtube.com/@ygkkk" 71 | echo "Argosbx小钢炮脚本-SAP多账户自动保活脚本【VPS】" 72 | echo "版本:V25.10.19" 73 | echo "*****************************************************" 74 | echo "*****************************************************" 75 | read -ra CF_USERNAMES <<< "$CF_USERNAMES" 76 | read -ra CF_PASSWORDS <<< "$CF_PASSWORDS" 77 | read -ra REGIONS <<< "$REGIONS" 78 | read -ra UUIDS <<< "$UUIDS" 79 | jbpath=$(readlink -f "$0") 80 | crontab -l 2>/dev/null > /tmp/crontab.tmp 81 | sed -i "\|$jbpath|d" /tmp/crontab.tmp 82 | echo "10-59/${crontime} 8 * * * /bin/bash $jbpath > $HOME/sap.log 2>&1" >> /tmp/crontab.tmp 83 | crontab /tmp/crontab.tmp 84 | rm /tmp/crontab.tmp 85 | pushout(){ 86 | if echo "$push_out" | grep -iq "insufficient"; then 87 | echo "🔴第 $((i+1)) 个实例部署:$apps 失败了,SAP资源被人抢光了,明早8:15-9:00再来吧,再见!!" 88 | return 1 89 | elif echo "$push_out" | grep -q "mapped"; then 90 | echo "🔴第 $((i+1)) 个实例部署:$apps 失败了,请更换应用程序APP名称:$apps,再运行一次" 91 | return 1 92 | elif echo "$push_out" | grep -q "FAILED"; then 93 | echo "🔴第 $((i+1)) 个实例部署:$apps 失败了,SAP繁忙中!请自查参数设置是否有误,后台实例是否超配额" 94 | return 1 95 | else 96 | echo "$apps 完成" 97 | return 0 98 | fi 99 | } 100 | result(){ 101 | ROUTE=$(cf app "$apps" | grep "routes:" | awk '{print $2}') 102 | url="https://$ROUTE/$UUID" 103 | if curl -s "$url" | grep -iq "requested"; then 104 | echo "🔴 $apps SAP创建失败,SAP资源被人抢光了,明早8:10-9:00再来吧,再见!!" 105 | return 1 106 | else 107 | echo "🚀第 $((i+1)) 个实例部署成功" 108 | echo "🟢实例名称: $apps" 109 | echo "🟢服务器地区: $REGION" 110 | echo "🌐点击打开代理节点的链接网址🔗: https://$ROUTE/$UUID" 111 | echo 112 | return 0 113 | fi 114 | } 115 | for i in "${!CF_USERNAMES[@]}"; do 116 | set +e 117 | CF_EMAIL="${CF_USERNAMES[$i]}" 118 | CF_PASSWORD="${CF_PASSWORDS[$i]}" 119 | REGION="${REGIONS[$i]}" 120 | UUID="${UUIDS[$i]}" 121 | case "$REGION" in 122 | SG) CF_API="https://api.cf.ap21.hana.ondemand.com" ;; 123 | US) CF_API="https://api.cf.us10-001.hana.ondemand.com" ;; 124 | AU-A) CF_API="https://api.cf.ap10.hana.ondemand.com" ;; 125 | BR-A) CF_API="https://api.cf.br10.hana.ondemand.com" ;; 126 | KR-A) CF_API="https://api.cf.ap12.hana.ondemand.com" ;; 127 | CA-A) CF_API="https://api.cf.ca10.hana.ondemand.com" ;; 128 | US-V-A) CF_API="https://api.cf.us10-001.hana.ondemand.com" ;; 129 | US-O-A) CF_API="https://api.cf.us11.hana.ondemand.com" ;; 130 | DE-A) CF_API="https://api.cf.eu10-005.hana.ondemand.com" ;; 131 | JP-A) CF_API="https://api.cf.jp10.hana.ondemand.com" ;; 132 | SG-A) CF_API="https://api.cf.ap11.hana.ondemand.com" ;; 133 | AU-G) CF_API="https://api.cf.ap30.hana.ondemand.com" ;; 134 | BR-G) CF_API="https://api.cf.br30.hana.ondemand.com" ;; 135 | US-G) CF_API="https://api.cf.us30.hana.ondemand.com" ;; 136 | DE-G) CF_API="https://api.cf.eu30.hana.ondemand.com" ;; 137 | JP-O-G) CF_API="https://api.cf.jp30.hana.ondemand.com" ;; 138 | JP-T-G) CF_API="https://api.cf.jp31.hana.ondemand.com" ;; 139 | IL-G) CF_API="https://api.cf.il30.hana.ondemand.com" ;; 140 | IN-G) CF_API="https://api.cf.in30.hana.ondemand.com" ;; 141 | SA-G) CF_API="https://api.cf.sa31.hana.ondemand.com" ;; 142 | AU-M) CF_API="https://api.cf.ap20.hana.ondemand.com" ;; 143 | BR-M) CF_API="https://api.cf.br20.hana.ondemand.com" ;; 144 | CA-M) CF_API="https://api.cf.ca20.hana.ondemand.com" ;; 145 | US-V-M) CF_API="https://api.cf.us21.hana.ondemand.com" ;; 146 | US-W-M) CF_API="https://api.cf.us20.hana.ondemand.com" ;; 147 | NL-M) CF_API="https://api.cf.eu20-001.hana.ondemand.com" ;; 148 | JP-M) CF_API="https://api.cf.jp20.hana.ondemand.com" ;; 149 | SG-M) CF_API="https://api.cf.ap21.hana.ondemand.com" ;; 150 | AE-N) CF_API="https://api.cf.neo-ae1.hana.ondemand.com" ;; 151 | SA-N) CF_API="https://api.cf.neo-sa1.hana.ondemand.com" ;; 152 | *) echo "未知区域: $REGION"; continue ;; 153 | esac 154 | echo "==============================================" 155 | echo "=========第 $((i+1)) 个实例开始启动============" 156 | echo "==============================================" 157 | cf login -a "$CF_API" -u "$CF_EMAIL" -p "$CF_PASSWORD" 158 | ORG=$(cf orgs | sed -n '4p') 159 | SPACE=$(cf spaces | sed -n '4p') 160 | cf target -o "$ORG" -s "$SPACE" 161 | echo "🔐 登录 SAP Cloud Foundry" 162 | apps=$(cf apps | awk 'NR>3 {print $1}' | grep -v '^$') 163 | ROUTE=$(cf app "$apps" | grep "routes:" | awk '{print $2}') 164 | if [ -n "$ROUTE" ]; then 165 | url="https://$ROUTE/$UUID" 166 | if curl -s "$url" | grep -iq "vless"; then 167 | echo "✅ $apps 正在运行中,跳过执行。" 168 | result 169 | continue 170 | else 171 | echo "🟡$apps 已部署,但未启动,现重启……" 172 | push_out="$(timeout 180 cf restart "$apps" 2>&1)" 173 | pushout 174 | if [ $? -ne 0 ]; then 175 | continue 176 | fi 177 | result 178 | continue 179 | fi 180 | else 181 | echo "🔴$apps 部署未成功,请自查参数设置是否有误,空间是否被删除" 182 | fi 183 | done 184 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: SAP多账户自动部署 2 | # 请设为私库!!! 3 | on: 4 | workflow_dispatch: 5 | 6 | concurrency: 7 | group: keepalive 8 | cancel-in-progress: true 9 | 10 | jobs: 11 | deploy-app: 12 | runs-on: ubuntu-latest 13 | env: 14 | # 必填!每个账号邮箱空一格 15 | CF_USERNAMES: "" 16 | 17 | # 必填!每个账号对应密码空一格 18 | CF_PASSWORDS: "" 19 | 20 | # 必填!每个账号对应地区空一格 21 | REGIONS: "" 22 | 23 | # 必填!每个账号对应UUID空一格 24 | UUIDS: "" 25 | 26 | # 选填!每个账号对应名称空一格,不填则每个实例自动生成,多个账号中有个别账号自动生成填no 27 | APP_NAMES: "" 28 | 29 | # 选填!Argo固定/临时隧道端口,每个账号对应端口空一格,不填则每个实例不启用argo,多个账号中有个别账号不启用填no 30 | VMPTS: "" 31 | 32 | # 选填!Argo固定隧道域名,每个账号对应域名空一格,不填则每个实例启用argo临时隧道,多个账号中有个别账号不启用填no 33 | AGNS: "" 34 | 35 | # 选填!Argo固定隧道token,每个账号对应token空一格,不填则每个实例启用argo临时隧道,多个账号中有个别账号不启用填no 36 | AGKS: "" 37 | 38 | # 优先独立执行!删除账户内的APP名称,多个APP空一格,执行后务必还原留空状态:DELAPP: "" 39 | DELAPP: "" 40 | 41 | steps: 42 | - name: Checkout code 43 | uses: actions/checkout@v4 44 | 45 | - name: Install Cloud Foundry CLI 46 | run: | 47 | wget -q https://github.com/cloudfoundry/cli/releases/download/v8.16.0/cf8-cli_8.16.0_linux_x86-64.tgz 48 | tar -xzf cf8-cli_8.16.0_linux_x86-64.tgz 49 | sudo mv cf8 /usr/local/bin/cf8 50 | sudo ln -sf /usr/local/bin/cf8 /usr/local/bin/cf 51 | sudo chmod +x /usr/local/bin/cf8 52 | 53 | - name: deployment 54 | run: | 55 | read -ra CF_USERNAMES <<< "$CF_USERNAMES" 56 | read -ra CF_PASSWORDS <<< "$CF_PASSWORDS" 57 | read -ra REGIONS <<< "$REGIONS" 58 | read -ra UUIDS <<< "$UUIDS" 59 | read -ra APP_NAMES <<< "$APP_NAMES" 60 | read -ra VMPTS <<< "$VMPTS" 61 | read -ra AGNS <<< "$AGNS" 62 | read -ra AGKS <<< "$AGKS" 63 | echo "*****************************************************" 64 | echo "*****************************************************" 65 | echo "甬哥Github项目 :github.com/yonggekkk" 66 | echo "甬哥Blogger博客 :ygkkk.blogspot.com" 67 | echo "甬哥YouTube频道 :www.youtube.com/@ygkkk" 68 | echo "Argosbx小钢炮脚本-SAP多账户自动部署并保活脚本【Github】" 69 | echo "版本:V25.10.5" 70 | echo "*****************************************************" 71 | echo "*****************************************************" 72 | pushout(){ 73 | if echo "$push_out" | grep -iq "insufficient"; then 74 | echo "🔴第 $((i+1)) 个实例部署:${APP_NAME} 失败了,SAP资源被人抢光了,明早8:10-9:00再来吧,再见!!" 75 | return 1 76 | elif echo "$push_out" | grep -q "mapped"; then 77 | echo "🔴第 $((i+1)) 个实例部署:${APP_NAME} 失败了,请更换应用程序APP名称:${APP_NAME},再运行一次" 78 | return 1 79 | elif echo "$push_out" | grep -q "FAILED"; then 80 | echo "🔴第 $((i+1)) 个实例部署:${APP_NAME} 失败了,SAP繁忙中!请自查参数设置是否有误,空间是否被删除" 81 | return 1 82 | else 83 | echo "${APP_NAME} 完成" 84 | return 0 85 | fi 86 | } 87 | sapcfevn(){ 88 | cf set-env "$APP_NAME" uuid "$UUID" 89 | if [ -n "$VMPT" ]; then 90 | cf set-env "$APP_NAME" agn "$AGN" 91 | cf set-env "$APP_NAME" agk "$AGK" 92 | cf set-env "$APP_NAME" vmpt "$VMPT" 93 | cf set-env "$APP_NAME" argo "y" 94 | fi 95 | ROUTE=$(cf app "$APP_NAME" | grep "routes:" | awk '{print $2}') 96 | cf set-env "$APP_NAME" DOMAIN "$ROUTE" 97 | } 98 | result(){ 99 | ROUTE=$(cf app "$APP_NAME" | grep "routes:" | awk '{print $2}') 100 | url="https://$ROUTE/$UUID" 101 | if curl -s "$url" | grep -iq "requested"; then 102 | echo "🔴 ${APP_NAME} SAP创建失败,SAP资源被人抢光了,明早8:10-9:00再来吧,再见!!" 103 | return 1 104 | else 105 | echo "🚀第 $((i+1)) 个实例部署成功" 106 | echo "🟢实例名称: $APP_NAME" 107 | echo "🟢服务器地区: $REGION" 108 | echo "🌐点击打开代理节点的链接网址🔗: https://$ROUTE/$UUID" 109 | echo 110 | return 0 111 | fi 112 | } 113 | for i in "${!CF_USERNAMES[@]}"; do 114 | set +e 115 | CF_EMAIL="${CF_USERNAMES[$i]}" 116 | CF_PASSWORD="${CF_PASSWORDS[$i]}" 117 | REGION="${REGIONS[$i]}" 118 | UUID="${UUIDS[$i]}" 119 | APP_NAME="${APP_NAMES[$i]}" 120 | VMPT="${VMPTS[$i]}" 121 | AGN="${AGNS[$i]}" 122 | AGK="${AGKS[$i]}" 123 | [ "$APP_NAME" = "no" ] && APP_NAME="" 124 | [ "$VMPT" = "no" ] && VMPT="" 125 | [ "$AGN" = "no" ] && AGN="" 126 | [ "$AGK" = "no" ] && AGK="" 127 | case "$REGION" in 128 | SG) CF_API="https://api.cf.ap21.hana.ondemand.com"; serv="sg" ;; 129 | US) CF_API="https://api.cf.us10-001.hana.ondemand.com"; serv="us" ;; 130 | AU-A) CF_API="https://api.cf.ap10.hana.ondemand.com"; serv="au-a" ;; 131 | BR-A) CF_API="https://api.cf.br10.hana.ondemand.com"; serv="br-a" ;; 132 | KR-A) CF_API="https://api.cf.ap12.hana.ondemand.com"; serv="us-a" ;; 133 | CA-A) CF_API="https://api.cf.ca10.hana.ondemand.com"; serv="us-a" ;; 134 | US-V-A) CF_API="https://api.cf.us10-001.hana.ondemand.com"; serv="us-v-a" ;; 135 | US-O-A) CF_API="https://api.cf.us11.hana.ondemand.com"; serv="us-o-a" ;; 136 | DE-A) CF_API="https://api.cf.eu10-005.hana.ondemand.com"; serv="de-a" ;; 137 | JP-A) CF_API="https://api.cf.jp10.hana.ondemand.com"; serv="jp-a" ;; 138 | SG-A) CF_API="https://api.cf.ap11.hana.ondemand.com"; serv="sg-a" ;; 139 | AU-G) CF_API="https://api.cf.ap30.hana.ondemand.com"; serv="au-g" ;; 140 | BR-G) CF_API="https://api.cf.br30.hana.ondemand.com"; serv="br-g" ;; 141 | US-G) CF_API="https://api.cf.us30.hana.ondemand.com"; serv="us-g" ;; 142 | DE-G) CF_API="https://api.cf.eu30.hana.ondemand.com"; serv="de-g" ;; 143 | JP-O-G) CF_API="https://api.cf.jp30.hana.ondemand.com"; serv="jp-o-g" ;; 144 | JP-T-G) CF_API="https://api.cf.jp31.hana.ondemand.com"; serv="jp-t-g" ;; 145 | IL-G) CF_API="https://api.cf.il30.hana.ondemand.com"; serv="il-g" ;; 146 | IN-G) CF_API="https://api.cf.in30.hana.ondemand.com"; serv="in-g" ;; 147 | SA-G) CF_API="https://api.cf.sa31.hana.ondemand.com"; serv="sa-g" ;; 148 | AU-M) CF_API="https://api.cf.ap20.hana.ondemand.com"; serv="au-m" ;; 149 | BR-M) CF_API="https://api.cf.br20.hana.ondemand.com"; serv="br-m" ;; 150 | CA-M) CF_API="https://api.cf.ca20.hana.ondemand.com"; serv="ca-m" ;; 151 | US-V-M) CF_API="https://api.cf.us21.hana.ondemand.com"; serv="us-v-m" ;; 152 | US-W-M) CF_API="https://api.cf.us20.hana.ondemand.com"; serv="us-w-m" ;; 153 | NL-M) CF_API="https://api.cf.eu20-001.hana.ondemand.com"; serv="nl-m" ;; 154 | JP-M) CF_API="https://api.cf.jp20.hana.ondemand.com"; serv="jp-m" ;; 155 | SG-M) CF_API="https://api.cf.ap21.hana.ondemand.com"; serv="sg-m" ;; 156 | AE-N) CF_API="https://api.cf.neo-ae1.hana.ondemand.com"; serv="ae-n" ;; 157 | SA-N) CF_API="https://api.cf.neo-sa1.hana.ondemand.com"; serv="sa-n" ;; 158 | *) echo "未知区域: $REGION"; continue ;; 159 | esac 160 | if [ -z "$APP_NAME" ]; then 161 | APP_NAME="sap-$serv-${CF_EMAIL//[^a-zA-Z0-9_-]/-}" 162 | else 163 | APP_NAME="${APP_NAME//[^a-zA-Z0-9_-]/-}" 164 | fi 165 | echo "==============================================" 166 | echo "=========第 $((i+1)) 个实例开始启动============" 167 | echo "==============================================" 168 | cf login -a "$CF_API" -u "$CF_EMAIL" -p "$CF_PASSWORD" 169 | ORG=$(cf orgs | sed -n '4p') 170 | SPACE=$(cf spaces | sed -n '4p') 171 | cf target -o "$ORG" -s "$SPACE" 172 | echo "🔐 登录 SAP Cloud Foundry" 173 | if [ -n "$DELAPP" ]; then 174 | for app in $DELAPP; do 175 | cf delete "$app" -r -f 176 | done 177 | else 178 | ROUTE=$(cf app "$APP_NAME" | grep "routes:" | awk '{print $2}') 179 | if [ -n "$ROUTE" ]; then 180 | url="https://$ROUTE/$UUID" 181 | if curl -s "$url" | grep -iq "vless"; then 182 | echo "✅ ${APP_NAME} SAP正在运行中,跳过执行。" 183 | result 184 | continue 185 | else 186 | echo "🟡${APP_NAME} 已部署,但未启动,现重启……" 187 | sapcfevn 188 | push_out="$(timeout 180 cf restart "$APP_NAME" 2>&1)" 189 | echo $push_out 190 | pushout 191 | if [ $? -ne 0 ]; then 192 | continue 193 | fi 194 | result 195 | continue 196 | fi 197 | else 198 | echo "🟡${APP_NAME} 未部署,开始部署……" 199 | push_out="$(timeout 180 cf push "$APP_NAME" --docker-image ygkkk/argosbx -m 512M --health-check-type port 2>&1)" 200 | echo $push_out 201 | pushout 202 | if [ $? -ne 0 ]; then 203 | continue 204 | fi 205 | sapcfevn 206 | cf restage "$APP_NAME" 207 | cf app "$APP_NAME" 208 | result 209 | fi 210 | fi 211 | done 212 | -------------------------------------------------------------------------------- /sapsbx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LANG=en_US.UTF-8 3 | if ! command -v cf8 >/dev/null 2>&1; then 4 | if command -v apk >/dev/null 2>&1; then 5 | apk add --no-cache curl tar bash 6 | curl -L "https://github.com/cloudfoundry/cli/releases/download/v8.16.0/cf8-cli_8.16.0_linux_x86-64.tgz" | tar -xz -C /usr/local/bin 7 | chmod +x /usr/local/bin/cf8 8 | elif command -v apt >/dev/null 2>&1; then 9 | apt-get update && apt-get install -y wget gnupg 10 | wget -qO- https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/cloudfoundry-cli-archive-keyring.gpg 11 | echo "deb [signed-by=/usr/share/keyrings/cloudfoundry-cli-archive-keyring.gpg] https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list > /dev/null 12 | apt-get update && apt-get install -y cf8-cli 13 | else 14 | echo "脚本仅支持Alpine、Debian、Ubuntu系统" 15 | exit 1 16 | fi 17 | fi 18 | 19 | if command -v apt >/dev/null 2>&1; then 20 | if ! dpkg -l tzdata >/dev/null 2>&1; then 21 | apt-get update -y >/dev/null 2>&1 && apt-get install -y tzdata >/dev/null 2>&1 22 | ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime >/dev/null 2>&1 23 | fi 24 | elif command -v apk >/dev/null 2>&1; then 25 | if ! apk info | grep tzdata >/dev/null 2>&1; then 26 | apk add --no-cache tzdata >/dev/null 2>&1 27 | cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime >/dev/null 2>&1 28 | echo "Asia/Shanghai" > /etc/timezone >/dev/null 2>&1 29 | fi 30 | fi 31 | 32 | if ! command -v crond >/dev/null 2>&1; then 33 | if command -v apk >/dev/null 2>&1; then 34 | apk add --no-cache cronie >/dev/null 2>&1 35 | rc-update add crond >/dev/null 2>&1 && rc-service crond start >/dev/null 2>&1 36 | fi 37 | elif ! command -v cron >/dev/null 2>&1; then 38 | if command -v apt >/dev/null 2>&1; then 39 | apt-get update -y >/dev/null 2>&1 && apt-get install -y cron >/dev/null 2>&1 40 | fi 41 | fi 42 | 43 | echo "*************************************" 44 | echo "中国时间 $(date): SAP开始执行任务" 45 | echo "运行cat $HOME/sap.log查看最近一次定时执行日志" 46 | echo "*************************************" 47 | # 设置区===================================================================== 48 | 49 | # 必填!每个账号邮箱空一格 50 | CF_USERNAMES="" 51 | 52 | # 必填!每个账号对应密码空一格 53 | CF_PASSWORDS="" 54 | 55 | # 必填!每个账号对应地区空一格 56 | REGIONS="" 57 | 58 | # 必填!每个账号对应UUID空一格 59 | UUIDS="" 60 | 61 | # 选填!每个账号对应的应用程序名称APP空一格,不填则每个实例都自动生成,多个账号中有个别账号自动生成填no 62 | APP_NAMES="" 63 | 64 | # 选填!当使用Argo固定/临时隧道时,此端口变量必填,每个账号对应端口空一格,不填则每个实例都不启用argo,多个账号中有个别账号不启用填no 65 | VMPTS="" 66 | 67 | # 选填!Argo固定隧道域名,每个账号对应域名空一格,不填则每个实例都启用argo临时隧道,多个账号中有个别账号不启用填no 68 | AGNS="" 69 | 70 | # 选填!Argo固定隧道token,每个账号对应token空一格,不填则每个实例都启用argo临时隧道,多个账号中有个别账号不启用填no 71 | AGKS="" 72 | 73 | # 8-9点保活时间间隔,单位:分钟 74 | crontime=5 75 | 76 | # 设置区===================================================================== 77 | 78 | # 优先独立执行!删除账户内的APP名称,多个APP空一格,执行后务必还原留空状态:DELAPP="" 79 | DELAPP="" 80 | 81 | echo "*****************************************************" 82 | echo "*****************************************************" 83 | echo "甬哥Github项目 :github.com/yonggekkk" 84 | echo "甬哥Blogger博客 :ygkkk.blogspot.com" 85 | echo "甬哥YouTube频道 :www.youtube.com/@ygkkk" 86 | echo "Argosbx小钢炮脚本-SAP多账户自动部署并保活脚本【VPS】" 87 | echo "版本:V25.10.5" 88 | echo "*****************************************************" 89 | echo "*****************************************************" 90 | read -ra CF_USERNAMES <<< "$CF_USERNAMES" 91 | read -ra CF_PASSWORDS <<< "$CF_PASSWORDS" 92 | read -ra REGIONS <<< "$REGIONS" 93 | read -ra UUIDS <<< "$UUIDS" 94 | read -ra APP_NAMES <<< "$APP_NAMES" 95 | read -ra VMPTS <<< "$VMPTS" 96 | read -ra AGNS <<< "$AGNS" 97 | read -ra AGKS <<< "$AGKS" 98 | jbpath=$(readlink -f "$0") 99 | crontab -l 2>/dev/null > /tmp/crontab.tmp 100 | sed -i "\|$jbpath|d" /tmp/crontab.tmp 101 | echo "10-59/${crontime} 8 * * * /bin/bash $jbpath > $HOME/sap.log 2>&1" >> /tmp/crontab.tmp 102 | crontab /tmp/crontab.tmp 103 | rm /tmp/crontab.tmp 104 | pushout() { 105 | if echo "$push_out" | grep -iq "insufficient"; then 106 | echo "🔴第 $((i+1)) 个实例部署:${APP_NAME} 失败了,SAP资源被人抢光了,明早8:10-9:00再来吧,再见!!" 107 | return 1 108 | elif echo "$push_out" | grep -q "mapped"; then 109 | echo "🔴第 $((i+1)) 个实例部署:${APP_NAME} 失败了,请更换应用程序APP名称:${APP_NAME},再运行一次" 110 | return 1 111 | elif echo "$push_out" | grep -q "FAILED"; then 112 | echo "🔴第 $((i+1)) 个实例部署:${APP_NAME} 失败了,SAP繁忙中!请自查参数设置是否有误,空间是否被删除" 113 | return 1 114 | else 115 | echo "${APP_NAME} 完成" 116 | return 0 117 | fi 118 | } 119 | sapcfevn() { 120 | cf set-env "$APP_NAME" uuid "$UUID" 121 | if [ -n "$VMPT" ]; then 122 | cf set-env "$APP_NAME" agn "$AGN" 123 | cf set-env "$APP_NAME" agk "$AGK" 124 | cf set-env "$APP_NAME" vmpt "$VMPT" 125 | cf set-env "$APP_NAME" argo "y" 126 | fi 127 | ROUTE=$(cf app "$APP_NAME" | grep "routes:" | awk '{print $2}') 128 | cf set-env "$APP_NAME" DOMAIN "$ROUTE" 129 | } 130 | result() { 131 | ROUTE=$(cf app "$APP_NAME" | grep "routes:" | awk '{print $2}') 132 | url="https://$ROUTE/$UUID" 133 | if curl -s "$url" | grep -iq "requested"; then 134 | echo "🔴 ${APP_NAME} SAP创建失败,SAP资源被人抢光了,明早8:10-9:00再来吧,再见!!" 135 | return 1 136 | else 137 | echo "🚀第 $((i+1)) 个实例部署成功" 138 | echo "🟢实例名称: $APP_NAME" 139 | echo "🟢服务器地区: $REGION" 140 | echo "🌐点击打开代理节点的链接网址🔗: https://$ROUTE/$UUID" 141 | echo 142 | return 0 143 | fi 144 | } 145 | for i in "${!CF_USERNAMES[@]}"; do 146 | set +e 147 | CF_EMAIL="${CF_USERNAMES[$i]}" 148 | CF_PASSWORD="${CF_PASSWORDS[$i]}" 149 | REGION="${REGIONS[$i]}" 150 | UUID="${UUIDS[$i]}" 151 | APP_NAME="${APP_NAMES[$i]}" 152 | VMPT="${VMPTS[$i]}" 153 | AGN="${AGNS[$i]}" 154 | AGK="${AGKS[$i]}" 155 | [ "$APP_NAME" = "no" ] && APP_NAME="" 156 | [ "$VMPT" = "no" ] && VMPT="" 157 | [ "$AGN" = "no" ] && AGN="" 158 | [ "$AGK" = "no" ] && AGK="" 159 | case "$REGION" in 160 | SG) CF_API="https://api.cf.ap21.hana.ondemand.com"; serv="sg" ;; 161 | US) CF_API="https://api.cf.us10-001.hana.ondemand.com"; serv="us" ;; 162 | AU-A) CF_API="https://api.cf.ap10.hana.ondemand.com"; serv="au-a" ;; 163 | BR-A) CF_API="https://api.cf.br10.hana.ondemand.com"; serv="br-a" ;; 164 | KR-A) CF_API="https://api.cf.ap12.hana.ondemand.com"; serv="us-a" ;; 165 | CA-A) CF_API="https://api.cf.ca10.hana.ondemand.com"; serv="us-a" ;; 166 | US-V-A) CF_API="https://api.cf.us10-001.hana.ondemand.com"; serv="us-v-a" ;; 167 | US-O-A) CF_API="https://api.cf.us11.hana.ondemand.com"; serv="us-o-a" ;; 168 | DE-A) CF_API="https://api.cf.eu10-005.hana.ondemand.com"; serv="de-a" ;; 169 | JP-A) CF_API="https://api.cf.jp10.hana.ondemand.com"; serv="jp-a" ;; 170 | SG-A) CF_API="https://api.cf.ap11.hana.ondemand.com"; serv="sg-a" ;; 171 | AU-G) CF_API="https://api.cf.ap30.hana.ondemand.com"; serv="au-g" ;; 172 | BR-G) CF_API="https://api.cf.br30.hana.ondemand.com"; serv="br-g" ;; 173 | US-G) CF_API="https://api.cf.us30.hana.ondemand.com"; serv="us-g" ;; 174 | DE-G) CF_API="https://api.cf.eu30.hana.ondemand.com"; serv="de-g" ;; 175 | JP-O-G) CF_API="https://api.cf.jp30.hana.ondemand.com"; serv="jp-o-g" ;; 176 | JP-T-G) CF_API="https://api.cf.jp31.hana.ondemand.com"; serv="jp-t-g" ;; 177 | IL-G) CF_API="https://api.cf.il30.hana.ondemand.com"; serv="il-g" ;; 178 | IN-G) CF_API="https://api.cf.in30.hana.ondemand.com"; serv="in-g" ;; 179 | SA-G) CF_API="https://api.cf.sa31.hana.ondemand.com"; serv="sa-g" ;; 180 | AU-M) CF_API="https://api.cf.ap20.hana.ondemand.com"; serv="au-m" ;; 181 | BR-M) CF_API="https://api.cf.br20.hana.ondemand.com"; serv="br-m" ;; 182 | CA-M) CF_API="https://api.cf.ca20.hana.ondemand.com"; serv="ca-m" ;; 183 | US-V-M) CF_API="https://api.cf.us21.hana.ondemand.com"; serv="us-v-m" ;; 184 | US-W-M) CF_API="https://api.cf.us20.hana.ondemand.com"; serv="us-w-m" ;; 185 | NL-M) CF_API="https://api.cf.eu20-001.hana.ondemand.com"; serv="nl-m" ;; 186 | JP-M) CF_API="https://api.cf.jp20.hana.ondemand.com"; serv="jp-m" ;; 187 | SG-M) CF_API="https://api.cf.ap21.hana.ondemand.com"; serv="sg-m" ;; 188 | AE-N) CF_API="https://api.cf.neo-ae1.hana.ondemand.com"; serv="ae-n" ;; 189 | SA-N) CF_API="https://api.cf.neo-sa1.hana.ondemand.com"; serv="sa-n" ;; 190 | *) echo "未知区域: $REGION"; continue ;; 191 | esac 192 | if [ -z "$APP_NAME" ]; then 193 | APP_NAME="sap-$serv-${CF_EMAIL//[^a-zA-Z0-9_-]/-}" 194 | else 195 | APP_NAME="${APP_NAME//[^a-zA-Z0-9_-]/-}" 196 | fi 197 | echo "==============================================" 198 | echo "=========第 $((i+1)) 个实例开始启动============" 199 | echo "==============================================" 200 | cf login -a "$CF_API" -u "$CF_EMAIL" -p "$CF_PASSWORD" 201 | ORG=$(cf orgs | sed -n '4p') 202 | SPACE=$(cf spaces | sed -n '4p') 203 | cf target -o "$ORG" -s "$SPACE" 204 | echo "🔐 登录 SAP Cloud Foundry" 205 | if [ -n "$DELAPP" ]; then 206 | for app in $DELAPP; do 207 | cf delete "$app" -r -f 208 | done 209 | else 210 | ROUTE=$(cf app "$APP_NAME" | grep "routes:" | awk '{print $2}') 211 | if [ -n "$ROUTE" ]; then 212 | url="https://$ROUTE/$UUID" 213 | if curl -s "$url" | grep -iq "vless"; then 214 | echo "✅ ${APP_NAME} SAP正在运行中,跳过执行。" 215 | result 216 | continue 217 | else 218 | echo "🟡${APP_NAME} 已部署,但未启动,现重启……" 219 | sapcfevn 220 | push_out="$(cf restart "$APP_NAME" 2>&1)" 221 | echo "$push_out" 222 | pushout 223 | if [ $? -ne 0 ]; then 224 | continue 225 | fi 226 | result 227 | continue 228 | fi 229 | else 230 | echo "🟡${APP_NAME} 未部署,开始部署……" 231 | push_out="$(cf push "$APP_NAME" --docker-image ygkkk/argosbx -m 512M --health-check-type port 2>&1)" 232 | echo "$push_out" 233 | pushout 234 | if [ $? -ne 0 ]; then 235 | continue 236 | fi 237 | sapcfevn 238 | cf restage "$APP_NAME" 239 | cf app "$APP_NAME" 240 | result 241 | fi 242 | fi 243 | done 244 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Argosbx一键无交互小钢炮脚本💣:极简 + 轻量 + 快速 2 | 3 | --------------------------------------- 4 | 5 | d89e2542c513e705106371acc7fa1d33 6 | 7 | 8 | ### 【Argosbx当前版本:V25.11.20】 9 | 10 | --------------------------------------- 11 | 12 | #### 1、基于Sing-box + Xray + Cloudflared-Argo 三内核自动分配 13 | 14 | #### 2、支持Linux类主流VPS系统(建议最新版系统),SSH脚本支持非root环境运行,几乎无需依赖,无脑一次回车搞定 15 | 16 | #### 3、支持各种容器系统,Docker镜像部署,公开镜像库:```ygkkk/argosbx``` 17 | 18 | #### 4、根据Sing-box与Xray不同内核,可选15种WARP出站组合,更换落地IP为WARP的IP,解锁流媒体 19 | 20 | #### 5、所有代理协议都无需域名(除了argo固定隧道、IP端口CDN),支持单个或多个代理协议任意组合并快速重置更换 21 | 【 已支持:AnyTLS、Any-reality、Vless-xhttp-reality-vison-enc、Vless-tcp-reality-vision、Vless-xhttp-vison-enc、Vless-ws-vision-enc、Shadowsocks-2022、Vmess-ws、Socks5、Hysteria2、Tuic、Argo临时/固定隧道支持Vless-ws-vision-enc或Vmess-ws 】 22 | 23 | #### 6、建议配合SSH一键脚本命令生成器网页使用:https://yonggekkk.github.io/argosbx/ 24 | 25 | #### 7、如需要多样的功能,推荐使用VPS专用四合一脚本[Sing-box-yg](https://github.com/yonggekkk/sing-box-yg) 26 | 27 | #### 8、Argosbx客户端推荐: 28 | 29 | 安卓手机客户端:[Nekobox-starifly版(全协议支持)](https://github.com/starifly/NekoBoxForAndroid/releases)、[V2rayNG官方版](https://github.com/2dust/v2rayNG/releases) 30 | 31 | 电脑win客户端:[V2rayN官方版(全协议支持)](https://github.com/2dust/v2rayN/releases) 32 | 33 | 苹果IOS客户端:OneXray、Streisand 34 | 35 | ---------------------------------------------------------- 36 | 37 | ## 一、自定义变量参数说明: 38 | 39 | | 变量意义 | 变量名称| 在变量值""之间填写| 删除变量 | 在变量值""之间留空 | 变量要求及说明 | 40 | | :--- | :--- | :--- | :--- | :--- | :--- | 41 | | 1、启用vless-tcp-reality-v | vlpt | 端口指定 | 关闭vless-tcp-reality-v | 端口随机 | 必选之一 【xray内核:TCP】 | 42 | | 2、启用vless-xhttp-reality-enc | xhpt | 端口指定 | 关闭vless-xhttp-reality-enc | 端口随机 | 必选之一 【xray内核:TCP】 | 43 | | 3、启用vless-xhttp-enc | vxpt | 端口指定 | 关闭vless-xhttp-enc | 端口随机 | 必选之一 【xray内核:TCP】 | 44 | | 4、启用vless-ws-enc | vwpt | 端口指定 | 关闭vless-ws-enc | 端口随机 | 必选之一 【xray内核:TCP】 | 45 | | 5、启用shadowsocks-2022 | sspt | 端口指定 | 关闭shadowsocks-2022 | 端口随机 | 必选之一 【singbox内核:TCP】 | 46 | | 6、启用anytls | anpt | 端口指定 | 关闭anytls | 端口随机 | 必选之一 【singbox内核:TCP】 | 47 | | 7、启用any-reality | arpt | 端口指定 | 关闭any-reality | 端口随机 | 必选之一 【singbox内核:TCP】 | 48 | | 8、启用vmess-ws | vmpt | 端口指定 | 关闭vmess-ws | 端口随机 | 必选之一 【xray/singbox内核:TCP】 | 49 | | 9、启用socks5 | sopt | 端口指定 | 关闭socks5 | 端口随机 | 必选之一 【xray/singbox内核:TCP】 | 50 | | 10、启用hysteria2 | hypt | 端口指定 | 关闭hy2 | 端口随机 | 必选之一 【singbox内核:UDP】 | 51 | | 11、启用tuic | tupt | 端口指定 | 关闭tuic | 端口随机 | 必选之一 【singbox内核:UDP】 | 52 | | 12、warp开关 | warp | 详见下方15种warp出站模式图 | 关闭warp | singbox与xray内核协议都启用warp全局V4+V6 | 可选,详见下方15种warp出站模式图 | 53 | | 13、argo开关 | argo | 填写vwpt或者vmpt | 关闭argo隧道 | 关闭argo隧道 | 可选,填写vmpt或vwpt时,vmess-ws或vless-ws变量vmpt或vwpt必须启用,且固定隧道必须填写vmpt或vwpt端口 | 54 | | 14、argo固定隧道域名 | agn | 托管在CF上的域名 | 使用临时隧道 | 使用临时隧道 | 可选,argo填写vmpt或vwpt时才可激活固定隧道| 55 | | 15、argo固定隧道token | agk | CF获取的ey开头的token | 使用临时隧道 | 使用临时隧道 | 可选,argo填写vmpt或vwpt时才可激活固定隧道 | 56 | | 16、uuid密码 | uuid | 符合uuid规定格式 | 随机生成 | 随机生成 | 可选 | 57 | | 17、reality域名(仅支持reality类协议) | reym | 符合reality域名规定 | apple官网 | apple官网 | 可选,使用CF类域名时:服务器ip:节点端口的组合,可作为ProxyIP/客户端地址反代IP(建议高位端口或纯IPV6下使用,以防被扫泄露)| 58 | | 18、vmess-ws、vless-xhttp/ws-enc在客户端的host地址 | cdnym | CF解析IP的域名 | vmess-ws、vless-xhttp/ws-enc为直连 | vmess-ws、vless-xhttp/ws-enc为直连 | 可选,使用80系CDN或者回源CDN时可设置,否则客户端host地址需手动更改为CF解析IP的域名| 59 | | 19、切换ipv4或ipv6配置 | ippz | 填写4或者6 | 自动识别IP配置 | 自动识别IP配置 | 可选,4表示IPV4配置输出,6表示IPV6配置输出 | 60 | | 20、添加所有节点名称前缀 | name | 任意字符 | 默认协议名前缀 | 默认协议名前缀 | 可选 | 61 | | 21、当前系统开放所有端口 | oap | 填写y | 禁止开放所有端口 | 禁止开放所有端口 | 可选,开启运行一次即可,后续删除变量,没必要每次运行 | 62 | | 22、【仅容器类docker】监听端口,网页查询 | PORT | 端口指定 | 3000 | 3000 | 可选 | 63 | | 23、【仅容器类docker】启用vless-ws-tls | DOMAIN | 服务器域名 | 关闭vless-ws-tls | 关闭vless-ws-tls | 可选,vless-ws-tls可独立存在,uuid变量必须启用 | 64 | 65 | ------------------------------------------------------------------ 66 | 67 | * #### 如下图:一键SSH命令生成器:[点击视频教程](https://youtu.be/4u6W4c-t3oU) 68 | 69 | 729cda77f5d7f29dcbab7915ec50b087 70 | 71 | ------------------------------------------------------------------ 72 | 73 | * #### 如下图:Clawcloud爪云4套价格+7组协议的组合任你选:[点击视频教程](https://youtu.be/xOQV_E1-C84) 74 | 75 | 9fdd57063373fb2c20b32c955e7d9894 76 | 77 | ------------------------------------------------------------------ 78 | 79 | * #### 如下图:从此抛弃第三方独立的WARP脚本,xray+singbox双内核集成15种WARP出站组合:[点击视频教程](https://youtu.be/iywjT8fIka4) 80 | 81 | e0b66a115b1cd6a5060c38cae6e45c55 82 | 83 | ---------------------------------------------------------- 84 | 85 | ## 二、SSH一键变量脚本模版说明: 86 | 87 | ### 脚本以 ```变量名称="变量值"的单个或多个组合 + 主脚本``` 的形式运行 88 | 89 | * 默认主脚本curl:```bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh)``` 90 | 91 | * 如报错curl not found 可换用主脚本wget:```bash <(wget -qO- https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh)``` 92 | 93 | * 必选其一的协议端口变量:```vwpt=""```、```vmpt=""```、```vmpt="" argo="vmpt"```、```vwpt="" argo="vwpt"```、```vlpt=""```、```xhpt=""```、```anpt=""```、```arpt=""```、```hypt=""```、```tupt=""```、```sspt=""```、```vxpt=""```、```sopt=""``` 94 | 95 | * 可选的功能类变量:```warp=""```、```uuid=""```、```reym=""```、```cdnym=""```、```argo=""```、```agn=""```、```agk=""```、```ippz=""```、```name=""```、```oap=""``` 96 | 97 | 请参考```一、自定义变量参数说明```中变量的作用说明,变量值填写在```" "```之间,变量之间空一格,不用的变量可以删除 98 | 99 | ------------------------------------------------------------- 100 | 101 | * ### 模版1:多个任意协议组合运行 102 | ``` 103 | sspt="" vlpt="" vmpt="" vwpt="" hypt="" tupt="" xhpt="" vxpt="" anpt="" arpt="" sopt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 104 | ``` 105 | 106 | * ### 模版2:主流TCP或UDP单个协议运行 107 | 108 | Vless-Tcp-Reality-vision协议节点 109 | ``` 110 | vlpt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 111 | ``` 112 | 113 | Vless-Xhttp-Reality-vision-enc协议节点 (默认开启ENC加密) 114 | ``` 115 | xhpt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 116 | ``` 117 | 118 | Vless-Xhttp-vision-enc协议节点 (默认开启ENC加密,IDX-Google-VPS容器支持) 119 | ``` 120 | vxpt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 121 | ``` 122 | 123 | Vless-ws-vision-enc协议节点 (默认开启ENC加密) 124 | ``` 125 | vwpt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 126 | ``` 127 | 128 | Shadowsocks-2022协议节点 129 | ``` 130 | sspt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 131 | ``` 132 | 133 | AnyTLS协议节点 134 | ``` 135 | anpt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 136 | ``` 137 | 138 | Any-Reality协议节点 139 | ``` 140 | arpt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 141 | ``` 142 | 143 | Vmess-ws协议节点 144 | ``` 145 | vmpt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 146 | ``` 147 | 148 | Socks5协议节点 (配合其他应用内置代理使用,勿做节点直接使用) 149 | ``` 150 | sopt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 151 | ``` 152 | 153 | Hysteria2协议节点 154 | ``` 155 | hypt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 156 | ``` 157 | 158 | Tuic协议节点 159 | ``` 160 | tupt="" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 161 | ``` 162 | 163 | * ### 模版3:开启CDN优选的节点运行 164 | 165 | Argo临时/固定隧道运行优选节点,类似无公网的IDX-Google-VPS容器推荐使用此脚本,快速一键内网穿透获取节点 166 | 167 | Vmess-ws-argo临时隧道CDN优选节点 168 | ``` 169 | vmpt="" argo="vmpt" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 170 | ``` 171 | 172 | Vless-ws-vision-enc-argo临时隧道CDN优选节点 173 | ``` 174 | vwpt="" argo="vwpt" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 175 | ``` 176 | 177 | Vmess-ws-argo-argo固定隧道CDN优选节点,必须填写端口(vmpt)、域名(agn)、token(agk) 178 | ``` 179 | vmpt="CF设置的URL端口" argo="vmpt" agn="解析的CF域名" agk="CF获取的token" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 180 | ``` 181 | 182 | Vless-ws-vision-enc-argo固定隧道CDN优选节点,必须填写端口(vmpt)、域名(agn)、token(agk) 183 | ``` 184 | vwpt="CF设置的URL端口" argo="vwpt" agn="解析的CF域名" agk="CF获取的token" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 185 | ``` 186 | 187 | Vmess-ws的80系端口、回源端口的CDN优选节点 188 | ``` 189 | vmpt="80系端口、指定回源端口" cdnym="CF解析IP的域名" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 190 | ``` 191 | 192 | Vless-Xhttp-vision-enc的80系端口、回源端口的CDN优选节点 193 | ``` 194 | vxpt="80系端口、指定回源端口" cdnym="CF解析IP的域名" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 195 | ``` 196 | 197 | Vless-ws-vision-enc的80系端口、回源端口的CDN优选节点 198 | ``` 199 | vwpt="80系端口、指定回源端口" cdnym="CF解析IP的域名" bash <(curl -Ls https://raw.githubusercontent.com/yonggekkk/argosbx/main/argosbx.sh) 200 | ``` 201 | 202 | * #### 如下图:节点IP、端口被封依旧可用!套CDN优选5大方案三步视频教程: 203 | 204 | [视频1:80系+回源cdn](https://youtu.be/RnUT1CNbCr8) 205 | 206 | [视频2:Argo临时/固定隧道区别与设置](https://youtu.be/K35NhrNiLK8) 207 | 208 | [视频3:黑科技80端口CDN](https://youtu.be/X8BFVyeiY9g) 209 | 210 | f51af75fcc76bae7e76fe0ef5b9ecc86 211 | 212 | --------------------------------------------------------- 213 | 214 | ## 三、多功能SSH快捷方式命令组 215 | 216 | #### 说明:首次安装成功后需重连SSH,```agsbx 命令```的快捷方式才可生效;如未生效,请使用```主脚本 命令```的快捷方式 217 | 218 | 1、查看Argo的固定域名、固定隧道的token、临时域名、当前已安装的节点信息命令:```agsbx list``` 或者 ```主脚本 list``` 219 | 220 | 2、更换、增加、删除变量组命令:```自定义各种协议变量组 agsbx rep``` 或者 ```自定义各种协议变量组 主脚本 rep``` 221 | 222 | 3、更新脚本命令:```原已安装的自定义各种协议变量组 主脚本 rep``` 223 | 224 | 4、更新Xray或Singbox内核命令:agsbx upx或ups 【或者】 主脚本 upx或ups 225 | 226 | 5、重启脚本命令:```agsbx res``` 或者 ```主脚本 res``` 227 | 228 | 6、卸载脚本命令:```agsbx del``` 或者 ```主脚本 del``` 229 | 230 | 7、临时切换IPV4/IPV6节点配置 (双栈VPS专享): 231 | 232 | 显示IPV4节点配置:```ippz=4 agsbx list```或者```ippz=4 主脚本 list``` 233 | 234 | 显示IPV6节点配置:```ippz=6 agsbx list```或者```ippz=6 主脚本 list``` 235 | 236 | ---------------------------------------------------------- 237 | 238 | #### 相关教程可参考[甬哥博客](https://ygkkk.blogspot.com/2025/08/argosb.html),视频教程如下: 239 | 240 | 更新中…… 241 | 242 | [ArgoSBX小钢炮脚本更新说明:新增VLESS ENC抗量子加密;80端口也能开启TLS加密?无需域名也能CDN优选?](https://youtu.be/X8BFVyeiY9g) 243 | 244 | [Argo隧道代理节点终极教程:VPS+容器搭建最强CDN节点 | 无视端口IP被封 | Argo临时/固定隧道区别 | CDN优选IP加速](https://youtu.be/K35NhrNiLK8) 245 | 246 | [ArgoSBX一键无交互小钢炮脚本💣(四):一键SSH命令生成器发布,只要点几下,各大代理协议任你选](https://youtu.be/4u6W4c-t3oU) 247 | 248 | [ArgoSB一键无交互小钢炮脚本💣(三):内置15种WARP出站组合,轻松替代独立的WARP脚本](https://youtu.be/iywjT8fIka4) 249 | 250 | [ArgoSB一键无交互小钢炮脚本💣(二):代理节点的IP、端口被封依旧可用!ArgoSB脚本套CDN优选4大方案教程](https://youtu.be/RnUT1CNbCr8) 251 | 252 | [ArgoSB一键无交互小钢炮脚本💣(一):VPS/nat VPS在主协议下的应用;仅按一次回车,多协议自由搭配](https://youtu.be/CiXmttY7mhw) 253 | 254 | [Clawcloud爪云、IDX Google VPS的福音:解决服务器IP访问困扰!Argosb脚本新增WARP出站功能,轻松更换落地IP为Cloudflare WARP IP](https://youtu.be/HO_XLBmIYJw) 255 | 256 | [Claw.cloud免费VPS搭建代理最终教程(五):ArgoSB脚本docker镜像更新支持AnyTLS、Xhttp-Reality](https://youtu.be/-mhZIhHRyno) 257 | 258 | [Claw.cloud免费VPS搭建代理最终教程(四):最低仅1美分,4套价格+7组协议的套餐组合任你选;查看节点、重启升级、更换IP、更改配置的操作说明](https://youtu.be/xOQV_E1-C84) 259 | 260 | [SAP搭建免费节点一条龙教程:多平台多账号搭建+保活一次搞定,支持Argo/workers/pags多种CDN方式](https://youtu.be/NRYZNKWoLj8) 261 | 262 | ---------------------------------------------------------- 263 | 264 | ### 交流平台:[甬哥博客地址](https://ygkkk.blogspot.com)、[甬哥YouTube频道](https://www.youtube.com/@ygkkk)、[甬哥TG电报群组](https://t.me/+jZHc6-A-1QQ5ZGVl)、[甬哥TG电报频道](https://t.me/+DkC9ZZUgEFQzMTZl) 265 | 266 | ---------------------------------------------------------- 267 | ### 感谢支持!微信打赏甬哥侃侃侃ygkkk 268 | ![41440820a366deeb8109db5610313a1](https://github.com/user-attachments/assets/e5b1f2c0-bd2c-4b8f-8cda-034d3c8ef73f) 269 | 270 | ---------------------------------------------------------- 271 | ### 感谢你右上角的star🌟 272 | [![Stargazers over time](https://starchart.cc/yonggekkk/ArgoSB.svg)](https://starchart.cc/yonggekkk/ArgoSB) 273 | 274 | ---------------------------------------------------------- 275 | ### 声明:所有代码来源于Github社区与ChatGPT的整合 276 | 277 | ### Thanks to [zmto/vtexs](https://console.zmto.com/?affid=1558) for the sponsorship support 278 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ArgoSBX一键SSH命令生成器-甬哥ygkkk 7 | 374 | 375 | 376 |
377 |
378 |
379 | 380 | 385 |
386 |

ArgoSBX小钢炮脚本💣一键SSH命令生成器 V25.11.20

387 |

388 | 甬哥Github项目: 389 | github.com/yonggekkk
390 | 甬哥Blogger博客: 391 | ygkkk.blogspot.com
392 | 甬哥YouTube频道: 393 | www.youtube.com/@ygkkk
394 |

395 |
396 | 397 |
398 |
399 |

必选内核协议端口:

400 |
401 |

Xray可选协议:

402 |
403 | 404 | 405 | 406 | 407 |
408 |
409 |
410 |

Singbox可选协议:

411 |
412 | 413 | 414 | 415 | 416 | 417 |
418 |
419 |
420 |

Xray/Singbox自动分配协议:

421 |
422 | 423 | 424 |
425 |
426 |
427 | 428 |
429 |

相关全局配置调整:

430 |
431 | 432 |
433 | 434 | 435 |
436 |
437 |
438 |
439 |
440 | 458 |
459 | 460 |
461 | 466 |
467 |
468 | 469 | 473 |
474 |
475 |
476 | 477 |
478 |

Argo临时/固定隧道CDN:

479 |
480 | 481 | 486 |
487 |
488 |
489 |
490 | 491 |
492 |

如已安装脚本,可用以下快捷方式:

493 |
494 | 495 | 496 | 497 | 498 | 499 | 500 |
501 |
502 | 503 |
504 |
505 |

进入服务器的SSH界面,复制下方生成的一键脚本命令,回车一次搞定

506 |
507 |
508 | 509 | 510 | 511 |
512 | 513 |
514 | 515 | 516 |
517 |

相关细节说明,请参考ArgoSBX小钢炮脚本项目💣:github.com/yonggekkk/argosbx

518 | 1、ArgoSBX一键SSH命令生成器发布,只要点几下,各大代理协议任你选:点击视频教程

519 | 2、ArgoSBX内置15种WARP出站组合,轻松替代独立的WARP脚本:点击视频教程

520 | 3、代理节点的IP、端口被封依旧可用!ArgoSBX脚本套CDN优选4大方案:点击视频教程

521 | 4、VPS+容器搭建最强CDN节点;独家解读Argo临时/固定隧道区别:点击视频教程

522 | 5、ArgoSBX更新:VLESS抗量子加密;80端口开启TLS,无需域名CDN:点击视频教程

523 | 安卓手机客户端推荐:Nekobox-starifly版 (全协议支持)V2rayNG官方版
524 | 电脑win客户端推荐:V2rayN官方版 (全协议支持)
525 | 苹果IOS客户端推荐:OneXray、Streisand 526 |

527 |
528 |
529 |
530 | 531 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /container/nodejs/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export LANG=en_US.UTF-8 3 | export uuid=${uuid} 4 | export vlpt=${vlpt} 5 | export vmpt=${vmpt} 6 | export vwpt=${vwpt} 7 | export hypt=${hypt} 8 | export tupt=${tupt} 9 | export xhpt=${xhpt} 10 | export vxpt=${vxpt} 11 | export anpt=${anpt} 12 | export arpt=${arpt} 13 | export sspt=${sspt} 14 | export sopt=${sopt} 15 | export reym=${reym} 16 | export cdnym=${cdnym} 17 | export argo=${argo} 18 | export agn=${agn} 19 | export agk=${agk} 20 | export ippz=${ippz} 21 | export warp=${warp} 22 | export name=${name} 23 | v46url="https://icanhazip.com" 24 | showmode(){ 25 | echo "Argosbx脚本项目地址:https://github.com/yonggekkk/argosbx" 26 | echo "---------------------------------------------------------" 27 | echo 28 | } 29 | echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" 30 | echo "甬哥Github项目 :github.com/yonggekkk" 31 | echo "甬哥Blogger博客 :ygkkk.blogspot.com" 32 | echo "甬哥YouTube频道 :www.youtube.com/@ygkkk" 33 | echo "Argosbx一键无交互小钢炮脚本💣" 34 | echo "当前版本:V25.11.20" 35 | echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" 36 | hostname=$(uname -a | awk '{print $2}') 37 | op=$(cat /etc/redhat-release 2>/dev/null || cat /etc/os-release 2>/dev/null | grep -i pretty_name | cut -d \" -f2) 38 | [ -z "$(systemd-detect-virt 2>/dev/null)" ] && vi=$(virt-what 2>/dev/null) || vi=$(systemd-detect-virt 2>/dev/null) 39 | case $(uname -m) in 40 | aarch64) cpu=arm64;; 41 | x86_64) cpu=amd64;; 42 | *) echo "目前脚本不支持$(uname -m)架构" && exit 43 | esac 44 | mkdir -p "$HOME/agsbx" 45 | v4v6(){ 46 | v4=$( (command -v curl >/dev/null 2>&1 && curl -s4m5 -k "$v46url" 2>/dev/null) || (command -v wget >/dev/null 2>&1 && timeout 3 wget -4 --tries=2 -qO- "$v46url" 2>/dev/null) ) 47 | v6=$( (command -v curl >/dev/null 2>&1 && curl -s6m5 -k "$v46url" 2>/dev/null) || (command -v wget >/dev/null 2>&1 && timeout 3 wget -6 --tries=2 -qO- "$v46url" 2>/dev/null) ) 48 | v4dq=$( (command -v curl >/dev/null 2>&1 && curl -s4m5 -k https://ip.fm | sed -E 's/.*Location: ([^,]+(, [^,]+)*),.*/\1/' 2>/dev/null) || (command -v wget >/dev/null 2>&1 && timeout 3 wget -4 --tries=2 -qO- https://ip.fm | grep 'Location:' | tail -n1 | sed -E 's/.*>Location: <\/span>([^<]+)<.*/\1/' 2>/dev/null) ) 49 | v6dq=$( (command -v curl >/dev/null 2>&1 && curl -s6m5 -k https://ip.fm | sed -E 's/.*Location: ([^,]+(, [^,]+)*),.*/\1/' 2>/dev/null) || (command -v wget >/dev/null 2>&1 && timeout 3 wget -6 --tries=2 -qO- https://ip.fm | grep 'Location:' | tail -n1 | sed -E 's/.*>Location: <\/span>([^<]+)<.*/\1/' 2>/dev/null) ) 50 | } 51 | warpsx(){ 52 | warpurl=$( (command -v curl >/dev/null 2>&1 && curl -sm5 -k https://ygkkk-warp.renky.eu.org 2>/dev/null) || (command -v wget >/dev/null 2>&1 && timeout 3 wget --tries=2 -qO- https://ygkkk-warp.renky.eu.org 2>/dev/null) ) 53 | if echo "$warpurl" | grep -q ygkkk; then 54 | pvk=$(echo "$warpurl" | awk -F':' '/Private_key/{print $2}' | xargs) 55 | wpv6=$(echo "$warpurl" | awk -F':' '/IPV6/{print $2}' | xargs) 56 | res=$(echo "$warpurl" | awk -F':' '/reserved/{print $2}' | xargs) 57 | else 58 | wpv6='2606:4700:110:8d8d:1845:c39f:2dd5:a03a' 59 | pvk='52cuYFgCJXp0LAq7+nWJIbCXXgU9eGggOc+Hlfz5u6A' 60 | res='[215, 69, 233]' 61 | fi 62 | if [ -n "$name" ]; then 63 | sxname=$name- 64 | echo "$sxname" > "$HOME/agsbx/name" 65 | echo 66 | echo "所有节点名称前缀:$name" 67 | fi 68 | v4v6 69 | if echo "$v6" | grep -q '^2a09' || echo "$v4" | grep -q '^104.28'; then 70 | s1outtag=direct; s2outtag=direct; x1outtag=direct; x2outtag=direct; xip='"::/0", "0.0.0.0/0"'; sip='"::/0", "0.0.0.0/0"'; 71 | echo "请注意:你已安装了warp" 72 | else 73 | if [ -z "$wap" ]; then 74 | s1outtag=direct; s2outtag=direct; x1outtag=direct; x2outtag=direct; xip='"::/0", "0.0.0.0/0"'; sip='"::/0", "0.0.0.0/0"'; 75 | else 76 | case "$warp" in 77 | ""|sx|xs) s1outtag=warp-out; s2outtag=warp-out; x1outtag=warp-out; x2outtag=warp-out; xip='"::/0", "0.0.0.0/0"'; sip='"::/0", "0.0.0.0/0"' ;; 78 | s ) s1outtag=warp-out; s2outtag=warp-out; x1outtag=direct; x2outtag=direct; xip='"::/0", "0.0.0.0/0"'; sip='"::/0", "0.0.0.0/0"' ;; 79 | s4) s1outtag=warp-out; s2outtag=direct; x1outtag=direct; x2outtag=direct; xip='"::/0", "0.0.0.0/0"'; sip='"0.0.0.0/0"' ;; 80 | s6) s1outtag=warp-out; s2outtag=direct; x1outtag=direct; x2outtag=direct; xip='"::/0", "0.0.0.0/0"'; sip='"::/0"' ;; 81 | x ) s1outtag=direct; s2outtag=direct; x1outtag=warp-out; x2outtag=warp-out; xip='"::/0", "0.0.0.0/0"'; sip='"::/0", "0.0.0.0/0"' ;; 82 | x4) s1outtag=direct; s2outtag=direct; x1outtag=warp-out; x2outtag=direct; xip='"0.0.0.0/0"'; sip='"::/0", "0.0.0.0/0"' ;; 83 | x6) s1outtag=direct; s2outtag=direct; x1outtag=warp-out; x2outtag=direct; xip='"::/0"'; sip='"::/0", "0.0.0.0/0"' ;; 84 | s4x4|x4s4) s1outtag=warp-out; s2outtag=direct; x1outtag=warp-out; x2outtag=direct; xip='"0.0.0.0/0"'; sip='"0.0.0.0/0"' ;; 85 | s4x6|x6s4) s1outtag=warp-out; s2outtag=direct; x1outtag=warp-out; x2outtag=direct; xip='"::/0"'; sip='"0.0.0.0/0"' ;; 86 | s6x4|x4s6) s1outtag=warp-out; s2outtag=direct; x1outtag=warp-out; x2outtag=direct; xip='"0.0.0.0/0"'; sip='"::/0"' ;; 87 | s6x6|x6s6) s1outtag=warp-out; s2outtag=direct; x1outtag=warp-out; x2outtag=direct; xip='"::/0"'; sip='"::/0"' ;; 88 | sx4|x4s) s1outtag=warp-out; s2outtag=warp-out; x1outtag=warp-out; x2outtag=direct; xip='"0.0.0.0/0"'; sip='"::/0", "0.0.0.0/0"' ;; 89 | sx6|x6s) s1outtag=warp-out; s2outtag=warp-out; x1outtag=warp-out; x2outtag=direct; xip='"::/0"'; sip='"::/0", "0.0.0.0/0"' ;; 90 | xs4|s4x) s1outtag=warp-out; s2outtag=direct; x1outtag=warp-out; x2outtag=warp-out; xip='"::/0", "0.0.0.0/0"'; sip='"0.0.0.0/0"' ;; 91 | xs6|s6x) s1outtag=warp-out; s2outtag=direct; x1outtag=warp-out; x2outtag=warp-out; xip='"::/0", "0.0.0.0/0"'; sip='"::/0"' ;; 92 | * ) s1outtag=direct; s2outtag=direct; x1outtag=direct; x2outtag=direct; xip='"::/0", "0.0.0.0/0"'; sip='"::/0", "0.0.0.0/0"' ;; 93 | esac 94 | fi 95 | fi 96 | case "$warp" in *x4*) wxryx='ForceIPv4' ;; *x6*) wxryx='ForceIPv6' ;; *) wxryx='ForceIPv6v4' ;; esac 97 | if command -v curl >/dev/null 2>&1; then 98 | curl -s4m5 -k "$v46url" >/dev/null 2>&1 && v4_ok=true 99 | elif command -v wget >/dev/null 2>&1; then 100 | timeout 3 wget -4 --tries=2 -qO- "$v46url" >/dev/null 2>&1 && v4_ok=true 101 | fi 102 | if command -v curl >/dev/null 2>&1; then 103 | curl -s6m5 -k "$v46url" >/dev/null 2>&1 && v6_ok=true 104 | elif command -v wget >/dev/null 2>&1; then 105 | timeout 3 wget -6 --tries=2 -qO- "$v46url" >/dev/null 2>&1 && v6_ok=true 106 | fi 107 | if [ "$v4_ok" = true ] && [ "$v6_ok" = true ]; then 108 | case "$warp" in *s4*) sbyx='prefer_ipv4' ;; *) sbyx='prefer_ipv6' ;; esac 109 | case "$warp" in *x4*) xryx='ForceIPv4v6' ;; *x*) xryx='ForceIPv6v4' ;; *) xryx='ForceIPv4v6' ;; esac 110 | elif [ "$v4_ok" = true ] && [ "$v6_ok" != true ]; then 111 | case "$warp" in *s4*) sbyx='ipv4_only' ;; *) sbyx='prefer_ipv6' ;; esac 112 | case "$warp" in *x4*) xryx='ForceIPv4' ;; *x*) xryx='ForceIPv6v4' ;; *) xryx='ForceIPv4v6' ;; esac 113 | elif [ "$v4_ok" != true ] && [ "$v6_ok" = true ]; then 114 | case "$warp" in *s6*) sbyx='ipv6_only' ;; *) sbyx='prefer_ipv4' ;; esac 115 | case "$warp" in *x6*) xryx='ForceIPv6' ;; *x*) xryx='ForceIPv4v6' ;; *) xryx='ForceIPv6v4' ;; esac 116 | fi 117 | } 118 | 119 | insuuid(){ 120 | if [ -z "$uuid" ] && [ ! -e "$HOME/agsbx/uuid" ]; then 121 | if [ -e "$HOME/agsbx/sing-box" ]; then 122 | uuid=$("$HOME/agsbx/sing-box" generate uuid) 123 | else 124 | uuid=$("$HOME/agsbx/xray" uuid) 125 | fi 126 | echo "$uuid" > "$HOME/agsbx/uuid" 127 | elif [ -n "$uuid" ]; then 128 | echo "$uuid" > "$HOME/agsbx/uuid" 129 | fi 130 | uuid=$(cat "$HOME/agsbx/uuid") 131 | echo "UUID密码:$uuid" 132 | } 133 | installxray(){ 134 | echo 135 | echo "=========启用xray内核=========" 136 | mkdir -p "$HOME/agsbx/xrk" 137 | if [ ! -e "$HOME/agsbx/xray" ]; then 138 | url="https://github.com/yonggekkk/argosbx/releases/download/argosbx/xray-$cpu"; out="$HOME/agsbx/xray"; (command -v curl >/dev/null 2>&1 && curl -Lo "$out" -# --retry 2 "$url") || (command -v wget>/dev/null 2>&1 && timeout 3 wget -O "$out" --tries=2 "$url") 139 | chmod +x "$HOME/agsbx/xray" 140 | sbcore=$("$HOME/agsbx/xray" version 2>/dev/null | awk '/^Xray/{print $2}') 141 | echo "已安装Xray正式版内核:$sbcore" 142 | fi 143 | cat > "$HOME/agsbx/xr.json" < "$HOME/agsbx/reym" 161 | echo "Reality域名:$reym" 162 | if [ ! -e "$HOME/agsbx/xrk/private_key" ]; then 163 | key_pair=$("$HOME/agsbx/xray" x25519) 164 | private_key=$(echo "$key_pair" | grep "PrivateKey" | awk '{print $2}') 165 | public_key=$(echo "$key_pair" | grep "Password" | awk '{print $2}') 166 | short_id=$(date +%s%N | sha256sum | cut -c 1-8) 167 | echo "$private_key" > "$HOME/agsbx/xrk/private_key" 168 | echo "$public_key" > "$HOME/agsbx/xrk/public_key" 169 | echo "$short_id" > "$HOME/agsbx/xrk/short_id" 170 | fi 171 | private_key_x=$(cat "$HOME/agsbx/xrk/private_key") 172 | public_key_x=$(cat "$HOME/agsbx/xrk/public_key") 173 | short_id_x=$(cat "$HOME/agsbx/xrk/short_id") 174 | fi 175 | if [ -n "$xhpt" ] || [ -n "$vxpt" ] || [ -n "$vwpt" ]; then 176 | if [ ! -e "$HOME/agsbx/xrk/dekey" ]; then 177 | vlkey=$("$HOME/agsbx/xray" vlessenc) 178 | dekey=$(echo "$vlkey" | grep '"decryption":' | sed -n '2p' | cut -d' ' -f2- | tr -d '"') 179 | enkey=$(echo "$vlkey" | grep '"encryption":' | sed -n '2p' | cut -d' ' -f2- | tr -d '"') 180 | echo "$dekey" > "$HOME/agsbx/xrk/dekey" 181 | echo "$enkey" > "$HOME/agsbx/xrk/enkey" 182 | fi 183 | dekey=$(cat "$HOME/agsbx/xrk/dekey") 184 | enkey=$(cat "$HOME/agsbx/xrk/enkey") 185 | fi 186 | 187 | if [ -n "$xhpt" ]; then 188 | if [ -z "$xhpt" ] && [ ! -e "$HOME/agsbx/xhpt" ]; then 189 | xhpt=$(shuf -i 10000-65535 -n 1) 190 | echo "$xhpt" > "$HOME/agsbx/xhpt" 191 | elif [ -n "$xhpt" ]; then 192 | echo "$xhpt" > "$HOME/agsbx/xhpt" 193 | fi 194 | xhpt=$(cat "$HOME/agsbx/xhpt") 195 | echo "Vless-xhttp-reality-v端口:$xhpt" 196 | cat >> "$HOME/agsbx/xr.json" < "$HOME/agsbx/vxpt" 241 | elif [ -n "$vxpt" ]; then 242 | echo "$vxpt" > "$HOME/agsbx/vxpt" 243 | fi 244 | vxpt=$(cat "$HOME/agsbx/vxpt") 245 | echo "Vless-xhttp-enc端口:$vxpt" 246 | if [ -n "$cdnym" ]; then 247 | echo "$cdnym" > "$HOME/agsbx/cdnym" 248 | echo "80系CDN或者回源CDN的host域名 (确保IP已解析在CF域名):$cdnym" 249 | fi 250 | cat >> "$HOME/agsbx/xr.json" < "$HOME/agsbx/vwpt" 285 | elif [ -n "$vwpt" ]; then 286 | echo "$vwpt" > "$HOME/agsbx/vwpt" 287 | fi 288 | vwpt=$(cat "$HOME/agsbx/vwpt") 289 | echo "Vless-ws-enc端口:$vwpt" 290 | if [ -n "$cdnym" ]; then 291 | echo "$cdnym" > "$HOME/agsbx/cdnym" 292 | echo "80系CDN或者回源CDN的host域名 (确保IP已解析在CF域名):$cdnym" 293 | fi 294 | cat >> "$HOME/agsbx/xr.json" < "$HOME/agsbx/vlpt" 327 | elif [ -n "$vlpt" ]; then 328 | echo "$vlpt" > "$HOME/agsbx/vlpt" 329 | fi 330 | vlpt=$(cat "$HOME/agsbx/vlpt") 331 | echo "Vless-tcp-reality-v端口:$vlpt" 332 | cat >> "$HOME/agsbx/xr.json" </dev/null 2>&1 && curl -Lo "$out" -# --retry 2 "$url") || (command -v wget>/dev/null 2>&1 && timeout 3 wget -O "$out" --tries=2 "$url") 375 | chmod +x "$HOME/agsbx/sing-box" 376 | sbcore=$("$HOME/agsbx/sing-box" version 2>/dev/null | awk '/version/{print $NF}') 377 | echo "已安装Sing-box正式版内核:$sbcore" 378 | fi 379 | cat > "$HOME/agsbx/sb.json" </dev/null 2>&1 && openssl ecparam -genkey -name prime256v1 -out "$HOME/agsbx/private.key" >/dev/null 2>&1 390 | command -v openssl >/dev/null 2>&1 && openssl req -new -x509 -days 36500 -key "$HOME/agsbx/private.key" -out "$HOME/agsbx/cert.pem" -subj "/CN=www.bing.com" >/dev/null 2>&1 391 | if [ ! -f "$HOME/agsbx/private.key" ]; then 392 | url="https://github.com/yonggekkk/argosbx/releases/download/argosbx/private.key"; out="$HOME/agsbx/private.key"; (command -v curl>/dev/null 2>&1 && curl -Ls -o "$out" --retry 2 "$url") || (command -v wget>/dev/null 2>&1 && timeout 3 wget -q -O "$out" --tries=2 "$url") 393 | url="https://github.com/yonggekkk/argosbx/releases/download/argosbx/cert.pem"; out="$HOME/agsbx/cert.pem"; (command -v curl>/dev/null 2>&1 && curl -Ls -o "$out" --retry 2 "$url") || (command -v wget>/dev/null 2>&1 && timeout 3 wget -q -O "$out" --tries=2 "$url") 394 | fi 395 | if [ -n "$hypt" ]; then 396 | if [ -z "$hypt" ] && [ ! -e "$HOME/agsbx/hypt" ]; then 397 | hypt=$(shuf -i 10000-65535 -n 1) 398 | echo "$hypt" > "$HOME/agsbx/hypt" 399 | elif [ -n "$hypt" ]; then 400 | echo "$hypt" > "$HOME/agsbx/hypt" 401 | fi 402 | hypt=$(cat "$HOME/agsbx/hypt") 403 | echo "Hysteria2端口:$hypt" 404 | cat >> "$HOME/agsbx/sb.json" < "$HOME/agsbx/tupt" 431 | elif [ -n "$tupt" ]; then 432 | echo "$tupt" > "$HOME/agsbx/tupt" 433 | fi 434 | tupt=$(cat "$HOME/agsbx/tupt") 435 | echo "Tuic端口:$tupt" 436 | cat >> "$HOME/agsbx/sb.json" < "$HOME/agsbx/anpt" 464 | elif [ -n "$anpt" ]; then 465 | echo "$anpt" > "$HOME/agsbx/anpt" 466 | fi 467 | anpt=$(cat "$HOME/agsbx/anpt") 468 | echo "Anytls端口:$anpt" 469 | cat >> "$HOME/agsbx/sb.json" < "$HOME/agsbx/reym" 494 | echo "Reality域名:$reym" 495 | mkdir -p "$HOME/agsbx/sbk" 496 | if [ ! -e "$HOME/agsbx/sbk/private_key" ]; then 497 | key_pair=$("$HOME/agsbx/sing-box" generate reality-keypair) 498 | private_key=$(echo "$key_pair" | awk '/PrivateKey/ {print $2}' | tr -d '"') 499 | public_key=$(echo "$key_pair" | awk '/PublicKey/ {print $2}' | tr -d '"') 500 | short_id=$("$HOME/agsbx/sing-box" generate rand --hex 4) 501 | echo "$private_key" > "$HOME/agsbx/sbk/private_key" 502 | echo "$public_key" > "$HOME/agsbx/sbk/public_key" 503 | echo "$short_id" > "$HOME/agsbx/sbk/short_id" 504 | fi 505 | private_key_s=$(cat "$HOME/agsbx/sbk/private_key") 506 | public_key_s=$(cat "$HOME/agsbx/sbk/public_key") 507 | short_id_s=$(cat "$HOME/agsbx/sbk/short_id") 508 | if [ -z "$arpt" ] && [ ! -e "$HOME/agsbx/arpt" ]; then 509 | arpt=$(shuf -i 10000-65535 -n 1) 510 | echo "$arpt" > "$HOME/agsbx/arpt" 511 | elif [ -n "$arpt" ]; then 512 | echo "$arpt" > "$HOME/agsbx/arpt" 513 | fi 514 | arpt=$(cat "$HOME/agsbx/arpt") 515 | echo "Any-Reality端口:$arpt" 516 | cat >> "$HOME/agsbx/sb.json" < "$HOME/agsbx/sskey" 548 | fi 549 | if [ -z "$sspt" ] && [ ! -e "$HOME/agsbx/sspt" ]; then 550 | sspt=$(shuf -i 10000-65535 -n 1) 551 | echo "$sspt" > "$HOME/agsbx/sspt" 552 | elif [ -n "$sspt" ]; then 553 | echo "$sspt" > "$HOME/agsbx/sspt" 554 | fi 555 | sskey=$(cat "$HOME/agsbx/sskey") 556 | sspt=$(cat "$HOME/agsbx/sspt") 557 | echo "Shadowsocks-2022端口:$sspt" 558 | cat >> "$HOME/agsbx/sb.json" < "$HOME/agsbx/vmpt" 576 | elif [ -n "$vmpt" ]; then 577 | echo "$vmpt" > "$HOME/agsbx/vmpt" 578 | fi 579 | vmpt=$(cat "$HOME/agsbx/vmpt") 580 | echo "Vmess-ws端口:$vmpt" 581 | if [ -n "$cdnym" ]; then 582 | echo "$cdnym" > "$HOME/agsbx/cdnym" 583 | echo "80系CDN或者回源CDN的host域名 (确保IP已解析在CF域名):$cdnym" 584 | fi 585 | if [ -e "$HOME/agsbx/xr.json" ]; then 586 | cat >> "$HOME/agsbx/xr.json" <> "$HOME/agsbx/sb.json" < "$HOME/agsbx/sopt" 643 | elif [ -n "$sopt" ]; then 644 | echo "$sopt" > "$HOME/agsbx/sopt" 645 | fi 646 | sopt=$(cat "$HOME/agsbx/sopt") 647 | echo "Socks5端口:$sopt" 648 | if [ -e "$HOME/agsbx/xr.json" ]; then 649 | cat >> "$HOME/agsbx/xr.json" <> "$HOME/agsbx/sb.json" <> "$HOME/agsbx/xr.json" </dev/null 2>&1 & 756 | fi 757 | if [ -e "$HOME/agsbx/sb.json" ]; then 758 | sed -i '${s/,\s*$//}' "$HOME/agsbx/sb.json" 759 | cat >> "$HOME/agsbx/sb.json" </dev/null 2>&1 & 818 | fi 819 | } 820 | ins(){ 821 | if [ -z "$hypt" ] && [ -z "$tupt" ] && [ -z "$anpt" ] && [ -z "$arpt" ] && [ -z "$sspt" ]; then 822 | installxray 823 | xrsbvm 824 | xrsbso 825 | warpsx 826 | xrsbout 827 | elif [ -z "$xhpt" ] && [ -z "$vlpt" ] && [ -z "$vxpt" ] && [ -z "$vwpt" ]; then 828 | installsb 829 | xrsbvm 830 | xrsbso 831 | warpsx 832 | xrsbout 833 | else 834 | installsb 835 | installxray 836 | xrsbvm 837 | xrsbso 838 | warpsx 839 | xrsbout 840 | fi 841 | if [ -n "$argo" ]; then 842 | echo 843 | echo "=========启用Cloudflared-argo内核=========" 844 | if [ ! -e "$HOME/agsbx/cloudflared" ]; then 845 | argocore=$({ command -v curl >/dev/null 2>&1 && curl -Ls https://data.jsdelivr.com/v1/package/gh/cloudflare/cloudflared || wget -qO- https://data.jsdelivr.com/v1/package/gh/cloudflare/cloudflared; } | grep -Eo '"[0-9.]+"' | sed -n 1p | tr -d '",') 846 | echo "下载Cloudflared-argo最新正式版内核:$argocore" 847 | url="https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-$cpu"; out="$HOME/agsbx/cloudflared"; (command -v curl>/dev/null 2>&1 && curl -Lo "$out" -# --retry 2 "$url") || (command -v wget>/dev/null 2>&1 && timeout 3 wget -O "$out" --tries=2 "$url") 848 | chmod +x "$HOME/agsbx/cloudflared" 849 | fi 850 | if [ "$argo" = "vmpt" ]; then argoport=$(cat "$HOME/agsbx/vmpt" 2>/dev/null); echo "Vmess" > "$HOME/agsbx/vlvm"; elif [ "$argo" = "vwpt" ]; then argoport=$(cat "$HOME/agsbx/vwpt" 2>/dev/null); echo "Vless" > "$HOME/agsbx/vlvm"; fi; echo "$argoport" > "$HOME/agsbx/argoport.log" 851 | if [ -n "${agn}" ] && [ -n "${agk}" ]; then 852 | argoname='固定' 853 | nohup "$HOME/agsbx/cloudflared" tunnel --no-autoupdate --edge-ip-version auto --protocol http2 run --token "${agk}" >/dev/null 2>&1 & 854 | echo "${agn}" > "$HOME/agsbx/sbargoym.log" 855 | echo "${agk}" > "$HOME/agsbx/sbargotoken.log" 856 | else 857 | argoname='临时' 858 | nohup "$HOME/agsbx/cloudflared" tunnel --url http://localhost:$(cat $HOME/agsbx/argoport.log) --edge-ip-version auto --no-autoupdate --protocol http2 > "$HOME/agsbx/argo.log" 2>&1 & 859 | fi 860 | echo "申请Argo$argoname隧道中……请稍等" 861 | sleep 8 862 | if [ -n "${agn}" ] && [ -n "${agk}" ]; then 863 | argodomain=$(cat "$HOME/agsbx/sbargoym.log" 2>/dev/null) 864 | else 865 | argodomain=$(grep -a trycloudflare.com "$HOME/agsbx/argo.log" 2>/dev/null | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}') 866 | fi 867 | if [ -n "${argodomain}" ]; then 868 | echo "Argo$argoname隧道申请成功" 869 | else 870 | echo "Argo$argoname隧道申请失败,请稍后再试" 871 | fi 872 | sleep 5 873 | if find /proc/*/exe -type l 2>/dev/null | grep -E '/proc/[0-9]+/exe' | xargs -r readlink 2>/dev/null | grep -Eq 'agsbx/(s|x)' || pgrep -f 'agsbx/(s|x)' >/dev/null 2>&1 ; then 874 | echo "Argosbx脚本进程启动成功,安装完毕" && sleep 2 875 | else 876 | echo "Argosbx脚本进程未启动,安装失败" && exit 877 | fi 878 | fi 879 | } 880 | argosbxstatus(){ 881 | echo "=========当前三大内核运行状态=========" 882 | procs=$(find /proc/*/exe -type l 2>/dev/null | grep -E '/proc/[0-9]+/exe' | xargs -r readlink 2>/dev/null) 883 | if echo "$procs" | grep -Eq 'agsbx/s' || pgrep -f 'agsbx/s' >/dev/null 2>&1; then 884 | echo "Sing-box:运行中" 885 | else 886 | echo "Sing-box:未启用" 887 | fi 888 | if echo "$procs" | grep -Eq 'agsbx/x' || pgrep -f 'agsbx/x' >/dev/null 2>&1; then 889 | echo "Xray:运行中" 890 | else 891 | echo "Xray:未启用" 892 | fi 893 | if echo "$procs" | grep -Eq 'agsbx/c' || pgrep -f 'agsbx/c' >/dev/null 2>&1; then 894 | echo "Argo:运行中" 895 | else 896 | echo "Argo:未启用" 897 | fi 898 | } 899 | cip(){ 900 | ipbest(){ 901 | serip=$( (command -v curl >/dev/null 2>&1 && (curl -s4m5 -k "$v46url" 2>/dev/null || curl -s6m5 -k "$v46url" 2>/dev/null) ) || (command -v wget >/dev/null 2>&1 && (timeout 3 wget -4 -qO- --tries=2 "$v46url" 2>/dev/null || timeout 3 wget -6 -qO- --tries=2 "$v46url" 2>/dev/null) ) ) 902 | if echo "$serip" | grep -q ':'; then 903 | server_ip="[$serip]" 904 | echo "$server_ip" > "$HOME/agsbx/server_ip.log" 905 | else 906 | server_ip="$serip" 907 | echo "$server_ip" > "$HOME/agsbx/server_ip.log" 908 | fi 909 | } 910 | ipchange(){ 911 | v4v6 912 | if [ -z "$v4" ]; then 913 | vps_ipv4='无IPV4' 914 | vps_ipv6="$v6" 915 | location="$v6dq" 916 | elif [ -n "$v4" ] && [ -n "$v6" ]; then 917 | vps_ipv4="$v4" 918 | vps_ipv6="$v6" 919 | location="$v4dq" 920 | else 921 | vps_ipv4="$v4" 922 | vps_ipv6='无IPV6' 923 | location="$v4dq" 924 | fi 925 | if echo "$v6" | grep -q '^2a09'; then 926 | w6="【WARP】" 927 | fi 928 | if echo "$v4" | grep -q '^104.28'; then 929 | w4="【WARP】" 930 | fi 931 | echo 932 | argosbxstatus 933 | echo 934 | echo "=========当前服务器本地IP情况=========" 935 | echo "本地IPV4地址:$vps_ipv4 $w4" 936 | echo "本地IPV6地址:$vps_ipv6 $w6" 937 | echo "服务器地区:$location" 938 | echo 939 | sleep 2 940 | if [ "$ippz" = "4" ]; then 941 | if [ -z "$v4" ]; then 942 | ipbest 943 | else 944 | server_ip="$v4" 945 | echo "$server_ip" > "$HOME/agsbx/server_ip.log" 946 | fi 947 | elif [ "$ippz" = "6" ]; then 948 | if [ -z "$v6" ]; then 949 | ipbest 950 | else 951 | server_ip="[$v6]" 952 | echo "$server_ip" > "$HOME/agsbx/server_ip.log" 953 | fi 954 | else 955 | ipbest 956 | fi 957 | } 958 | ipchange 959 | rm -rf "$HOME/agsbx/jh.txt" 960 | uuid=$(cat "$HOME/agsbx/uuid") 961 | server_ip=$(cat "$HOME/agsbx/server_ip.log") 962 | sxname=$(cat "$HOME/agsbx/name" 2>/dev/null) 963 | xvvmcdnym=$(cat "$HOME/agsbx/cdnym" 2>/dev/null) 964 | echo "*********************************************************" 965 | echo "*********************************************************" 966 | echo "Argosbx脚本输出节点配置如下:" 967 | echo 968 | case "$server_ip" in 969 | 104.28*|\[2a09*) echo "检测到有WARP的IP作为客户端地址 (104.28或者2a09开头的IP),请把客户端地址上的WARP的IP手动更换为VPS本地IPV4或者IPV6地址" && sleep 3 ;; 970 | esac 971 | echo 972 | reym=$(cat "$HOME/agsbx/reym" 2>/dev/null) 973 | cfip() { echo $((RANDOM % 13 + 1)); } 974 | if [ -e "$HOME/agsbx/xray" ]; then 975 | private_key_x=$(cat "$HOME/agsbx/xrk/private_key" 2>/dev/null) 976 | public_key_x=$(cat "$HOME/agsbx/xrk/public_key" 2>/dev/null) 977 | short_id_x=$(cat "$HOME/agsbx/xrk/short_id" 2>/dev/null) 978 | enkey=$(cat "$HOME/agsbx/xrk/enkey" 2>/dev/null) 979 | fi 980 | if [ -e "$HOME/agsbx/sing-box" ]; then 981 | private_key_s=$(cat "$HOME/agsbx/sbk/private_key" 2>/dev/null) 982 | public_key_s=$(cat "$HOME/agsbx/sbk/public_key" 2>/dev/null) 983 | short_id_s=$(cat "$HOME/agsbx/sbk/short_id" 2>/dev/null) 984 | sskey=$(cat "$HOME/agsbx/sskey" 2>/dev/null) 985 | fi 986 | if grep xhttp-reality "$HOME/agsbx/xr.json" >/dev/null 2>&1; then 987 | echo "💣【 Vless-xhttp-reality-enc 】支持ENC加密,节点信息如下:" 988 | xhpt=$(cat "$HOME/agsbx/xhpt") 989 | vl_xh_link="vless://$uuid@$server_ip:$xhpt?encryption=$enkey&flow=xtls-rprx-vision&security=reality&sni=$reym&fp=chrome&pbk=$public_key_x&sid=$short_id_x&type=xhttp&path=$uuid-xh&mode=auto#${sxname}vl-xhttp-reality-$hostname" 990 | echo "$vl_xh_link" >> "$HOME/agsbx/jh.txt" 991 | echo "$vl_xh_link" 992 | echo 993 | fi 994 | if grep vless-xhttp "$HOME/agsbx/xr.json" >/dev/null 2>&1; then 995 | echo "💣【 Vless-xhttp-enc 】支持ENC加密,节点信息如下:" 996 | vxpt=$(cat "$HOME/agsbx/vxpt") 997 | vl_vx_link="vless://$uuid@$server_ip:$vxpt?encryption=$enkey&flow=xtls-rprx-vision&type=xhttp&path=$uuid-vx&mode=auto#${sxname}vl-xhttp-$hostname" 998 | echo "$vl_vx_link" >> "$HOME/agsbx/jh.txt" 999 | echo "$vl_vx_link" 1000 | echo 1001 | if [ -f "$HOME/agsbx/cdnym" ]; then 1002 | echo "💣【 Vless-xhttp-ecn-cdn 】支持ENC加密,节点信息如下:" 1003 | echo "注:默认地址 yg数字.ygkkk.dpdns.org 可自行更换优选IP域名,如是回源端口需手动修改443或者80系端口" 1004 | vl_vx_cdn_link="vless://$uuid@yg$(cfip).ygkkk.dpdns.org:$vxpt?encryption=$enkey&flow=xtls-rprx-vision&type=xhttp&host=$xvvmcdnym&path=$uuid-vx&mode=auto#${sxname}vl-xhttp-$hostname" 1005 | echo "$vl_vx_cdn_link" >> "$HOME/agsbx/jh.txt" 1006 | echo "$vl_vx_cdn_link" 1007 | echo 1008 | fi 1009 | fi 1010 | if grep vless-ws "$HOME/agsbx/xr.json" >/dev/null 2>&1; then 1011 | echo "💣【 Vless-ws-enc 】支持ENC加密,节点信息如下:" 1012 | vwpt=$(cat "$HOME/agsbx/vwpt") 1013 | vl_vw_link="vless://$uuid@$server_ip:$vwpt?encryption=$enkey&flow=xtls-rprx-vision&type=ws&path=$uuid-vw#${sxname}vl-ws-enc-$hostname" 1014 | echo "$vl_vw_link" >> "$HOME/agsbx/jh.txt" 1015 | echo "$vl_vw_link" 1016 | echo 1017 | if [ -f "$HOME/agsbx/cdnym" ]; then 1018 | echo "💣【 Vless-ws-enc-cdn 】支持ENC加密,节点信息如下:" 1019 | echo "注:默认地址 yg数字.ygkkk.dpdns.org 可自行更换优选IP域名,如是回源端口需手动修改443或者80系端口" 1020 | vl_vw_cdn_link="vless://$uuid@yg$(cfip).ygkkk.dpdns.org:$vwpt?encryption=$enkey&flow=xtls-rprx-vision&type=ws&host=$xvvmcdnym&path=$uuid-vw#${sxname}vl-ws-enc-cdn-$hostname" 1021 | echo "$vl_vw_cdn_link" >> "$HOME/agsbx/jh.txt" 1022 | echo "$vl_vw_cdn_link" 1023 | echo 1024 | fi 1025 | fi 1026 | if grep reality-vision "$HOME/agsbx/xr.json" >/dev/null 2>&1; then 1027 | echo "💣【 Vless-tcp-reality-vision 】节点信息如下:" 1028 | vlpt=$(cat "$HOME/agsbx/vlpt") 1029 | vl_link="vless://$uuid@$server_ip:$vlpt?encryption=none&flow=xtls-rprx-vision&security=reality&sni=$reym&fp=chrome&pbk=$public_key_x&sid=$short_id_x&type=tcp&headerType=none#${sxname}vl-reality-vision-$hostname" 1030 | echo "$vl_link" >> "$HOME/agsbx/jh.txt" 1031 | echo "$vl_link" 1032 | echo 1033 | fi 1034 | if grep ss-2022 "$HOME/agsbx/sb.json" >/dev/null 2>&1; then 1035 | echo "💣【 Shadowsocks-2022 】节点信息如下:" 1036 | sspt=$(cat "$HOME/agsbx/sspt") 1037 | ss_link="ss://$(echo -n "2022-blake3-aes-128-gcm:$sskey@$server_ip:$sspt" | base64 -w0)#${sxname}Shadowsocks-2022-$hostname" 1038 | echo "$ss_link" >> "$HOME/agsbx/jh.txt" 1039 | echo "$ss_link" 1040 | echo 1041 | fi 1042 | if grep vmess-xr "$HOME/agsbx/xr.json" >/dev/null 2>&1 || grep vmess-sb "$HOME/agsbx/sb.json" >/dev/null 2>&1; then 1043 | echo "💣【 Vmess-ws 】节点信息如下:" 1044 | vmpt=$(cat "$HOME/agsbx/vmpt") 1045 | vm_link="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vm-ws-$hostname\", \"add\": \"$server_ip\", \"port\": \"$vmpt\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"www.bing.com\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1046 | echo "$vm_link" >> "$HOME/agsbx/jh.txt" 1047 | echo "$vm_link" 1048 | echo 1049 | if [ -f "$HOME/agsbx/cdnym" ]; then 1050 | echo "💣【 Vmess-ws-cdn 】节点信息如下:" 1051 | echo "注:默认地址 yg数字.ygkkk.dpdns.org 可自行更换优选IP域名,如是回源端口需手动修改443或者80系端口" 1052 | vm_cdn_link="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vm-ws-cdn-$hostname\", \"add\": \"yg$(cfip).ygkkk.dpdns.org\", \"port\": \"$vmpt\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$xvvmcdnym\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1053 | echo "$vm_cdn_link" >> "$HOME/agsbx/jh.txt" 1054 | echo "$vm_cdn_link" 1055 | echo 1056 | fi 1057 | fi 1058 | if grep anytls-sb "$HOME/agsbx/sb.json" >/dev/null 2>&1; then 1059 | echo "💣【 AnyTLS 】节点信息如下:" 1060 | anpt=$(cat "$HOME/agsbx/anpt") 1061 | an_link="anytls://$uuid@$server_ip:$anpt?insecure=1&allowInsecure=1#${sxname}anytls-$hostname" 1062 | echo "$an_link" >> "$HOME/agsbx/jh.txt" 1063 | echo "$an_link" 1064 | echo 1065 | fi 1066 | if grep anyreality-sb "$HOME/agsbx/sb.json" >/dev/null 2>&1; then 1067 | echo "💣【 Any-Reality 】节点信息如下:" 1068 | arpt=$(cat "$HOME/agsbx/arpt") 1069 | ar_link="anytls://$uuid@$server_ip:$arpt?security=reality&sni=$reym&fp=chrome&pbk=$public_key_s&sid=$short_id_s&type=tcp&headerType=none#${sxname}any-reality-$hostname" 1070 | echo "$ar_link" >> "$HOME/agsbx/jh.txt" 1071 | echo "$ar_link" 1072 | echo 1073 | fi 1074 | if grep hy2-sb "$HOME/agsbx/sb.json" >/dev/null 2>&1; then 1075 | echo "💣【 Hysteria2 】节点信息如下:" 1076 | hypt=$(cat "$HOME/agsbx/hypt") 1077 | hy2_link="hysteria2://$uuid@$server_ip:$hypt?security=tls&alpn=h3&insecure=1&sni=www.bing.com#${sxname}hy2-$hostname" 1078 | echo "$hy2_link" >> "$HOME/agsbx/jh.txt" 1079 | echo "$hy2_link" 1080 | echo 1081 | fi 1082 | if grep tuic5-sb "$HOME/agsbx/sb.json" >/dev/null 2>&1; then 1083 | echo "💣【 Tuic 】节点信息如下:" 1084 | tupt=$(cat "$HOME/agsbx/tupt") 1085 | tuic5_link="tuic://$uuid:$uuid@$server_ip:$tupt?congestion_control=bbr&udp_relay_mode=native&alpn=h3&sni=www.bing.com&allow_insecure=1&allowInsecure=1#${sxname}tuic-$hostname" 1086 | echo "$tuic5_link" >> "$HOME/agsbx/jh.txt" 1087 | echo "$tuic5_link" 1088 | echo 1089 | fi 1090 | if grep socks5-xr "$HOME/agsbx/xr.json" >/dev/null 2>&1 || grep socks5-sb "$HOME/agsbx/sb.json" >/dev/null 2>&1; then 1091 | echo "💣【 Socks5 】客户端信息如下:" 1092 | sopt=$(cat "$HOME/agsbx/sopt") 1093 | echo "请配合其他应用内置代理使用,勿做节点直接使用" 1094 | echo "客户端地址:$server_ip" 1095 | echo "客户端端口:$sopt" 1096 | echo "客户端用户名:$uuid" 1097 | echo "客户端密码:$uuid" 1098 | echo 1099 | fi 1100 | argodomain=$(cat "$HOME/agsbx/sbargoym.log" 2>/dev/null) 1101 | [ -z "$argodomain" ] && argodomain=$(grep -a trycloudflare.com "$HOME/agsbx/argo.log" 2>/dev/null | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}') 1102 | if [ -n "$argodomain" ]; then 1103 | vlvm=$(cat $HOME/agsbx/vlvm 2>/dev/null) 1104 | if [ "$vlvm" = "Vmess" ]; then 1105 | vmatls_link1="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-tls-argo-$hostname-443\", \"add\": \"yg1.ygkkk.dpdns.org\", \"port\": \"443\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"tls\", \"sni\": \"$argodomain\", \"alpn\": \"\", \"fp\": \"chrome\"}" | base64 -w0)" 1106 | echo "$vmatls_link1" >> "$HOME/agsbx/jh.txt" 1107 | vmatls_link2="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-tls-argo-$hostname-8443\", \"add\": \"yg2.ygkkk.dpdns.org\", \"port\": \"8443\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"tls\", \"sni\": \"$argodomain\", \"alpn\": \"\", \"fp\": \"chrome\"}" | base64 -w0)" 1108 | echo "$vmatls_link2" >> "$HOME/agsbx/jh.txt" 1109 | vmatls_link3="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-tls-argo-$hostname-2053\", \"add\": \"yg3.ygkkk.dpdns.org\", \"port\": \"2053\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"tls\", \"sni\": \"$argodomain\", \"alpn\": \"\", \"fp\": \"chrome\"}" | base64 -w0)" 1110 | echo "$vmatls_link3" >> "$HOME/agsbx/jh.txt" 1111 | vmatls_link4="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-tls-argo-$hostname-2083\", \"add\": \"yg4.ygkkk.dpdns.org\", \"port\": \"2083\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"tls\", \"sni\": \"$argodomain\", \"alpn\": \"\", \"fp\": \"chrome\"}" | base64 -w0)" 1112 | echo "$vmatls_link4" >> "$HOME/agsbx/jh.txt" 1113 | vmatls_link5="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-tls-argo-$hostname-2087\", \"add\": \"yg5.ygkkk.dpdns.org\", \"port\": \"2087\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"tls\", \"sni\": \"$argodomain\", \"alpn\": \"\", \"fp\": \"chrome\"}" | base64 -w0)" 1114 | echo "$vmatls_link5" >> "$HOME/agsbx/jh.txt" 1115 | vmatls_link6="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-tls-argo-$hostname-2096\", \"add\": \"[2606:4700::0]\", \"port\": \"2096\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"tls\", \"sni\": \"$argodomain\", \"alpn\": \"\", \"fp\": \"chrome\"}" | base64 -w0)" 1116 | echo "$vmatls_link6" >> "$HOME/agsbx/jh.txt" 1117 | vma_link7="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-argo-$hostname-80\", \"add\": \"yg6.ygkkk.dpdns.org\", \"port\": \"80\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1118 | echo "$vma_link7" >> "$HOME/agsbx/jh.txt" 1119 | vma_link8="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-argo-$hostname-8080\", \"add\": \"yg7.ygkkk.dpdns.org\", \"port\": \"8080\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1120 | echo "$vma_link8" >> "$HOME/agsbx/jh.txt" 1121 | vma_link9="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-argo-$hostname-8880\", \"add\": \"yg8.ygkkk.dpdns.org\", \"port\": \"8880\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1122 | echo "$vma_link9" >> "$HOME/agsbx/jh.txt" 1123 | vma_link10="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-argo-$hostname-2052\", \"add\": \"yg9.ygkkk.dpdns.org\", \"port\": \"2052\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1124 | echo "$vma_link10" >> "$HOME/agsbx/jh.txt" 1125 | vma_link11="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-argo-$hostname-2082\", \"add\": \"yg10.ygkkk.dpdns.org\", \"port\": \"2082\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1126 | echo "$vma_link11" >> "$HOME/agsbx/jh.txt" 1127 | vma_link12="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-argo-$hostname-2086\", \"add\": \"yg11.ygkkk.dpdns.org\", \"port\": \"2086\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1128 | echo "$vma_link12" >> "$HOME/agsbx/jh.txt" 1129 | vma_link13="vmess://$(echo "{ \"v\": \"2\", \"ps\": \"${sxname}vmess-ws-argo-$hostname-2095\", \"add\": \"[2400:cb00:2049::0]\", \"port\": \"2095\", \"id\": \"$uuid\", \"aid\": \"0\", \"scy\": \"auto\", \"net\": \"ws\", \"type\": \"none\", \"host\": \"$argodomain\", \"path\": \"/$uuid-vm\", \"tls\": \"\"}" | base64 -w0)" 1130 | echo "$vma_link13" >> "$HOME/agsbx/jh.txt" 1131 | elif [ "$vlvm" = "Vless" ]; then 1132 | vwatls_link1="vless://$uuid@yg$(cfip).ygkkk.dpdns.org:443?encryption=$enkey&flow=xtls-rprx-vision&type=ws&host=$argodomain&path=$uuid-vw&security=tls&sni=$argodomain&fp=chrome&insecure=0&allowInsecure=0#${sxname}vless-ws-tls-argo-enc-vision-$hostname" 1133 | echo "$vwatls_link1" >> "$HOME/agsbx/jh.txt" 1134 | vwa_link2="vless://$uuid@yg$(cfip).ygkkk.dpdns.org:80?encryption=$enkey&flow=xtls-rprx-vision&type=ws&host=$argodomain&path=$uuid-vw&security=none#${sxname}vless-ws-argo-enc-vision-$hostname" 1135 | echo "$vwa_link2" >> "$HOME/agsbx/jh.txt" 1136 | fi 1137 | sbtk=$(cat "$HOME/agsbx/sbargotoken.log" 2>/dev/null) 1138 | if [ -n "$sbtk" ]; then 1139 | nametn="Argo固定隧道token:$sbtk" 1140 | fi 1141 | argoshow=$( 1142 | echo "Argo隧道端口正在使用$vlvm-ws主协议端口:$(cat $HOME/agsbx/argoport.log 2>/dev/null) 1143 | Argo域名:$argodomain 1144 | $nametn 1145 | 1146 | 1、💣443端口的$vlvm-ws-tls-argo节点(优选IP与443系端口随便换) 1147 | ${vmatls_link1}${vwatls_link1} 1148 | 1149 | 2、💣80端口的$vlvm-ws-argo节点(优选IP与80系端口随便换) 1150 | ${vma_link7}${vwa_link2} 1151 | " 1152 | ) 1153 | fi 1154 | echo "---------------------------------------------------------" 1155 | echo "$argoshow" 1156 | echo 1157 | echo "---------------------------------------------------------" 1158 | echo "聚合节点信息,请进入 $HOME/agsbx/jh.txt 文件目录查看或者运行 cat $HOME/agsbx/jh.txt 查看" 1159 | echo "=========================================================" 1160 | echo "相关快捷方式如下:(首次安装成功后需重连SSH,agsbx快捷方式才可生效)" 1161 | showmode 1162 | } 1163 | if ! find /proc/*/exe -type l 2>/dev/null | grep -E '/proc/[0-9]+/exe' | xargs -r readlink 2>/dev/null | grep -Eq 'agsbx/(s|x)' && ! pgrep -f 'agsbx/(s|x)' >/dev/null 2>&1; then 1164 | for P in /proc/[0-9]*; do if [ -L "$P/exe" ]; then TARGET=$(readlink -f "$P/exe" 2>/dev/null); if echo "$TARGET" | grep -qE '/agsbx/c|/agsbx/s|/agsbx/x'; then PID=$(basename "$P"); kill "$PID" 2>/dev/null && echo "Killed $PID ($TARGET)" || echo "Could not kill $PID ($TARGET)"; fi; fi; done 1165 | kill -15 $(pgrep -f 'agsbx/s' 2>/dev/null) $(pgrep -f 'agsbx/c' 2>/dev/null) $(pgrep -f 'agsbx/x' 2>/dev/null) >/dev/null 2>&1 1166 | v4orv6(){ 1167 | if [ -z "$( (command -v curl >/dev/null 2>&1 && curl -s4m5 -k "$v46url" 2>/dev/null) || (command -v wget >/dev/null 2>&1 && timeout 3 wget -4 -qO- --tries=2 "$v46url" 2>/dev/null) )" ]; then 1168 | echo -e "nameserver 2a00:1098:2b::1\nnameserver 2a00:1098:2c::1" > /etc/resolv.conf 1169 | fi 1170 | if [ -n "$( (command -v curl >/dev/null 2>&1 && curl -s6m5 -k "$v46url" 2>/dev/null) || (command -v wget >/dev/null 2>&1 && timeout 3 wget -6 -qO- --tries=2 "$v46url" 2>/dev/null) )" ]; then 1171 | sendip="2606:4700:d0::a29f:c001" 1172 | xendip="[2606:4700:d0::a29f:c001]" 1173 | xsdns="[2001:4860:4860::8888]" 1174 | sbdnsyx="ipv6_only" 1175 | else 1176 | sendip="162.159.192.1" 1177 | xendip="162.159.192.1" 1178 | xsdns="8.8.8.8" 1179 | sbdnsyx="ipv4_only" 1180 | fi 1181 | } 1182 | v4orv6 1183 | echo "VPS系统:$op" 1184 | echo "CPU架构:$cpu" 1185 | echo "Argosbx脚本未安装,开始安装…………" && sleep 2 1186 | ins 1187 | cip 1188 | echo 1189 | else 1190 | echo "Argosbx脚本已安装" 1191 | echo 1192 | argosbxstatus 1193 | echo 1194 | echo "相关快捷方式如下:" 1195 | showmode 1196 | exit 1197 | fi 1198 | --------------------------------------------------------------------------------