[GH-ISSUE #2986] frpc - static_file plugin cannot work well in windows #2383

Closed
opened 2026-05-05 13:32:01 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @acse-bp221 on GitHub (Jun 17, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2986

Bug Description

Based on the documentation you have provided(https://gofrp.org/docs/examples/static-file/), I should be able to share local files using the static_file plugin.

The access directory is shown below:
plugin_local_path = /tmp/file

According to tests, this works well under Linux, but is only accessible via relative paths on Windows.

Assuming that frpc is installed in C:/frp/frpc.exe, I can set the local path by setting plugin_local_path = ../ sharing the whole of C:/, but if I have another disk(such as F:/), this will not be possible.

I have tried:

plugin_local_path = F:/
plugin_local_path = F:\
plugin_local_path = \f\
plugin_local_path = /f/
plugin_local_path = /mnt/f/

See Also #2689

frpc Version

0.43.0

frps Version

0.43.0

System Architecture

windows/amd64

Configurations

[files]
type = tcp
remote_port = 18000
plugin = static_file
plugin_local_path = D:/
plugin_strip_prefix = static
plugin_http_user =
plugin_http_passwd =

Logs

404 page not found

Steps to reproduce

As described above

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @acse-bp221 on GitHub (Jun 17, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2986 ### Bug Description Based on the documentation you have provided(https://gofrp.org/docs/examples/static-file/), I should be able to share local files using the static_file plugin. The access directory is shown below: `plugin_local_path = /tmp/file` According to tests, this works well under Linux, but is only accessible via relative paths on Windows. Assuming that frpc is installed in `C:/frp/frpc.exe`, I can set the local path by setting `plugin_local_path = ../` sharing the whole of `C:/`, but if I have another disk(such as `F:/`), this will not be possible. I have tried: ``` plugin_local_path = F:/ plugin_local_path = F:\ plugin_local_path = \f\ plugin_local_path = /f/ plugin_local_path = /mnt/f/ ``` See Also #2689 ### frpc Version 0.43.0 ### frps Version 0.43.0 ### System Architecture windows/amd64 ### Configurations [files] type = tcp remote_port = 18000 plugin = static_file plugin_local_path = D:/ plugin_strip_prefix = static plugin_http_user = plugin_http_passwd = ### Logs 404 page not found ### Steps to reproduce As described above ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@acse-bp221 commented on GitHub (Jun 17, 2022):

I'm sorry, I found that the problem is that I accessed the wrong link. According to my configuration, I should access 'http://ip:port/static/', if 'http://ip:port/static' I get an error.

<!-- gh-comment-id:1158624072 --> @acse-bp221 commented on GitHub (Jun 17, 2022): I'm sorry, I found that the problem is that I accessed the wrong link. According to my configuration, I should access 'http://ip:port/static/', if 'http://ip:port/static' I get an error.
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#2383
No description provided.