修改后台权限

This commit is contained in:
yoyuzh
2026-03-24 14:30:59 +08:00
parent 00f902f475
commit b2d9db7be9
9310 changed files with 1246063 additions and 48 deletions

43
node_modules/is-in-ssh/readme.md generated vendored Normal file
View File

@@ -0,0 +1,43 @@
# is-in-ssh
> Check if the process is running in an SSH session
Useful for determining if your Node.js process is being executed over SSH, which can affect how you handle operations like opening files, browsers, or using system-specific commands.
## Install
```sh
npm install is-in-ssh
```
## Usage
```js
import isInSsh from 'is-in-ssh';
if (isInSsh) {
console.log('Running in an SSH session');
}
```
## How it works
The package detects SSH sessions by checking for the presence of standard SSH environment variables:
- `SSH_CONNECTION`
- `SSH_CLIENT`
- `SSH_TTY`
These variables are automatically set by SSH servers when establishing a connection.
## Limitations
- The detection relies on environment variables, which could theoretically be spoofed or cleared
- May return `true` for `ssh localhost` connections (which are technically SSH sessions)
- Environment variables might not be inherited by all child processes or after privilege escalation (e.g., `sudo`)
## Related
- [is-wsl](https://github.com/sindresorhus/is-wsl) - Check if the process is running inside Windows Subsystem for Linux
- [is-docker](https://github.com/sindresorhus/is-docker) - Check if the process is running inside a Docker container
- [is-inside-container](https://github.com/sindresorhus/is-inside-container) - Check if the process is running inside a container