fix(ttyd): add -W writable and -i 127.0.0.1 flags

Made-with: Cursor
This commit is contained in:
stswangzhiping
2026-03-15 23:22:05 +08:00
parent 54476c82b6
commit 1ff9fd90e5

View File

@@ -129,7 +129,7 @@ async function startTtyd() {
try { try {
const shell = fs.existsSync('/bin/bash') ? '/bin/bash' : '/bin/sh'; const shell = fs.existsSync('/bin/bash') ? '/bin/bash' : '/bin/sh';
const proc = spawn(TTYD_BIN, ['-p', String(TTYD_PORT), shell], { const proc = spawn(TTYD_BIN, ['-p', String(TTYD_PORT), '-i', '127.0.0.1', '-W', shell], {
stdio: 'ignore', stdio: 'ignore',
detached: true, detached: true,
}); });