A high-performance, self-hosted quality assurance toolkit for VPN proxy configurations. Namira Core validates, benchmarks, and ranks VMess, VLESS, Trojan, and Shadowsocks connections with real TCP handshakes and latency measurements.
# Clone the repository
git clone https://github.com/NamiraNet/namira-core.git
cd namira-core
# Create .env file with your configuration
cp .env.example .env
# Edit .env with your settings
# Start the services
docker-compose up -d
Access the API at http://localhost:8080
# Build the application
make build-local
# Check VPN configurations from file
./bin/namira-core check --file proxies.txt
# Check individual configurations
./bin/namira-core check --config "vmess://..." --config "vless://..."
Namira Core processes VPN configurations through a pipeline of operations to validate their connectivity and measure performance:
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ │ │ │ │ │ │ │ │ │
│ Input │───►│ Parser │───►│ Checker │───►│ Analyzer │───►│ Output │
│ VPN Links │ │ │ │ │ │ │ │ Results │
│ │ │ │ │ │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ │ │ │ │ │
│ Protocol │ │ TCP │ │ Latency │
│ Extraction │ │ Handshake │ │ Measurement │
│ │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘
Links are queued for processing in the worker pool
Parsing:
Supported protocols: VMess, VLESS, Shadowsocks, Trojan
Checking:
Latency is measured with multiple samples for accuracy
Analysis:
Metadata is enriched (location, provider, etc.)
Output:
The worker pool manages concurrency, ensuring optimal resource utilization while preventing system overload.
The application is structured with clean separation of concerns:
The application is configured via environment variables:
| Variable | Default | Description |
|---|---|---|
| SERVER_PORT | 8080 | Port for the HTTP server |
| SERVER_HOST | localhost | Host for the HTTP server |
| SERVER_READ_TIMEOUT | 30s | Server read timeout |
| SERVER_WRITE_TIMEOUT | 30s | Server write timeout |
| SERVER_IDLE_TIMEOUT | 60s | Server idle timeout |
| Variable | Default | Description |
|---|---|---|
| WORKER_COUNT | 5 | Number of workers |
| WORKER_QUEUE_SIZE | 100 | Size of worker queue |
| Variable | Default | Description |
|---|---|---|
| REDIS_ADDR | localhost:6379 | Redis server address |
| REDIS_PASSWORD | - | Redis password |
| REDIS_DB | 0 | Redis database number |
| REDIS_RESULT_TTL | 24h | Redis result TTL |
| Variable | Default | Description |
|---|---|---|
| GITHUB_OWNER | - | GitHub repository owner |
| GITHUB_REPO | - | GitHub repository name |
| SSH_KEY_PATH | ./keys/github_deploy_key | Path to GitHub SSH key for pushing result in github repo |
| Variable | Default | Description |
|---|---|---|
| LOG_LEVEL | info | Logging level (debug, info, warn, error) |
| APP_TIMEOUT | 10s | Connection timeout per proxy test |
| REFRESH_INTERVAL | 1h | Background refresh interval |
| MAX_CONCURRENT | 50 | Maximum concurrent connections |
| ENCRYPTION_KEY | - | Key for encrypting sensitive data |
| Variable | Default | Description |
|---|---|---|
| TELEGRAM_BOT_TOKEN | - | Telegram bot token |
| TELEGRAM_CHANNEL | - | Telegram channel username or ID for forwarding |
| TELEGRAM_TEMPLATE | - | Template for Telegram messages |
| TELEGRAM_QR_CONFIG | - | QR configuration for Telegram |
| TELEGRAM_PROXY_URL | - | Proxy URL for Telegram |
| TELEGRAM_SENDING_INTERVAL | 10s | Interval between sending messages |
Clone the repository:
bash
git clone https://github.com/NamiraNet/namira-core.git
cd namira-core
Create a .env file with your configuration:
bash
cp .env.example .env
# Edit .env with your preferred text editor
Start the services:
bash
make prod # For production environment
# OR
make dev # For development environment with logs
Check if the service is healthy:
bash
make health
Clone the repository:
bash
git clone https://github.com/NamiraNet/namira-core.git
cd namira-core
Install dependencies:
bash
make install
Build the application:
bash
make build-local
Run the application:
bash
make run-local
# OR run directly
./bin/namira-core api
Run make help to see all available commands:
Namira Core Makefile
Usage: make [target]
Targets:
build Build Docker containers without starting them
build-local Build the Go binary locally
build-release Build optimized release binary
clean Clean up Docker resources and build artifacts
dev Start development environment with Docker Compose
docker-build Build Docker image
docker-push Build and push Docker image
down Stop Docker Compose services
health Check service health
help Show this help message
install Install project dependencies
lint Run linters
logs View Docker Compose logs
prod Start production environment with Docker Compose
run-local Run the application locally
test Run all tests / Coming Soon
test-coverage Run tests with coverage / Coming Soon
up Start Docker Compose services
version Show version information
The CLI provides a powerful interface for batch checking VPN configurations without requiring a full server setup.
# Show version
./bin/namira-core --version
# Display help
./bin/namira-core check --help
# Check configurations from a file
./bin/namira-core check --file proxies.txt
# Check individual configurations
./bin/namira-core check --config "vmess://..." --config "vless://..."
# Mix file and individual configs
./bin/namira-core check --file proxies.txt --config "trojan://..."
| Flag | Short | Default | Description |
|---|---|---|---|
--file |
-i |
- | File containing VPN configurations (one per line) |
--config |
-c |
- | VPN configuration strings (can be used multiple times) |
--format |
-f |
table |
Output format: table, json, csv |
--output |
-o |
stdout | Output file path |
--progress |
- | true |
Show progress during checking |
--concurrent |
-j |
10 |
Maximum concurrent checks |
--timeout |
-t |
10s |
Timeout for each check |
# Check all configurations in a file
./bin/namira-core check --file proxies.txt
# Check with custom concurrency and timeout
./bin/namira-core check --file proxies.txt --concurrent 20 --timeout 15s
# Check single configuration
./bin/namira-core check --config "vmess://eyJ2IjoiMiIsInBzIjoi..."
# Check multiple configurations
./bin/namira-core check \
--config "vmess://eyJ2IjoiMiIsInBzIjoi..." \
--config "vless://..." \
--config "trojan://..."
# Silent mode with JSON output
./bin/namira-core check \
--file proxies.txt \
--format json \
--output results.json \
--progress false
# High concurrency for large files
./bin/namira-core check \
--file large_proxy_list.txt \
--concurrent 50 \
--timeout 5s \
--format csv \
--output report.csv
Your input file should contain one VPN configuration per line:
vmess://eyJ2IjoiMiIsInBzIjoidGVzdCIsImFkZCI6IjEuMS4xLjEiLCJwb3J0IjoiNDQzIiwiaWQiOiJ0ZXN0LWlkIiwiYWlkIjoiMCIsInNjeSI6ImF1dG8iLCJuZXQiOiJ3cyIsInR5cGUiOiJub25lIiwiaG9zdCI6IiIsInBhdGgiOiIvIiwidGxzIjoidGxzIiwic25pIjoiIn0=
vless://test-id@2.2.2.2:443?encryption=none&security=tls&type=ws&path=/&host=#test
trojan://password@3.3.3.3:443?security=tls&type=tcp&headerType=none#test
ss://YWVzLTI1Ni1nY206cGFzc3dvcmQ@4.4.4.4:8388#test
GET /health
Returns service health status.
This endpoint accepts proxy configurations to initiate a background scanning job.
You can submit configurations in two formats:
POST /scan
Content-Type: application/json
{
"configs": [
"vmess://xxxxxxxxxxxxxxxxxxxx",
"vless://yyyyyyyyyyyyyyyyyyyy"
]
}
POST /scan
Content-Type: text/plain
vmess://xxxxxxxxxxxxxxxxxxxx
vless://yyyyyyyyyyyyyyyyyyyy
trojan://zzzzzzzzzzzzzzzzzz
curl -X POST http://localhost:8080/scan \
-H "Content-Type: text/plain" \
--data-binary @proxies.txt
vmess://xxxxxxxxxxxxxxxxxxxx
vless://yyyyyyyyyyyyyyyyyyyy
trojan://zzzzzzzzzzzzzzzzzz
GET /jobs/{job_id}
# Check a few configurations quickly
./bin/namira-core check \
--config "vmess://..." \
--config "vless://..." \
--format table
# Process large list with optimal settings
./bin/namira-core check \
--file large_list.txt \
--concurrent 30 \
--timeout 8s \
--format json \
--output results.json \
--progress
curl -X POST http://localhost:8080/scan \
-H "Content-Type: application/json" \
-H "X-API-KEY: apikey" \
-d '{"configs": ["vmess://...", "vless://..."]}'
curl -X GET -H "X-API-KEY: apikey" http://localhost:8080/jobs/{job_id}
Namira Core provides OpenAPI-compliant documentation to help you explore and interact with the API.
docs/swagger.yaml – OpenAPI specification in YAML formatdocs/swagger.json – OpenAPI specification in JSON formatdocs/docs.go – Go-based embedded Swagger handler for serving docs via the API| Issue | Cause | Solution |
|---|---|---|
| All connections timeout | Firewall blocking outbound connections | Ope |
$ claude mcp add namira-core \
-- python -m otcore.mcp_server <graph>