mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1211] static_file插件在WIN上无法使用? #950
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#950
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GoGoogle on GitHub (Apr 24, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1211
Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
What version of frp are you using (./frpc -v or ./frps -v)?
0.26.0
What operating system and processor architecture are you using (
go env)?Windows
Configures you used:
[common]
server_addr = x.x.x.x
server_port = 7000
[test_static_file]
type = tcp
remote_port = 8765
plugin = static_file
plugin_local_path = D:\tv
plugin_strip_prefix = tv
plugin_http_user = abc
plugin_http_passwd = abc
Steps to reproduce the issue:
1.Linux运行frps 0.26.0
2.Win运行frpc 0.26.0
3.两端配置后开始使用文件访问服务
把WIN上D:\tv共享出去,使用
http://x.x.x.x:8765/tv
进行访问,出现404错误
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Can you point out what caused this issue (optional)
frpc.ini中的路径配置方式有可能有问题
@tournet commented on GitHub (Apr 26, 2019):
openwrt下遇到404错误,修改了一下设置,可以工作了。
教程里提设置,会出现404错误:
[test_static_file]
type = tcp
remote_port = 6000
plugin = static_file
plugin_local_path = /tmp/file
plugin_strip_prefix = static
plugin_http_user = abc
plugin_http_passwd = abc
Visit http://x.x.x.x:6000/static/
我修改后可以工作的设置:
[test_static_file]
type = tcp
remote_port = 6000
plugin = static_file
要对外暴露的文件目录
plugin_local_path = / #这是只有根目录才可以工作,设置成/mnt就不行。
访问 url 中会被去除的前缀,保留的内容即为要访问的文件路径
#plugin_strip_prefix = static #这个prefix好像也不能有。屏蔽掉。
plugin_http_user = abc
plugin_http_passwd = abc
访问 http://x.x.x.x:6000 (不要加那个static),OK!