[GH-ISSUE #1195] static_file 插件 与 web 服务的区别,以及其配置方式的疑问? #938

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

Originally created by @phtwo on GitHub (Apr 12, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1195

其实我不是很理解 static_file 为什么会归类在 tcp 类别?

现在的配置是这样

# frpc.ini
[test_static_file]
type = tcp
remote_port = 6000
plugin = static_file
plugin_local_path = /tmp/file

能否与 web 服务合并?
例如

# frps.ini
[common]
vhost_http_port = 8080
# frpc.ini
[test_static_file]
type = http
plugin = static_file
plugin_local_path = /tmp/file
custom_domains = www.yourdomain.com

这样和 http 同用了一个端口,也可以使用 web 的其他配置,比如 subdomain type=https ,就可以用 https + 子域名访问了。

Originally created by @phtwo on GitHub (Apr 12, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1195 其实我不是很理解 `static_file` 为什么会归类在 `tcp` 类别? 现在的配置是这样 ```ini # frpc.ini [test_static_file] type = tcp remote_port = 6000 plugin = static_file plugin_local_path = /tmp/file ``` 能否与 web 服务合并? 例如 ```ini # frps.ini [common] vhost_http_port = 8080 ``` ```ini # frpc.ini [test_static_file] type = http plugin = static_file plugin_local_path = /tmp/file custom_domains = www.yourdomain.com ``` 这样和 http 同用了一个端口,也可以使用 web 的其他配置,比如 `subdomain` `type=https` ,就可以用 https + 子域名访问了。
Author
Owner

@fatedier commented on GitHub (Apr 12, 2019):

plugin 和 type 没有必然的关系,具体如何使用在于你自己,你既然写了这个配置,就应该顺便测试一下是否可行。

<!-- gh-comment-id:482480069 --> @fatedier commented on GitHub (Apr 12, 2019): plugin 和 type 没有必然的关系,具体如何使用在于你自己,你既然写了这个配置,就应该顺便测试一下是否可行。
Author
Owner

@phtwo commented on GitHub (Apr 12, 2019):

抱歉,试了一下,是可以的。这个插件配置成 http 的比较直观和易用。

<!-- gh-comment-id:482643428 --> @phtwo commented on GitHub (Apr 12, 2019): 抱歉,试了一下,是可以的。这个插件配置成 http 的比较直观和易用。
Author
Owner

@phtwo commented on GitHub (Apr 12, 2019):

另外,开发计划没看到有 web ui 的改进。如果后期有的话,我有兴趣参与优化。

<!-- gh-comment-id:482644361 --> @phtwo commented on GitHub (Apr 12, 2019): 另外,开发计划没看到有 web ui 的改进。如果后期有的话,我有兴趣参与优化。
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#938
No description provided.