Files
llm_wiki/wiki/FRP.md
T
hehaiguang1123 a6f05ab2d5 Phase 0-2: Schema cleanup, typed relations, event-driven automation
- Phase 0: AGENTS.md cleanup (dedup quotes, renumber sections, merge qmd)
- Phase 1: typed relations (manage-relations.py, graph-search.py, check-staleness.py, detect-conflicts.py)
- Phase 2: frontmatter validator, weekly lint, knowledge promotion, git hooks
- Fix .gitignore to track tools/ and .githooks/
- Fix git remote URL (remove plaintext token)
- New wiki pages: 504 pages, 34 raw sources
2026-07-01 08:05:43 +08:00

93 lines
2.5 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.
---
categories:
- "[[LLM Wiki]]"
tags:
- wiki
- tool
- network
created: 2026-04-08
source: "[[Gitea个人Git服务部署指南]]"
type: tool
aliases:
- fast-reverse-proxy
- 内网穿透工具
---
# FRP (Fast Reverse Proxy)
> **一句话定义**:开源的内网穿透工具,用于将本地服务暴露到公网。
## 基本信息
| 属性 | 值 |
|------|-----|
| 全称 | Fast Reverse Proxy |
| 官网 | <https://github.com/fatedier/frp> |
| 许可证 | Apache 2.0 |
| 编程语言 | Go |
## 工作原理
```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 本地服务 │ │ FRP 服务器 │ │ 公网用户 │
│ (Gitea:8418) │ ──────► │ (VPS:7000/13000)│ ──────► │ (git.haiguang.xyz)│
│ FRP 客户端 │ │ 转发规则 │ │ 浏览器/客户端 │
└─────────────────┘ └─────────────────┘ └─────────────────┘
```
## 核心组件
| 组件 | 角色 | 配置文件 |
|------|------|----------|
| `frps` | 服务端(部署在 VPS | `frps.toml` |
| `frpc` | 客户端(部署在 NAS | `frpc.toml` |
## 在 Gitea 部署中的作用
在 [[Gitea-部署指南]] 中,FRP 用于:
1. **Web 服务暴露**:将群晖 NAS 上的 Gitea (8418) 映射到公网 (13000)
2. **SSH 服务暴露**:将本地 Git SSH 端口 (10022) 映射到公网 (10022)
### 配置示例 (frpc.toml)
```toml
serverAddr = "82.156.57.104"
serverPort = 7000
[[proxies]]
name = "gitea-web"
type = "tcp"
localIP = "127.0.0.1"
localPort = 8418
remotePort = 13000
[[proxies]]
name = "gitea-ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 10022
remotePort = 10022
```
## 与其他方案的对比
| 方案 | 优点 | 缺点 |
|------|------|------|
| **FRP** | 开源、免费、可控 | 需要 VPS |
| **Tailscale** | 简单、无需 VPS | 需要两端安装 |
| **Cloudflare Tunnel** | 免费、无需 VPS | 需要 Cloudflare 账号 |
详见 [[Gitea-部署指南]]
## 相关页面
- [[Gitea-部署指南]] — 使用 FRP 部署 Gitea 的完整指南
- [[内网穿透]] — 内网穿透技术概念
- [[Gitea]] — Git 托管服务
## 来源
- [[Gitea个人Git服务部署指南]] — 完整部署指南