3x-ui/xray/AGENTS.md
vladon 74267cd320 fix: enhance Telegram bot's long-polling management
- Improved handling of concurrent starts by stopping existing long-polling loops.
- Implemented mutex for thread-safe access to shared state variables.
- Updated OnReceive method to prevent multiple executions.
- Enhanced Stop method for better resource cleanup and state management.
2025-12-26 00:49:01 +03:00

19 lines
799 B
Markdown

# AGENTS.md (xray/)
`xray/` wraps **Xray-core process management** (start/stop/restart, API traffic reads) and defines where runtime files live.
## Runtime file paths (via `config/`)
- **Binary**: `XUI_BIN_FOLDER/xray-<goos>-<goarch>`
- Example on Linux amd64: `bin/xray-linux-amd64`
- **Config**: `XUI_BIN_FOLDER/config.json`
- **Geo files**: `XUI_BIN_FOLDER/{geoip.dat,geosite.dat,...}`
- **Logs**: `XUI_LOG_FOLDER/*` (default `/var/log` on non-Windows)
## Notes for changes
- Keep OS/arch naming consistent with `GetBinaryName()` (`xray-<GOOS>-<GOARCH>`).
- The web panel may attempt to restart Xray periodically; if the binary is missing, Xray-related operations will fail but the panel can still run.
- Be careful with process/exec changes: they are security- and stability-sensitive.