Skip to content

alexvoste/ForgePanel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ForgeZero XRAY Panel

A robust, single-binary, Go-native management panel for VLESS/Xray VPN servers.

License Go

Overview / 概览

ForgeZero XRAY Panel is a lightweight, Go-native management panel designed to streamline VLESS and Xray server administration. It delivers a single-binary deployment model with minimal dependencies and efficient runtime behavior. The project is built for system administrators, privacy enthusiasts, and server operators who need a reliable web management interface with strong performance and low overhead.

ForgeZero XRAY Panel 是一个轻量、原生 Go 的管理面板,旨在简化 VLESS 和 Xray 服务器管理。它提供单二进制部署模型,依赖极少,运行高效。该项目面向系统管理员、隐私爱好者和服务器运营者,提供可靠的 Web 管理界面,性能强,开销低。

Key Features / 主要特点

  • Single-Binary Deployment: Easy setup, minimal dependencies, and portable installation.

  • Go-Native Backend & SSR Frontend: Full Go implementation with server-side rendered UI for efficiency and simplicity.

  • Xray gRPC Integration: Direct control over Xray core via gRPC for powerful management.

  • Automated Initial Admin Setup: Secure, one-time console output provides initial admin credentials automatically.

  • User & Subscription Management: Full CRUD support for VPN users with traffic limits, expiry dates, and status control.

  • Link & QR Code Generation: Seamless client onboarding with VLESS link and QR code generation.

  • Multilingual UI: Built-in support for English, Russian, and Simplified Chinese.

  • Secure Storage: Passwords hashed with bcrypt, and records saved to admin.json and users.json.

  • 单二进制部署: 简单安装,依赖极少,便于携带。

  • 原生 Go 后端与 SSR 前端: 完整 Go 实现,服务器端渲染 UI,效率高且结构清晰。

  • Xray gRPC 集成: 通过 gRPC 直接管理 Xray 核心,控制能力强。

  • 自动初始管理员设置: 首次启动自动生成安全凭据,并通过控制台一次性输出。

  • 用户和订阅管理: 完整的用户增删改查,支持流量限制、过期日期和状态管理。

  • 链接与二维码生成: 无缝客户端配置,支持 VLESS 链接和二维码生成。

  • 多语言界面: 内置支持英语、俄语和简体中文。

  • 安全存储: 使用 bcrypt 加密密码,数据保存到 admin.jsonusers.json

Initial Admin Setup / 初始管理员设置

On first backend startup only, if no admin exists in the database, the server generates an initial administrator account automatically. The generated credentials are stored in admin.json and printed to stdout exactly one time.

Example output:

!!! INITIAL ADMIN CREDENTIALS CREATED !!!
USERNAME: <generated_username>
PASSWORD: <generated_password>
PLEASE STORE THESE SECURELY. THEY WILL NOT BE SHOWN AGAIN.

Subsequent launches do not generate or print admin credentials again.

仅在后端首次启动时,如果数据库中不存在管理员,服务器会自动生成初始管理员账号。生成的凭据会保存到 admin.json,并且仅会通过标准输出打印一次。

示例输出:

!!! INITIAL ADMIN CREDENTIALS CREATED !!!
USERNAME: <generated_username>
PASSWORD: <generated_password>
PLEASE STORE THESE SECURELY. THEY WILL NOT BE SHOWN AGAIN.

后续启动不会再次生成或打印管理员凭据。

Backend Behavior / 后端行为

The backend is managed by cmd/vpn-panel/main.go and internal/backend/server.go. On startup, the server attempts to load admin.json. If the file is missing or no admin record exists, it generates a secure admin username and password, hashes the password with bcrypt, saves the admin record, and prints the one-time credentials to stdout.

There is no POST /api/v1/admin/setup endpoint for initial admin creation. User records are stored separately in users.json.

后端由 cmd/vpn-panel/main.gointernal/backend/server.go 管理。启动时,服务器会尝试加载 admin.json。如果文件缺失或不存在管理员记录,则会生成安全的管理员用户名和密码,并使用 bcrypt 对密码进行哈希,保存管理员记录并将一次性凭据打印到标准输出。

初始化管理员创建不通过 POST /api/v1/admin/setup 进行。用户记录单独保存到 users.json

Login & Dashboard Flow / 登录与仪表板流程

The frontend always displays the standard login page immediately. Users authenticate with the credentials printed by the backend during first launch. Login is performed via POST /api/v1/auth/login, which returns a Bearer token. After successful authentication, the frontend redirects to the dashboard for user and subscription management.

前端始终直接显示标准登录页面。用户使用后端首次启动时打印的凭据进行登录。登录通过 POST /api/v1/auth/login 完成,返回 Bearer 令牌。验证成功后,前端会跳转到仪表板,进行用户和订阅管理。

Change Password / 修改密码

Admin password updates are handled via POST /api/v1/admin/change-password. The request must include the current password and the new password. The backend validates the current password, hashes the new password with bcrypt, and updates admin.json.

管理员密码更改通过 POST /api/v1/admin/change-password 进行。请求必须包含当前密码和新密码。后端验证当前密码,使用 bcrypt 哈希新密码,并更新 admin.json

Getting Started / 快速开始

Prerequisites / 前提条件

  • Go 1.20+

  • Xray running with gRPC management enabled

  • Go 1.20+

  • Xray 已启动并启用 gRPC 管理

Installation & Build / 安装与构建

git clone https://github.com/alexvoste/forgepanel.git
cd forgepanel
go mod tidy
go build -o vpn-panel ./cmd/vpn-panel/

Running the Server / 运行服务器

./vpn-panel

The server listens on http://localhost:8080 by default. For production use, proxy traffic through HTTPS with Nginx or another reverse proxy.

Watch the console for initial admin credentials on first run.

服务器默认监听 http://localhost:8080。在生产环境中建议通过 Nginx 或其他反向代理启用 HTTPS。

首次运行时请关注控制台输出,以获取初始管理员凭据。

Usage / 使用指南

  • Open the web interface at http://localhost:8080

  • Log in with the credentials printed on first startup

  • Add, edit, delete VPN users

  • Configure traffic limits, expiry dates, and user status

  • Generate VLESS links and QR codes for client setup

  • Switch UI language between English, Russian, and Simplified Chinese

  • 在浏览器中打开 http://localhost:8080

  • 使用首次启动时控制台打印的凭据登录

  • 添加、编辑、删除 VPN 用户

  • 配置流量限制、过期日期和用户状态

  • 生成 VLESS 链接和二维码以便客户端配置

  • 在英语、俄语和简体中文之间切换界面语言

Development / 开发指南

Contributions are welcome. Use the standard Git workflow:

git clone https://github.com/alexvoste/forgepanel.git
git checkout -b feature/your-feature
git push origin feature/your-feature

Then open a pull request for review.

欢迎贡献。请遵循标准 Git 工作流程:

git clone https://github.com/alexvoste/forgepanel.git
git checkout -b feature/your-feature
git push origin feature/your-feature

然后提交 Pull Request 进行审查。

License / 许可

Distributed under the MIT License. See LICENSE for details.

Copyright (c) 2026 Alex Voste.

根据 MIT 许可证分发。详情请参阅 LICENSE

版权所有 © 2026 Alex Voste.

About

A robust, single-binary, Go-native management panel for VLESS/Xray VPN servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors