MCPcopy Index your code
hub / github.com/PasarGuard/panel

github.com/PasarGuard/panel @v5.0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.0.3 ↗ · + Follow
6,202 symbols 22,106 edges 746 files 993 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

  <img width="160" height="160" src="https://github.com/PasarGuard/PasarGuard.github.io/raw/main/public/logos/PasarGuard-black-logo.png">

🛡️ PasarGuard

<strong>统一且抗审查的代理管理解决方案</strong>

<a href="#">
    <img src="https://img.shields.io/github/actions/workflow/status/PasarGuard/panel/build.yml?style=flat-square" />
</a>
<a href="https://hub.docker.com/r/PasarGuard/panel" target="_blank">
    <img src="https://img.shields.io/docker/pulls/PasarGuard/panel?style=flat-square&logo=docker" />
</a>
<a href="#">
    <img src="https://img.shields.io/github/license/PasarGuard/panel?style=flat-square" />
</a>
<a href="https://t.me/Pasar_Guard" target="_blank">
    <img src="https://img.shields.io/badge/telegram-group-blue?style=flat-square&logo=telegram" />
</a>
<a href="#">
    <img src="https://img.shields.io/badge/twitter-commiunity-blue?style=flat-square&logo=twitter" />
</a>
<a href="#">
    <img src="https://img.shields.io/github/stars/PasarGuard/panel?style=social" />
</a>

🇺🇸 English / 🇮🇷 فارسی / 🇨🇳 简体中文 / 🇷🇺 Русский

PasarGuard 截图

📋 目录

快速导航 - 跳转到下面的任何部分


📖 概述

什么是 PasarGuard?

PasarGuard 是一个强大的代理管理工具,为处理数百个代理账户提供直观高效的界面。使用 Python 和 React.js 构建,它结合了性能、可扩展性和易用性,简化大规模代理管理。它同时支持 Xray-coreWireGuard,以实现最大性能。


🤔 为什么要使用 PasarGuard?

简单、强大、可靠

PasarGuard 是一个用户友好、功能丰富且可靠的代理管理工具。它允许您为用户创建和管理多个代理,无需复杂配置。通过其内置的 Web 界面,您可以轻松监控活动、修改设置和控制用户访问限制——所有这些都来自一个便捷的仪表板。


✨ 功能

🌐 Web 界面和 API - 内置 Web UI 仪表板 - 完全功能的 REST API 后端 - 多节点 支持用于基础设施分发

🔐 协议和安全 - 支持 VmessVLESSTrojanShadowsocksWireGuardHysteria2 - TLSREALITY 支持 - 单个用户的 多协议

👥 用户管理 - 单个 inbound 上的 多用户 - 单个端口 上的 多 inbound(支持 fallbacks) - 流量过期日期 限制 - 周期性 流量限制(每日、每周等) - HWID/设备限制,用于基于硬件的访问控制

🔗 订阅和分享 - 与 V2rayClashClashMeta 兼容的 订阅链接 - 自动 分享链接二维码 生成器 - 系统监控和 流量统计

🛠️ 工具和自定义 - 可自定义的 xray 配置 - 集成的 Telegram Bot - 命令行界面 (CLI) - 多语言 支持 - 支持带 RBAC多管理员,可配置细粒度权限和访问范围


🚀 安装指南

快速开始 - 在几分钟内运行 PasarGuard

要快速设置,请根据您首选的数据库使用以下命令。


TimescaleDB(推荐):

sudo bash -c "$(curl -fsSL https://github.com/PasarGuard/scripts/raw/main/pasarguard.sh)" @ install --database timescaledb

SQLite:

sudo bash -c "$(curl -fsSL https://github.com/PasarGuard/scripts/raw/main/pasarguard.sh)" @ install

MySQL:

sudo bash -c "$(curl -fsSL https://github.com/PasarGuard/scripts/raw/main/pasarguard.sh)" @ install --database mysql

MariaDB:

sudo bash -c "$(curl -fsSL https://github.com/PasarGuard/scripts/raw/main/pasarguard.sh)" @ install --database mariadb

PostgreSQL:

sudo bash -c "$(curl -fsSL https://github.com/PasarGuard/scripts/raw/main/pasarguard.sh)" @ install --database postgresql

📋 安装后:

📋 查看日志(按 Ctrl+C 停止)

📁 文件位于 /opt/pasarguard

⚙️ 配置文件: /opt/pasarguard/.env(有关详细信息,请参阅配置

💾 数据文件: /var/lib/pasarguard

🔒 重要: 仪表板需要 SSL 证书以确保安全 - 获取 SSL 证书:指南 - 访问:https://YOUR_DOMAIN:8000/dashboard/

🔗 无域名测试: 使用 SSH 端口转发(见下文)


ssh -L 8000:localhost:8000 user@serverip

然后访问:http://localhost:8000/dashboard/

⚠️ 仅用于测试 - 关闭 SSH 终端时您将失去访问权限。

🔧 下一步:

# 生成用于设置 owner 账户的一次性临时密钥
pasarguard cli generate-temp-key

# 在仪表板登录页使用该密钥创建 owner 账户

# 获取帮助
pasarguard --help

📚 文档

📖 官方文档 - 完整指南可在以下位置获得:

🇺🇸 English

🇮🇷 فارسی

🇷🇺 Русский

贡献:GitHub 上帮助改进文档


💖 捐赠

支持 PasarGuard 开发

如果 PasarGuard 对您有帮助,请考虑支持其开发:

Donate

感谢您的支持! 💖


Made with ❤️ for Internet freedom

Extension points exported contracts — how you extend this code

VersionBadgeProps (Interface)
(no doc)
dashboard/src/components/layout/version-badge.tsx
Window (Interface)
(no doc)
dashboard/src/components/layout/top-loading-bar.tsx
TopLoadingBarProps (Interface)
(no doc)
dashboard/src/components/layout/top-loading-bar.tsx
SidebarTriggerWithBadgeProps (Interface)
(no doc)
dashboard/src/components/layout/sidebar-trigger-with-badge.tsx
PageHeaderProps (Interface)
(no doc)
dashboard/src/components/layout/page-header.tsx

Core symbols most depended-on inside this repo

get
called by 874
app/models/admin_role.py
cn
called by 701
dashboard/src/lib/utils.ts
unique_name
called by 301
tests/api/helpers.py
filter
called by 293
app/utils/logger.py
auth_headers
called by 277
tests/api/helpers.py
orvalFetcher
called by 195
dashboard/src/service/http.ts
require_permission
called by 169
app/routers/authentication.py
add
called by 168
app/subscription/links.py

Shape

Function 4,071
Method 953
Class 498
Interface 415
Route 265

Languages

Python56%
TypeScript44%

Modules by API surface

dashboard/src/service/api/index.ts851 symbols
app/routers/user.py112 symbols
dashboard/src/features/core-editor/components/xray/xray-inbounds-section.tsx106 symbols
tests/api/test_user.py92 symbols
app/operation/user.py90 symbols
app/operation/node.py77 symbols
app/models/user.py73 symbols
tests/api/test_admin.py71 symbols
app/db/models.py71 symbols
app/routers/admin.py68 symbols
app/telegram/handlers/admin/user.py66 symbols
app/routers/node.py65 symbols

For agents

$ claude mcp add panel \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact