[GH-ISSUE #179] 什么时候打算支持按照url路径来做代理?也就是类似根据nginx的location配置 #122

Closed
opened 2026-05-05 11:48:17 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @pkgplus on GitHub (Dec 16, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/179

目前是根据custom_domains来做反向代理,能否考虑根据请求url来做映射并代理到frpc上?

Originally created by @pkgplus on GitHub (Dec 16, 2016). Original GitHub issue: https://github.com/fatedier/frp/issues/179 目前是根据custom_domains来做反向代理,能否考虑根据请求url来做映射并代理到frpc上?
gitea-mirror 2026-05-05 11:48:17 -06:00
  • closed this issue
  • added the
    todo
    label
Author
Owner

@pkgplus commented on GitHub (Dec 19, 2016):

1.registryMap更换成独立的router,根据域名+配置的location来映射Listen对象;
2.另外,是否考虑把ProxyServer的配置和ServerMetric的字段合并一下,把公共字段合并到config包中
在dev的基础上写完了,并且测试也跑通了

增加custom_location配置参数:
[web01]
type = http
auth_token = 123
custom_domains = a.b.com
custom_location = /mac,/macbook

<!-- gh-comment-id:267868622 --> @pkgplus commented on GitHub (Dec 19, 2016): 1.registryMap更换成独立的router,根据域名+配置的location来映射Listen对象; 2.另外,是否考虑把ProxyServer的配置和ServerMetric的字段合并一下,把公共字段合并到config包中 在dev的基础上写完了,并且测试也跑通了 增加custom_location配置参数: [web01] type = http auth_token = 123 custom_domains = a.b.com custom_location = /mac,/macbook
Author
Owner

@fatedier commented on GitHub (Dec 19, 2016):

@xuebing1110

  1. 0.9.0 版本暂时不加上这个功能,应该会在下一次小更新的时候加上,我会找时间 review 下代码。
  2. 建议最好兼容 nginx 的 url 路由格式,这个可以之后再做。
  3. 由于不断的加功能,代码结构上已经有些混乱,新版本发布之后会进行一次重构。
<!-- gh-comment-id:267879306 --> @fatedier commented on GitHub (Dec 19, 2016): @xuebing1110 1. 0.9.0 版本暂时不加上这个功能,应该会在下一次小更新的时候加上,我会找时间 review 下代码。 2. 建议最好兼容 nginx 的 url 路由格式,这个可以之后再做。 3. 由于不断的加功能,代码结构上已经有些混乱,新版本发布之后会进行一次重构。
Author
Owner

@pkgplus commented on GitHub (Dec 19, 2016):

@fatedier
OK,期待下一个小版本
兼容nginx的url可以在router.go里实现,后面如果路由复杂可以考虑router作为单独的package

<!-- gh-comment-id:267885893 --> @pkgplus commented on GitHub (Dec 19, 2016): @fatedier OK,期待下一个小版本 兼容nginx的url可以在router.go里实现,后面如果路由复杂可以考虑router作为单独的package
Author
Owner

@wanminxg commented on GitHub (Dec 20, 2016):

同期待这个功能。希望可以尽快加上。

<!-- gh-comment-id:268146472 --> @wanminxg commented on GitHub (Dec 20, 2016): 同期待这个功能。希望可以尽快加上。
Author
Owner

@pkgplus commented on GitHub (Dec 20, 2016):

@wanminxg
想尝鲜的可以用一下我的版本:http://download.bingbaba.com/frp_0.9.0_linux_amd64.tar.gz

<!-- gh-comment-id:268147156 --> @pkgplus commented on GitHub (Dec 20, 2016): @wanminxg 想尝鲜的可以用一下我的版本:http://download.bingbaba.com/frp_0.9.0_linux_amd64.tar.gz
Author
Owner

@wanminxg commented on GitHub (Dec 20, 2016):

@xuebing1110
server和client的配置可以发一下吗?为啥我没跑起来..

<!-- gh-comment-id:268171085 --> @wanminxg commented on GitHub (Dec 20, 2016): @xuebing1110 server和client的配置可以发一下吗?为啥我没跑起来..
Author
Owner

@fatedier commented on GitHub (Dec 27, 2016):

0.9.1 版本已支持。

<!-- gh-comment-id:269349360 --> @fatedier commented on GitHub (Dec 27, 2016): 0.9.1 版本已支持。
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#122
No description provided.