下载解压ech
https://github.com/byJoey/ech-wk/releases
1、ech.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| const { exec } = require('child_process');
function runEchWorkers() { const command = './ech-workers -f ech.babay.gv.uy:443 -routing bypass_cn -l 0.0.0.0:31000 -token jkmmbb -ip www.visakorea.com'; console.log('正在启动ech-workers服务...'); const process = exec(command, (error, stdout, stderr) => { if (error) { console.error('启动失败:', error.message); return; } if (stderr) { console.error('服务错误:', stderr); return; } console.log('服务输出:', stdout); });
// 监听进程退出 process.on('exit', (code) => { console.log(`服务已退出,退出码: ${code}`); });
// 监听进程错误 process.on('error', (err) => { console.error('进程错误:', err); }); }
// 启动服务 runEchWorkers();
|