当前位置:网站首页 / FRP教程 / 正文

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

时间:2018年03月15日 | 作者 : liuhui | 分类 : FRP教程 | 浏览: 16780次 | 评论 0

阿里云限量代金券 | 此广告位出租25元/月

通过 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访问验证的密码,可自定义,可添加此参数或不添加。



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

猜你喜欢

网站分类
关注电脑博士
友情链接

分享:

支付宝

微信