找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 6338|回复: 0

内网穿透工具 FRP 客户端 frpc.ini 配置文件说明

[复制链接]
发表于 2022-9-16 17:22:01 | 显示全部楼层 |阅读模式
<div><p style="margin-bottom: 15px; color: rgb(85, 85, 85); font-family: &quot;Microsoft Yahei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;">内网穿透工具 FRP 客户端 frpc&#46;ini 配置文件说明</p><blockquote style="margin: 15px auto; padding: 10px 15px 5px; border-width: 1px 1px 1px 3px; border-style: solid; border-color: rgb(214, 233, 198); border-image: initial; background-color: rgb(244, 255, 239); font-size: 12px; line-height: 20px; color: rgb(85, 85, 85); font-family: &quot;Microsoft Yahei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;"><p style="margin-bottom: 5px; font-size: 14px; line-height: 30px; padding: 0px;">frps 完整配置文件</p><p style="margin-bottom: 5px; font-size: 14px; line-height: 30px; padding: 0px;"><a href="https://github&#46;com/fatedier/frp/blob/master/conf/frpc_full&#46;ini" target="_blank" style="color: rgb(66, 139, 202); text-decoration-line: none;">https://github&#46;com/fated ... pc_full&#46;ini</a></p></blockquote><p style="margin-bottom: 15px; color: rgb(85, 85, 85); font-family: &quot;Microsoft Yahei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;">客户端 <span style="font-weight: 700;">frp<span style="color: rgb(0, 0, 255);">c</span>_full&#46;ini</span> 配置文件详细说明</p><div class="code-toolbar" style="position: relative; color: rgb(85, 85, 85); font-family: &quot;Microsoft Yahei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;"><pre class=" language-ini" style="padding: 1em; border-radius: 0&#46;3em; color: rgb(248, 248, 242); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 12px; line-height: 1&#46;5; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; margin-top: 0&#46;5em; margin-bottom: 0&#46;5em; border-style: solid; border-color: rgb(230, 230, 230); background-color: rgb(39, 40, 34); overflow-wrap: normal; word-break: normal; text-shadow: rgba(0, 0, 0, 0&#46;3) 0px 1px; word-spacing: normal; tab-size: 4; hyphens: none; overflow: auto;"><code class=" language-ini" style="padding: 0px; border-radius: 3px; font-size: 10px; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; border: 0px; background: none; text-shadow: rgba(0, 0, 0, 0&#46;3) 0px 1px; word-spacing: normal; word-break: normal; overflow-wrap: normal; line-height: 1&#46;5; tab-size: 4; hyphens: none;"># [common] 部分不可缺少
[common]
# server_addr 服务器ip,必须包含IP地址 或者 域名 主机名
# 用方括号括起来,例如 "[::1]:80", "[ipv6-host]:http" 或 "[ipv6-host%zone]:80"
server_addr = 0&#46;0&#46;0&#46;0
server_port = 7000
# 如果您想通过 http 代理或 socks5 代理连接frps,则可以在此处或在全局环境变量中设置 http_proxy
# 仅在协议为tcp时有效
# http_proxy = http:// user:passwd@192&#46;168&#46;1&#46;128:8080
# http_proxy = socks5:// user:passwd@192&#46;168&#46;1&#46;128:1080
# 日志文件 路径,例如&#46;/frpc&#46;log
log_file = &#46;/frpc&#46;log
# trace, debug, info, warn, error
log_level = info
log_max_days = 3
# FRP 身份验证
token = 12345678
# 通过 http api 设置控制 frpc 管理员地址
admin_addr = 127&#46;0&#46;0&#46;1
admin_port = 7400
admin_user = admin
admin_pwd = admin
# 提前建立连接,默认值为零
pool_count = 5
# 如果使用tcp流多路复用,则默认为true,它必须与 frps&#46;ini 相同
tcp_mux = true
# your proxy name will be changed to {user}&#46;{proxy}
user = your_name
# 决定首次登录失败时是否退出程序,否则继续重新登录到 frps
# 默认为true
login_fail_exit = true
# 用于连接服务器的通信协议
# 现在它支持tcp,kcp和websocket,默认为tcp
protocol = tcp
# 如果 tls_enable 为 true,则 frpc 将通过 tls 连接 frps
tls_enable = true
# specify a dns server, so frpc will use this instead of default one
# dns_server = 8&#46;8&#46;8&#46;8
# proxy names you want to start divided by ','
# default is empty, means all proxies
# start = ssh,dns
# heartbeat configure, it's not recommended to modify the default value
# the default value of heartbeat_interval is 10 and heartbeat_timeout is 90
# heartbeat_interval = 30
# heartbeat_timeout = 90
# 'ssh' is the unique proxy name
# if user in [common] section is not empty, it will be changed to {user}&#46;{proxy} such as 'your_name&#46;ssh'
[ssh]
# tcp | udp | http | https | stcp | xtcp, 默认:tcp
type = tcp
local_ip = 127&#46;0&#46;0&#46;1
local_port = 22
# true 或 false,如果为 true,则将对 frps 和 frpc 之间的消息进行加密,默认为 false
use_encryption = false
# 如果为 true,则邮件将被压缩
use_compression = false
# 远程端口
remote_port = 6001
# frps将负载均衡同一组中代理的连接
group = test_group
# 可以将多个相同类型的 proxy 加入到同一个 group 中,从而实现负载均衡的功能。
group_key = 123456
# 启用后端服务的运行状况检查,它现在支持'tcp'和'http'
# frpc将连接本地服务的端口以检测其健康状态
health_check_type = tcp
# 检查连接超时
health_check_timeout_s = 3
# 如果连续3次失败,代理将从frps中删除
health_check_max_failed = 3
# 每 10 秒将进行一次检查
health_check_interval_s = 10
[ssh_random]
type = tcp
local_ip = 127&#46;0&#46;0&#46;1
local_port = 22
# 如果 remote_port 为0,则 frps 将为您分配一个随机端口
remote_port = 0
# 如果要公开多个端口,请在节名称前添加“ range:”前缀
# frpc 将生成多个代理,例如'tcp_port_6010','tcp_port_6011'等。
[range:tcp_port]
type = tcp
local_ip = 127&#46;0&#46;0&#46;1
local_port = 6010-6020,6022,6024-6028
remote_port = 6010-6020,6022,6024-6028
use_encryption = false
use_compression = false
[dns]
type = udp
local_ip = 114&#46;114&#46;114&#46;114
local_port = 53
remote_port = 6002
use_encryption = false
use_compression = false
[range:udp_port]
type = udp
local_ip = 127&#46;0&#46;0&#46;1
local_port = 6010-6020
remote_port = 6010-6020
use_encryption = false
use_compression = false
# 将您的域名解析为[server_addr],以便可以使用http://web01&#46;yourdomain&#46;com浏览web01、使用http://web02&#46;yourdomain&#46;com浏览web02
[web01]
type = http
local_ip = 127&#46;0&#46;0&#46;1
local_port = 80
use_encryption = false
use_compression = true
# http用户名和密码是http协议的安全认证
# 如果未设置,则无需认证即可访问此custom_domains
http_user = admin
http_pwd = admin
# 如果frps的域是frps&#46;com,则可以通过URL http://test&#46;frps&#46;com 访问[web01]代理
subdomain = web01
#custom_domains域名
custom_domains = youname&#46;com,www&#46;youname&#46;com
# 位置仅适用于http类型
locations = /,/pic
host_header_rewrite = example&#46;com
# 带有前缀“ header_”的参数将用于更新http请求标头
header_X-From-Where = frp
health_check_type = http
# frpc 将向本地 http 服务发送 GET http 请求'/ status'
# http 服务在返回 2xx http 响应代码时仍处于活动状态
health_check_url = /status
health_check_interval_s = 10
health_check_max_failed = 3
health_check_timeout_s = 3
[web02]
type = https
local_ip = 127&#46;0&#46;0&#46;1
local_port = 8000
use_encryption = false
use_compression = false
subdomain = web01
custom_domains = web02&#46;yourdomain&#46;com
# 如果不为空,则frpc将使用代理协议将连接信息传输到您的本地服务
# v1或v2或为空
proxy_protocol_version = v2
[plugin_unix_domain_socket]
type = tcp
remote_port = 6003
# 如果定义了插件,则 local_ip 和 local_port 无效
# 插件将处理从 frps 获得的连接
plugin = unix_domain_socket
# 插件需要前缀 “ plugin_” 的参数
plugin_unix_path = /var/run/docker&#46;sock
[plugin_http_proxy]
type = tcp
remote_port = 6004
plugin = http_proxy
plugin_http_user = abc
plugin_http_passwd = abc
[plugin_socks5]
type = tcp
remote_port = 6005
plugin = socks5
plugin_user = abc
plugin_passwd = abc
[plugin_static_file]
type = tcp
remote_port = 6006
plugin = static_file
plugin_local_path = /var/www/blog
plugin_strip_prefix = static
plugin_http_user = abc
plugin_http_passwd = abc
[plugin_https2http]
type = https
custom_domains = test&#46;yourdomain&#46;com
plugin = https2http
plugin_local_addr = 127&#46;0&#46;0&#46;1:80
plugin_crt_path = &#46;/server&#46;crt
plugin_key_path = &#46;/server&#46;key
plugin_host_header_rewrite = 127&#46;0&#46;0&#46;1
[secret_tcp]
# 如果类型是 secret tcp ,则 remote_port 是无用的
# 想要连接本地端口的用户应使用 stcp 代理部署另一个 frpc,并且角色为 visitor
type = stcp
# 用于访客身份验证的sk
sk = abcdefg
local_ip = 127&#46;0&#46;0&#46;1
local_port = 22
use_encryption = false
use_compression = false
# 在stcp服务器和stcp访客中,frpc的用户应相同
[secret_tcp_visitor]
# frpc角色访问者-&gt; frps-&gt; frpc角色服务器
role = visitor
type = stcp
# 您要访问的服务器名称
server_name = secret_tcp
sk = abcdefg
# 将此地址连接到访客stcp服务器
bind_addr = 127&#46;0&#46;0&#46;1
bind_port = 9000
use_encryption = false
use_compression = false
[p2p_tcp]
type = xtcp
sk = abcdefg
local_ip = 127&#46;0&#46;0&#46;1
local_port = 22
use_encryption = false
use_compression = false
[p2p_tcp_visitor]
role = visitor
type = xtcp
server_name = p2p_tcp
sk = abcdefg
bind_addr = 127&#46;0&#46;0&#46;1
bind_port = 9001
use_encryption = false
use_compression = false</code></pre></div></div>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|腾飞在线 ( 冀ICP备05002530号 )

GMT+8, 2026-2-13 10:57 , Processed in 0.055012 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表