[GH-ISSUE #1219] frps 能否增加 根据子域名转向不同的端口的问题 #955

Closed
opened 2026-05-05 12:36:43 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @schunlei on GitHub (Apr 26, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1219

因为我的frps安装在防火墙后,目前7000端口是打开的。
我在一台机器上部置了一个带plugin_socks5的frpc,远程端口是 frps公网ip的端口8001(防火墙没有打开这个端口,以后可能会有更多的frpc链到这个frps上,因此在防火墙上放开端口不是太方便).
想着 能否在frps上增加一个根据域名(或子域名)转到不同端口的功能.
感觉与 http差不多,只不过那个是外面用的是http代理,但是走到后段变成了socks代理了.

不知道我讲明白没有.

Originally created by @schunlei on GitHub (Apr 26, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1219 因为我的frps安装在防火墙后,目前7000端口是打开的。 我在一台机器上部置了一个带plugin_socks5的frpc,远程端口是 frps公网ip的端口8001(防火墙没有打开这个端口,以后可能会有更多的frpc链到这个frps上,因此在防火墙上放开端口不是太方便). 想着 能否在frps上增加一个根据域名(或子域名)转到不同端口的功能. 感觉与 http差不多,只不过那个是外面用的是http代理,但是走到后段变成了socks代理了. 不知道我讲明白没有.
Author
Owner

@villivateur commented on GitHub (Apr 28, 2019):

TCP 是没有域名的概念的,如果是 TCP 代理,那么服务端是不知道你访问他的域名是什么的,故不能通过域名转发端口

<!-- gh-comment-id:487358996 --> @villivateur commented on GitHub (Apr 28, 2019): TCP 是没有域名的概念的,如果是 TCP 代理,那么服务端是不知道你访问他的域名是什么的,故不能通过域名转发端口
Author
Owner

@nexw commented on GitHub (Apr 29, 2019):

同上,只有HTTP协议反向代理才可以做到的。

<!-- gh-comment-id:487437244 --> @nexw commented on GitHub (Apr 29, 2019): 同上,只有HTTP协议反向代理才可以做到的。
Author
Owner

@schunlei commented on GitHub (Apr 29, 2019):

前面两位好像没有明白我的意思。如下图中链路二是访问者在自己电脑上设置http代理访问的。链路一是frps 与frpc之间的用plugin_socks插件建立的。
111

<!-- gh-comment-id:487453045 --> @schunlei commented on GitHub (Apr 29, 2019): 前面两位好像没有明白我的意思。如下图中链路二是访问者在自己电脑上设置http代理访问的。链路一是frps 与frpc之间的用plugin_socks插件建立的。 ![111](https://user-images.githubusercontent.com/48410012/56877298-8f5ae380-6a7f-11e9-9e57-dd482169c22b.jpg)
Author
Owner

@schunlei commented on GitHub (Apr 29, 2019):

实际上就是frps能不能增加 http代理转 socks5代理的功能

<!-- gh-comment-id:487453566 --> @schunlei commented on GitHub (Apr 29, 2019): 实际上就是frps能不能增加 http代理转 socks5代理的功能
Author
Owner

@yinzhefuyun commented on GitHub (Apr 29, 2019):

我也想问类似这个问题,就是我在路由器上面布了frpc,然后加入局域网内有3台电脑,我想外部进行远程必须用不同的端口,而不可类似的 a1.rt..com; a2.rt..com; a2.rt.***.com,毕竟文字比端口好记住

<!-- gh-comment-id:487488654 --> @yinzhefuyun commented on GitHub (Apr 29, 2019): 我也想问类似这个问题,就是我在路由器上面布了frpc,然后加入局域网内有3台电脑,我想外部进行远程必须用不同的端口,而不可类似的 a1.rt.***.com; a2.rt.***.com; a2.rt.***.com,毕竟文字比端口好记住
Author
Owner

@fatedier commented on GitHub (Jun 4, 2019):

不能。

<!-- gh-comment-id:498541356 --> @fatedier commented on GitHub (Jun 4, 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#955
No description provided.