frp
frp
frp (Fast Reverse Proxy) 是一款快速反向代理工具,用于内网穿透和端口转发。
基础使用
服务端配置 (frps.ini)
[common]
bind_port = 7000
token = your_token
客户端配置 (frpc.ini)
[common]
server_addr = x.x.x.x
server_port = 7000
token = your_token
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000
启动服务端
启动客户端
连接内网 SSH
功能特性
- 内网穿透 - 访问内网服务
- 端口转发 - TCP/UDP 转发
- HTTP 代理 - HTTP/HTTPS 反向代理
- P2P 模式 - 点对点直连
- 加密传输 - 支持 TLS 加密
代理类型
| 类型 |
描述 |
| tcp |
TCP 端口转发 |
| udp |
UDP 端口转发 |
| http |
HTTP 反向代理 |
| https |
HTTPS 反向代理 |
| stcp |
安全 TCP 模式 |
| xtcp |
P2P TCP 模式 |
使用示例
# HTTP 代理配置
[web]
type = http
local_port = 80
custom_domains = www.example.com
# HTTPS 代理
[web-https]
type = https
local_port = 443
custom_domains = secure.example.com
# P2P 模式
[secret-tcp]
type = stcp
sk = secret_key
local_ip = 127.0.0.1
local_port = 22
参考资源