
nginx와 같은 리버스 프록시로, pingora를 기반으로 구축되었으며, 간단하고 효율적입니다.
핑갭 버전이 안정화되기 전에는 풀 리퀘스트를 받지 않습니다. 문의 사항이 있으시면 먼저 새 이슈를 생성해 주세요.

Pingap은 클라우드플레어 Pingora를 기반으로 한 고성능 리버스 프록시입니다. 간결한 TOML 파일과 직관적인 웹 관리 인터페이스를 통해 동적이고 무중단 구성 핫 리로딩을 가능하게 하여 운영 관리를 단순화합니다.
핵심 강점은 강력한 플러그인 시스템에 있으며, 인증(JWT, 키 인증), 보안(CSRF, IP/Referer/UA 제한), 트래픽 제어(속도 제한, 캐싱), 콘텐츠 수정(리다이렉트, 콘텐츠 대체), 관측 가능성(요청 ID) 등 20개 이상의 즉시 사용 가능한 기능을 제공합니다. 이를 통해 Pingap은 단순한 프록시가 아니라 유연하고 확장 가능한 애플리케이션 게이트웨이로서 API 보호부터 최신 웹 애플리케이션 배포에 이르는 복잡한 시나리오를 손쉽게 처리할 수 있도록 설계되었습니다.
中文说明 | Documentation · 中文文档 | Examples | Plugins | Crates
flowchart LR
internet("Internet") -- request --> pingap["Pingap"]
pingap -- proxy:pingap.io/api/* --> apiUpstream["10.1.1.1,10.1.1.2"]
pingap -- proxy:cdn.pingap.io --> cdnUpstream["10.1.2.1,10.1.2.2"]
pingap -- proxy:/* --> upstream["10.1.3.1,10.1.3.2"]
🚀 고성능 및 안정성
🔧 동적이고 사용하기 쉬움
🧩 강력한 확장성
📊 현대적 관측 가능성
Pingap을 시작하는 가장 쉬운 방법은 Docker Compose를 사용하는 것입니다.
docker-compose.yml 파일 생성:# docker-compose.yml
version: '3.8'
services:
pingap:
image: vicanso/pingap:latest # For production, use a specific version like vicanso/pingap:0.12.1-full
container_name: pingap-instance
restart: always
ports:
- "80:80"
- "443:443"
volumes:
# Mount a local directory to persist all configurations and data
- ./pingap_data:/opt/pingap
environment:
# Configure using environment variables
- PINGAP_CONF=/opt/pingap/conf
- PINGAP_ADMIN_ADDR=0.0.0.0:80/pingap
- PINGAP_ADMIN_USER=pingap
- PINGAP_ADMIN_PASSWORD=<YourSecurePassword> # Change this!
command:
# Start pingap and enable hot-reloading
- pingap
- --autoreload
mkdir pingap_data
docker-compose up -d
Pingap 인스턴스가 실행 중입니다! 설정한 자격 증명으로 http://localhost/pingap에서 웹 관리 인터페이스에 접속할 수 있습니다.
Linux 및 macOS의 경우, 다음 한 줄 명령으로 최신 사전 빌드된 바이너리를 /usr/local/bin/pingap에 설치할 수 있습니다:
curl -sSL https://raw.githubusercontent.com/vicanso/pingap/main/install.sh | sh
선택적 환경 변수:
PINGAP_FULL=1 — -full 빌드 설치 (모든 선택적 기능 활성화)PINGAP_LIBC=gnu — Linux에서 기본 musl 정적 빌드 대신 glibc 빌드 사용# Full-featured build
curl -sSL https://raw.githubusercontent.com/vicanso/pingap/main/install.sh | PINGAP_FULL=1 sh
지원 대상: Linux x86_64/arm64, Darwin x86_64/arm64. 모든 사용 가능한 자산은 릴리스 페이지를 참조하세요.
바이너리 실행을 포함한 더 자세한 안내는 문서를 확인하세요.
단일 명령으로 도메인을 https로 제공하고 백엔드로 전달할 수 있습니다:
# certificate requested from let's encrypt
pingap --domain=pingap.io --upstream=192.168.1.1:3000
# or bring your own certificate
pingap --domain=pingap.io --upstream=192.168.1.1:3000 --cert=/etc/ssl/pingap.io
--cert 없이 실행하면 Pingap은 HTTP-01 챌린지를 통해 Let's Encrypt에 인증서를 요청하므로, pingap.io가 이 호스트로 해석되어야 하고 포트 80이 인터넷에서 접근 가능해야 합니다. 발급된 인증서는 ~/.pingap/acme/<domains>.toml에 저장되며 재시작 시 재사용됩니다. 발급에는 속도 제한이 있으므로 삭제하지 마십시오. 다른 모든 설정은 여전히 명령줄에서 가져옵니다. --upstream을 변경하면 인증서를 건드리지 않고 다음 시작 시 적용됩니다.
--cert는 인증서 자체 또는 인증서가 포함된 디렉토리를 받습니다. 일반적인 fullchain.pem/privkey.pem, cert.pem/key.pem 및 tls.crt/tls.key 배치가 자동으로 감지되며, 다른 경우 --key를 사용하십시오. 리스너는 인증서가 있는 경우 기본적으로 0.0.0.0:443, 인증서와 도메인이 모두 없는 경우 0.0.0.0:80이며, --addr로 재정의할 수 있습니다. --upstream은 쉼표로 구분된 백엔드 목록을, --domain은 쉼표로 구분된 호스트 목록을 받습니다(생략하면 일반 http로 모든 호스트를 제공합니다).
구성은 매 시작 시 생성되므로 관리 UI를 통해 편집할 수 없습니다. 단일 서버 이상의 경우 --conf를 사용하세요. 이 플래그들은 함께 사용할 수 없습니다.
Pingap은 다운타임 없이 구성 변경에 적응할 수 있도록 설계되었습니다.
핫 리로드 (--autoreload): 업스트림, 위치 또는 플러그인 업데이트와 같은 대부분의 변경 사항에 대해 Pingap은 재시작 없이 10초 이내에 새 구성을 적용합니다. 컨테이너 환경에 권장되는 모드입니다.
그레이스풀 재시작 (-a 또는 --autorestart): 서버 리슨 포트 변경과 같은 근본적인 변경 사항에 대해 이 모드는 완전한 무중단 재시작을 수행하여 요청 손실이 없도록 합니다.
make dev
웹 관리자가 필요하면 nodejs를 설치하고 웹 자산을 빌드해야 합니다.
# generate admin web asset
cd web
npm i
cd ..
make build-web
server "test" {
addr = "127.0.0.1:6118"
location "github-api" {
path = "/api"
proxy_set_headers = ["Host:api.github.com"]
rewrite = "^/api/(?<path>.+)$ /$1"
upstream "api" {
addrs = ["api.github.com:443"]
discovery = "dns"
sni = "api.github.com"
}
}
location "static" {
plugin "staticServe" {
category = "directory"
path = "~/Downloads"
step = "request"
}
}
}
[upstreams.api]
addrs = ["api.github.com:443"]
discovery = "dns"
sni = "api.github.com"
[plugins.staticServe]
category = "directory"
path = "~/Downloads"
step = "request"
[locations.github-api]
upstream = "api"
path = "/api"
proxy_set_headers = ["Host:api.github.com"]
rewrite = "^/api/(?<path>.+)$ /$1"
[locations.static]
plugins = ["staticServe"]
[servers.test]
addr = "127.0.0.1:6118"
locations = ["github-api", "static"]
관련 지침은 여기에서 확인할 수 있습니다: https://pingap.io/crates/config.
graph TD;
server["HTTP Server"];
locationA["Location A"];
locationB["Location B"];
locationPluginListA["Proxy Plugin List A"];
locationPluginListB["Proxy Plugin List B"];
upstreamA1["Upstream A1"];
upstreamA2["Upstream A2"];
upstreamB1["Upstream B1"];
upstreamB2["Upstream B2"];
locationResponsePluginListA["Response Plugin List A"];
locationResponsePluginListB["Response Plugin List B"];
start("New Request") --> server
server -- "host:HostA, Path:/api/*" --> locationA
server -- "Path:/rest/*"--> locationB
locationA -- "Exec Proxy Plugins" --> locationPluginListA
locationB -- "Exec Proxy Plugins" --> locationPluginListB
locationPluginListA -- "proxy pass: 10.0.0.1:8001" --> upstreamA1
locationPluginListA -- "proxy pass: 10.0.0.2:8001" --> upstreamA2
locationPluginListA -- "done" --> response
locationPluginListB -- "proxy pass: 10.0.0.1:8002" --> upstreamB1
locationPluginListB -- "proxy pass: 10.0.0.2:8002" --> upstreamB2
locationPluginListB -- "done" --> response
upstreamA1 -- "Exec Response Plugins" --> locationResponsePluginListA
upstreamA2 -- "Exec Response Plugins" --> locationResponsePluginListA
upstreamB1 -- "Exec Response Plugins" --> locationResponsePluginListB
upstreamB2 -- "Exec Response Plugins" --> locationResponsePluginListB
locationResponsePluginListA --> response
locationResponsePluginListB --> response
response["HTTP Response"] --> stop("Logging");
CPU: M4 Pro, 스레드: 1
wrk 'http://127.0.0.1:6118/ping' --latency
Running 10s test @ http://127.0.0.1:6118/ping
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 66.41us 23.67us 1.11ms 76.54%
Req/Sec 73.99k 2.88k 79.77k 68.81%
Latency Distribution
50% 67.00us
75% 80.00us
90% 91.00us
99% 116.00us
1487330 requests in 10.10s, 194.32MB read
Requests/sec: 147260.15
Transfer/sec: 19.24MB
현재 MSRV는 1.88입니다.
이 프로젝트는 Apache License, Version 2.0에 따라 라이선스가 부여됩니다.