[GH-ISSUE #1095] static_file 插件可不可以指定本机之外的地址来搭建简易http文件访问服务 #854

Closed
opened 2026-05-05 12:32:41 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @engineerlzk on GitHub (Feb 20, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1095

What version of frp are you using (./frpc -v or ./frps -v)?
0.21
What operating system and processor architecture are you using (go env)?
openwrt18.06(koolshare2.27软路由)
Configures you used:
[test_static_file]
type = tcp
remote_port = 6000
plugin = static_file

要对外暴露的文件目录

plugin_local_path = /tmp/file

访问 url 中会被去除的前缀,保留的内容即为要访问的文件路径

plugin_strip_prefix = static
plugin_http_user = abc
plugin_http_passwd = abc

Steps to reproduce the issue:
1.关于plugin_local_path = /tmp/file能不能指定到别的ip下的路径?

Describe the results you received:
关于plugin_local_path = /tmp/file能不能指定到别的ip下的路径?

Describe the results you expected:
因为我是在openwrt软路由中安装的frpc,同时也虚拟了一个centos7系统来实现网站搭建等功能。因此我想用frpc的static插件在centos上实现简易http文件服务功能。是否可以实现?如可以,参数如何配置?
谢谢!
Additional information you deem important (e.g. issue happens only occasionally):
因为我是在openwrt软路由中安装的frpc,同时也虚拟了一个centos7系统来实现网站搭建等功能。因此我想用frpc的static插件在centos上实现简易http文件服务功能。是否可以实现?如可以,参数如何配置?

Can you point out what caused this issue (optional)

Originally created by @engineerlzk on GitHub (Feb 20, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1095 **What version of frp are you using (./frpc -v or ./frps -v)?** 0.21 **What operating system and processor architecture are you using (`go env`)?** openwrt18.06(koolshare2.27软路由) **Configures you used:** [test_static_file] type = tcp remote_port = 6000 plugin = static_file # 要对外暴露的文件目录 plugin_local_path = /tmp/file # 访问 url 中会被去除的前缀,保留的内容即为要访问的文件路径 plugin_strip_prefix = static plugin_http_user = abc plugin_http_passwd = abc **Steps to reproduce the issue:** 1.关于plugin_local_path = /tmp/file能不能指定到别的ip下的路径? **Describe the results you received:** 关于plugin_local_path = /tmp/file能不能指定到别的ip下的路径? **Describe the results you expected:** 因为我是在openwrt软路由中安装的frpc,同时也虚拟了一个centos7系统来实现网站搭建等功能。因此我想用frpc的static插件在centos上实现简易http文件服务功能。是否可以实现?如可以,参数如何配置? 谢谢! **Additional information you deem important (e.g. issue happens only occasionally):** 因为我是在openwrt软路由中安装的frpc,同时也虚拟了一个centos7系统来实现网站搭建等功能。因此我想用frpc的static插件在centos上实现简易http文件服务功能。是否可以实现?如可以,参数如何配置? **Can you point out what caused this issue (optional)**
Author
Owner

@fatedier commented on GitHub (Feb 20, 2019):

不支持,你可以在其他机器上跑一个 nginx,然后将 local_ip 设置为那台机器的 ip。

<!-- gh-comment-id:465464010 --> @fatedier commented on GitHub (Feb 20, 2019): 不支持,你可以在其他机器上跑一个 nginx,然后将 local_ip 设置为那台机器的 ip。
Author
Owner

@engineerlzk commented on GitHub (Feb 20, 2019):

意思是这样写?
[test_static_file]
type = tcp
local_ip = 192.168.8.x //即准备跑简易http文件服务的ip
remote_port = 6000
plugin = static_file

plugin_local_path = /tmp/file

plugin_strip_prefix = static
plugin_http_user = abc
plugin_http_passwd = abc

就可以用*...*:6000访问了?谢谢指教!

<!-- gh-comment-id:465466400 --> @engineerlzk commented on GitHub (Feb 20, 2019): 意思是这样写? [test_static_file] type = tcp local_ip = 192.168.8.x //即准备跑简易http文件服务的ip remote_port = 6000 plugin = static_file plugin_local_path = /tmp/file plugin_strip_prefix = static plugin_http_user = abc plugin_http_passwd = abc 就可以用*.*.*.*:6000访问了?谢谢指教!
Author
Owner

@fatedier commented on GitHub (Feb 20, 2019):

无法支持,你还是自行通过搜索引擎解决吧。

<!-- gh-comment-id:465469632 --> @fatedier commented on GitHub (Feb 20, 2019): 无法支持,你还是自行通过搜索引擎解决吧。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#854
No description provided.