PPanel is a pure, professional, and perfect open-source proxy panel tool, designed for learning and practical use.
PPanel Server is the backend component of the PPanel project, providing robust APIs and core functionality for managing proxy services. Built with Go, it emphasizes performance, security, and scalability.
- Multi-Protocol Support: Supports Shadowsocks, V2Ray, Trojan, and more.
- Privacy First: No user logs are collected, ensuring privacy and security.
- Minimalist Design: Simple yet powerful, with complete business logic.
- User Management: Full authentication and authorization system.
- Subscription System: Manage user subscriptions and service provisioning.
- Payment Integration: Supports multiple payment gateways.
- Order Management: Track and process user orders.
- Ticket System: Built-in customer support and issue tracking.
- Node Management: Monitor and control server nodes.
- API Framework: Comprehensive RESTful APIs for frontend integration.
- Go: 1.21 or higher
- Docker: Optional, for containerized deployment
- Git: For cloning the repository
-
Clone the repository:
git clone https://github.com/perfect-panel/ppanel-server.git cd ppanel-server
-
Install dependencies:
go mod download
-
Generate code:
chmod +x script/generate.sh ./script/generate.sh
-
Build the project:
make linux-amd64
-
Run the server:
./ppanel-server-linux-amd64 run --config etc/ppanel.yaml
-
Build the Docker image:
docker buildx build --platform linux/amd64 -t ppanel-server:latest .
-
Run the container:
docker run --rm -p 8080:8080 -v $(pwd)/etc:/app/etc ppanel-server:latest
-
Use Docker Compose (create
docker-compose.yml
):version: '3.8' services: ppanel-server: image: ppanel-server:latest ports: - "8080:8080" volumes: - ./etc:/app/etc environment: - TZ=Asia/Shanghai
Run:
docker-compose up -d
-
Pull from Docker Hub (after CI/CD publishes):
docker pull yourusername/ppanel-server:latest docker run --rm -p 8080:8080 yourusername/ppanel-server:latest
Explore the full API documentation:
- Swagger: https://ppanel.dev/swagger/ppanel
The documentation covers all endpoints, request/response formats, and authentication details.
Project | Description | Link |
---|---|---|
PPanel Web | Frontend for PPanel | GitHub |
PPanel User Web | User interface for PPanel | Preview |
PPanel Admin Web | Admin interface for PPanel | Preview |
Visit ppanel.dev for more details.
.
βββ apis/ # API definition files
βββ cmd/ # Application entry point
βββ doc/ # Documentation
βββ etc/ # Configuration files (e.g., ppanel.yaml)
βββ generate/ # Code generation tools
βββ initialize/ # System initialization
βββ internal/ # Internal modules
β βββ config/ # Configuration parsing
β βββ handler/ # HTTP handlers
β βββ middleware/ # HTTP middleware
β βββ logic/ # Business logic
β βββ model/ # Data models
β βββ svc/ # Service layer
β βββ types/ # Type definitions
βββ pkg/ # Utility code
βββ queue/ # Queue services
βββ scheduler/ # Scheduled tasks
βββ script/ # Build scripts
βββ go.mod # Go module definition
βββ Makefile # Build automation
βββ Dockerfile # Docker configuration
goctl api format --dir apis/user.api
- Create a new API file in
apis/
. - Import it in
apis/ppanel.api
. - Regenerate code:
./script/generate.sh
Use the Makefile
to build for various platforms (e.g., Linux, Windows, macOS):
make all # Builds linux-amd64, darwin-amd64, windows-amd64
make linux-arm64 # Build for specific platform
Supported platforms include:
- Linux:
386
,amd64
,arm64
,armv5-v7
,mips
,riscv64
,loong64
, etc. - Windows:
386
,amd64
,arm64
,armv7
- macOS:
amd64
,arm64
- FreeBSD:
amd64
,arm64
Contributions are welcome! Please follow the Contribution Guidelines for bug fixes, features, or documentation improvements.
This project is licensed under the GPL-3.0 License.