论坛风格切换切换到宽版
  • 4766阅读
  • 0回复

内网穿透工具 FRP 客户端 frpc.ini 配置文件说明 [复制链接]

上一主题 下一主题
离线海豚
 

发帖
14003
金钱
437127
威望
0
贡献值
1
只看楼主 倒序阅读 使用道具 0 发表于: 2022-09-16

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

frps 完整配置文件

https://github.com/fatedier/frp/blob/master/conf/frpc_full.ini

客户端 frpc_full.ini 配置文件详细说明

# [common] 部分不可缺少
[common]
# server_addr 服务器ip,必须包含IP地址 或者 域名 主机名
# 用方括号括起来,例如 "[::1]:80", "[ipv6-host]:http" 或 "[ipv6-host%zone]:80"
server_addr = 0.0.0.0
server_port = 7000
# 如果您想通过 http 代理或 socks5 代理连接frps,则可以在此处或在全局环境变量中设置 http_proxy
# 仅在协议为tcp时有效
# http_proxy = http:// user:passwd@192.168.1.128:8080
# http_proxy = socks5:// user:passwd@192.168.1.128:1080
# 日志文件 路径,例如./frpc.log
log_file = ./frpc.log
# trace, debug, info, warn, error
log_level = info
log_max_days = 3
# FRP 身份验证
token = 12345678
# 通过 http api 设置控制 frpc 管理员地址
admin_addr = 127.0.0.1
admin_port = 7400
admin_user = admin
admin_pwd = admin
# 提前建立连接,默认值为零
pool_count = 5
# 如果使用tcp流多路复用,则默认为true,它必须与 frps.ini 相同
tcp_mux = true
# your proxy name will be changed to {user}.{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.8.8.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}.{proxy} such as 'your_name.ssh'
[ssh]
# tcp | udp | http | https | stcp | xtcp, 默认:tcp
type = tcp
local_ip = 127.0.0.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.0.0.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.0.0.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.114.114.114
local_port = 53
remote_port = 6002
use_encryption = false
use_compression = false
[range:udp_port]
type = udp
local_ip = 127.0.0.1
local_port = 6010-6020
remote_port = 6010-6020
use_encryption = false
use_compression = false
# 将您的域名解析为[server_addr],以便可以使用http://web01.yourdomain.com浏览web01、使用http://web02.yourdomain.com浏览web02
[web01]
type = http
local_ip = 127.0.0.1
local_port = 80
use_encryption = false
use_compression = true
# http用户名和密码是http协议的安全认证
# 如果未设置,则无需认证即可访问此custom_domains
http_user = admin
http_pwd = admin
# 如果frps的域是frps.com,则可以通过URL http://test.frps.com 访问[web01]代理
subdomain = web01
#custom_domains域名
custom_domains = youname.com,[url]www.youname.com[/url]
# 位置仅适用于http类型
locations = /,/pic
host_header_rewrite = example.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.0.0.1
local_port = 8000
use_encryption = false
use_compression = false
subdomain = web01
custom_domains = web02.yourdomain.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.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.yourdomain.com
plugin = https2http
plugin_local_addr = 127.0.0.1:80
plugin_crt_path = ./server.crt
plugin_key_path = ./server.key
plugin_host_header_rewrite = 127.0.0.1
[secret_tcp]
# 如果类型是 secret tcp ,则 remote_port 是无用的
# 想要连接本地端口的用户应使用 stcp 代理部署另一个 frpc,并且角色为 visitor
type = stcp
# 用于访客身份验证的sk
sk = abcdefg
local_ip = 127.0.0.1
local_port = 22
use_encryption = false
use_compression = false
# 在stcp服务器和stcp访客中,frpc的用户应相同
[secret_tcp_visitor]
# frpc角色访问者-> frps-> frpc角色服务器
role = visitor
type = stcp
# 您要访问的服务器名称
server_name = secret_tcp
sk = abcdefg
# 将此地址连接到访客stcp服务器
bind_addr = 127.0.0.1
bind_port = 9000
use_encryption = false
use_compression = false
[p2p_tcp]
type = xtcp
sk = abcdefg
local_ip = 127.0.0.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.0.0.1
bind_port = 9001
use_encryption = false
use_compression = false
评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
我爱潜水!
快速回复
限100 字节
 
上一个 下一个