frp配置文件共享服务器,利用frp搭建简单的文件共享服务器

通过 static_file 插件可以对外提供一个简单的基于 HTTP 的文件访问服务。

类似于http的文件索引!

服务端frps.ini配置

[common]

bind_addr = 0.0.0.0

bind_port = 7000

privilege_token = 12345678

客户端frpc.ini配置

[common]

server_addr = 服务端IP

server_port = 7000

privilege_token = 12345678

[static_file]

type = tcp

local_ip = 127.0.0.1

remote_port = 6000

plugin = static_file

plugin_local_path = /tmp/file

plugin_strip_prefix = static

plugin_http_user = admin

plugin_http_passwd = admin

static_file 插件参数详解

plugin = static_file

为开启插件static_file模式

plugin_local_path

文件目录的绝对路径

plugin_strip_prefix

访问网址后缀路径

通过浏览器访问 http://x.x.x.x:6000/static/

来查看位于 /tmp/file 目录下的文件,如不需要,可以不添加此参数。

plugin_http_user

为http访问验证的用户名,可自定义,可添加此参数或不添加。

plugin_http_passwd

为http访问验证的密码,可自定义,可添加此参数或不添加。

推荐您阅读更多有关于“”的文章

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值