fix(network): wired ping probe, AP/WS and systemd notify hardening
- Add hasWiredInternetProbe and export; AP mode uses it with hasInternet - systemd-env: strip NOTIFY_SOCKET from env early; client uses unix_dgram - Strip NOTIFY_SOCKET from frpc/ttyd spawn env in watchdog and frpc - WS: pong miss debounce; AP net monitor consecutive-fail debounce Made-with: Cursor
This commit is contained in:
@@ -67,9 +67,13 @@ class Watchdog {
|
||||
if (this._stopped) return;
|
||||
|
||||
log.info(this._name, '启动进程...');
|
||||
const { env: optsEnv, ...restSpawn } = this._spawnOpts;
|
||||
const env = { ...process.env, ...optsEnv };
|
||||
delete env.NOTIFY_SOCKET; // 避免 frpc 等子进程向 systemd 发 notify,触发非主 PID 拒收
|
||||
const proc = spawn(this._bin, this._args, {
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
...this._spawnOpts,
|
||||
...restSpawn,
|
||||
env,
|
||||
});
|
||||
this._proc = proc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user