Initial commit - full huishou project

This commit is contained in:
jiapengyu
2026-07-27 14:07:26 +08:00
commit 60790ad1b3
39127 changed files with 5989265 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
const { Client } = require('ssh2');
const conn = new Client();
conn.on('ready', () => {
console.log('=== 检查SSL配置 ===');
conn.exec('find /etc/nginx -name "*.conf" | xargs grep -l ssl 2>/dev/null', (err, stream) => {
if (err) { console.log('ERR:', err); }
let data = '';
stream.on('data', (d) => data += d.toString());
stream.on('close', () => {
console.log('SSL配置文件:', data);
console.log('\n=== 直接访问HTTP ===');
conn.exec('curl -s http://127.0.0.1:4001/ | head -5', (err2, stream2) => {
if (err2) { console.log('ERR2:', err2); conn.end(); return; }
stream2.on('data', (d) => console.log(d.toString()));
stream2.on('close', () => {
console.log('\n=== 检查完整请求响应 ===');
conn.exec('curl -s -v http://127.0.0.1:4001/ 2>&1 | head -30', (err3, stream3) => {
if (err3) { console.log('ERR3:', err3); conn.end(); return; }
stream3.on('data', (d) => console.log(d.toString()));
stream3.on('close', () => conn.end());
});
});
});
});
});
});
conn.connect({ host: 'hs.yifenbao.cn', port: 22, username: 'root', password: 'Torch1112' });