node-xhttp
v1.0.3
Published
A serverless xhttp server
Maintainers
Readme
serverless-xhttp
A serverless VLESS XHTTP proxy server with Nezha monitoring integration.
Features
- 🚀 VLESS Protocol: Modern and efficient proxy protocol
- 🔧 XHTTP Transport: HTTP-based transport layer
- 📊 Nezha Integration: Built-in monitoring with Nezha v0/v1 support
- ☁️ Serverless Ready: Designed for serverless environments
- 🔒 TLS Support: Automatic TLS for specific ports
- ⚡ High Performance: Optimized buffer management and session handling
Installation
NPM Package
npm install node-xhttpDirect Start
npx node-xhttpEnvironment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| PORT | No | 3000 | HTTP service port and subscription port |
| UUID | No | Auto-generated | UUID for VLESS protocol |
| NEZHA_SERVER | No | - | Nezha panel domain (v1: nz.aaa.com:8008, v0: nz.aaa.com) |
| NEZHA_PORT | No | - | Nezha v0 agent port (443,8443,2096,2087,2083,2053 enable TLS) |
| NEZHA_KEY | No | - | Nezha v1 or v0 secret key |
| DOMAIN | No | - | Project domain |
| XPATH | No | Auto-generated | Node path |
| AUTO_ACCESS | No | false | Auto keep-alive (true/false) |
| SUB_PATH | No | sub | Node subscription path |
| NAME | No | - | Node name |
Example Configuration
export PORT=8080
export UUID="your-uuid-here"
export NEZHA_SERVER="nz.example.com:8008"
export NEZHA_KEY="your-nezha-key"
export DOMAIN="your-domain.com"
export AUTO_ACCESS=trueAPI
HTTP Endpoints
GET /- Health check and statusGET /sub- Subscription endpoint
Subscription Format
http://your-domain:port/subDevelopment
Prerequisites
- Node.js >= 16.0.0
- npm >= 7.0.0
Local Development
# Clone repository
git clone https://github.com/eooce/serverless-xhttp.git
cd serverless-xhttp
# Install dependencies
npm install
# Start development server
npm run devLicense
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues, please file an issue on GitHub.
Note: This is a serverless VLESS XHTTP proxy server with Nezha monitoring integration. Make sure to configure your environment variables properly for production use.
