Skip to content

mkiani12/x-sub-store

Repository files navigation

V2Ray Subscription Hub

A Docker-first, secure V2Ray subscription aggregator and management system.

Features

  • Centralized Hub: Merge multiple subscriptions (Hiddify, Xray, etc.) into one.
  • Admin Panel: Manage users, upstream sources, and static nodes.
  • Secure: Per-user secret tokens, no public signup, encrypted token storage.
  • Performance: Caching, concurrent fetching, deduplication.
  • Docker First: Easy deployment with Nginx and SSL automation.

Quick Start (Dev)

  1. Clone the repo.
  2. cp .env.example .env and edit it.
  3. Start the stack:
    docker compose up -d --build
  4. Create an admin user:
    docker compose exec app bun run scripts/create-admin.ts --email admin@example.com --password secret
  5. Access the admin panel at http://localhost/admin (or your domain).

Production Deployment

  1. Set DOMAIN and EMAIL in .env.
  2. Initialize SSL certificates:
    chmod +x ops/ssl/init.sh
    ./ops/ssl/init.sh
  3. The app will be available at https://your-domain.com.

Management

Managing Users

  • Login to Admin Panel.
  • Create users. Each user gets a unique Subscription URL.
  • Give this URL to the user for their V2Ray client (v2rayNG, V2Box, etc.).

Managing Upstreams

  • Global: Applies to ALL users.
  • User: Applies to specific user only.
  • Supports raw text lists or base64 subscription links.

Token Rotation

  • In User details, click "Rotate Token" to invalidate the old URL and generate a new one immediately.

Development

  • Run bun install
  • Run bun dev for local dev server (requires local Mongo).
  • Run bun test for unit tests.

Architecture

  • Backend: Nuxt 3 (Nitro)
  • Database: MongoDB (Mongoose)
  • Frontend: Nuxt UI (Tailwind)
  • Security: Argon2 hashing, AES-256-GCM token encryption, H3 sessions.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors