Files
nexus/wiki/concepts/反向代理.md
2026-04-27 16:26:34 +08:00

42 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "反向代理"
type: concept
tags: [networking, web, proxy, https, caddy]
last_updated: 2026-04-03
---
## Aliases
- Reverse Proxy
- Reverse Proxy Server
## Definition
反向代理Reverse Proxy是一种服务器架构模式代理服务器位于客户端与目标服务器之间客户端请求发送到代理服务器代理服务器将请求转发至后端真实服务器并将响应返回给客户端。客户端通常不知道真实服务器的存在。对比正向代理代表客户端访问互联网代理客户端反向代理代表服务端接收请求代理服务端
## Key Capabilities
- **SSL/TLS 终止SSL Termination**:代理服务器处理 HTTPS 加密/解密,后端服务无需配置证书
- **负载均衡**:将请求分发至多个后端服务器
- **缓存静态内容**:加速重复请求
- **隐藏后端架构**:提升安全性
- **自动 HTTPS**:部分反向代理(如 Caddy可自动申请和续期 Let's Encrypt 证书
## Common Tools
- **Caddy**Go 语言编写,默认启用自动 HTTPS适合个人/小型部署
- **Nginx**:功能最全面,性能高,配置灵活
- **Traefik**:专为容器设计,自动服务发现
- **HAProxy**:高性能负载均衡器
## Caddy 方案详解
详见 [[Caddy]]
## 在本 Wiki 中的应用
- [[通过VPS+内网反向代理实现域名访问内网穿透]]Caddy 反向代理到 frp 映射端口,提供 `*.ishenwei.online` HTTPS 访问
## Related Concepts
- [[内网穿透]]Caddy 通常与 frp 配合使用frp 建立隧道Caddy 提供 HTTPS
- [[TCP隧道]]Caddy 处理 HTTP/HTTPS 层TCP 隧道处理非 HTTP 协议(如 SSH
- [[VPS]]:反向代理通常部署在公网 VPS 上
## References
- Caddy 官网: https://caddyserver.com/
- Nginx 官网: https://nginx.org/