[GH-ISSUE #3315] [Feature Request] #2653

Closed
opened 2026-05-05 13:42:43 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @iiimapidan on GitHub (Feb 16, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3315

Describe the feature request

如何将内网服务器端口暴露给外网服务器内部访问(外网无法访问),例如:客户端设置remote_port,仅frps可以访问这个端口。

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @iiimapidan on GitHub (Feb 16, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3315 ### Describe the feature request 如何将内网服务器端口暴露给外网服务器内部访问(外网无法访问),例如:客户端设置remote_port,仅frps可以访问这个端口。 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:42:43 -06:00
Author
Owner

@Becods commented on GitHub (Feb 18, 2023):

防火墙禁止此端口的外部访问
或者在配置文件里把frps的监听地址改为127.0.0.1

293003fcdb/conf/frps_full.ini (L3-L6)

<!-- gh-comment-id:1435494209 --> @Becods commented on GitHub (Feb 18, 2023): 防火墙禁止此端口的外部访问 或者在配置文件里把frps的监听地址改为127.0.0.1 https://github.com/fatedier/frp/blob/293003fcdb6a090f9e2919b8e7d1224ab1e41549/conf/frps_full.ini#L3-L6
Author
Owner

@iiimapidan commented on GitHub (Feb 18, 2023):

防火墙禁止此端口的外部访问 或者在配置文件里把frps的监听地址改为127.0.0.1

293003fcdb/conf/frps_full.ini (L3-L6)

我觉得加一个配置项标识一下比较好

<!-- gh-comment-id:1435709353 --> @iiimapidan commented on GitHub (Feb 18, 2023): > 防火墙禁止此端口的外部访问 或者在配置文件里把frps的监听地址改为127.0.0.1 > > https://github.com/fatedier/frp/blob/293003fcdb6a090f9e2919b8e7d1224ab1e41549/conf/frps_full.ini#L3-L6 我觉得加一个配置项标识一下比较好
Author
Owner

@Becods commented on GitHub (Feb 18, 2023):

防火墙禁止此端口的外部访问 或者在配置文件里把frps的监听地址改为127.0.0.1
293003fcdb/conf/frps_full.ini (L3-L6)

我觉得加一个配置项标识一下比较好

proxy_bind_addr = 127.0.0.1
293003fcdb/conf/frps_full.ini (L16-L17)
可以使用以上配置实现你的需求。
使用 frp 的目的通常是将服务暴露在公网供其他人访问。所以默认状态不会只监听 127.0.0.1 ,这种做法有点本末倒置。通过上面的配置可以实现你的特殊需求。

从需求的角度出发,什么场景下需要严格去要求只有 HTTP/HTTPS 的服务要监听在 127.0.0.1 ,而其他的服务都可以监听在其他地址?

从我个人的角度而言,这个阶段不太希望引入各种琐碎的 feature,很容易让项目成为一个大杂烩,既提高开发者的维护成本,也增加了用户的使用成本。最终某些功能可能只有几个人使用,甚至没有人用,但是持续的维护却需要耗费很多精力。

所以,目前可能更多的是希望做减法,专注核心能力,做一些重构。之后能通过插件的方式开放更多的扩展能力出来,可以由有需求的人来完善。

<!-- gh-comment-id:1435713331 --> @Becods commented on GitHub (Feb 18, 2023): > > 防火墙禁止此端口的外部访问 或者在配置文件里把frps的监听地址改为127.0.0.1 > > https://github.com/fatedier/frp/blob/293003fcdb6a090f9e2919b8e7d1224ab1e41549/conf/frps_full.ini#L3-L6 > > 我觉得加一个配置项标识一下比较好 > proxy_bind_addr = 127.0.0.1 > https://github.com/fatedier/frp/blob/293003fcdb6a090f9e2919b8e7d1224ab1e41549/conf/frps_full.ini#L16-L17 > 可以使用以上配置实现你的需求。 > 使用 frp 的目的通常是将服务暴露在公网供其他人访问。所以默认状态不会只监听 127.0.0.1 ,这种做法有点本末倒置。通过上面的配置可以实现你的特殊需求。 > 从需求的角度出发,什么场景下需要严格去要求只有 HTTP/HTTPS 的服务要监听在 127.0.0.1 ,而其他的服务都可以监听在其他地址? > 从我个人的角度而言,这个阶段不太希望引入各种琐碎的 feature,很容易让项目成为一个大杂烩,既提高开发者的维护成本,也增加了用户的使用成本。最终某些功能可能只有几个人使用,甚至没有人用,但是持续的维护却需要耗费很多精力。 > 所以,目前可能更多的是希望做减法,专注核心能力,做一些重构。之后能通过插件的方式开放更多的扩展能力出来,可以由有需求的人来完善。
Author
Owner

@iiimapidan commented on GitHub (Feb 19, 2023):

防火墙禁止此端口的外部访问 或者在配置文件里把frps的监听地址改为127.0.0.1
293003fcdb/conf/frps_full.ini (L3-L6)

我觉得加一个配置项标识一下比较好

proxy_bind_addr = 127.0.0.1
293003fcdb/conf/frps_full.ini (L16-L17)

可以使用以上配置实现你的需求。
使用 frp 的目的通常是将服务暴露在公网供其他人访问。所以默认状态不会只监听 127.0.0.1 ,这种做法有点本末倒置。通过上面的配置可以实现你的特殊需求。

从需求的角度出发,什么场景下需要严格去要求只有 HTTP/HTTPS 的服务要监听在 127.0.0.1 ,而其他的服务都可以监听在其他地址?

从我个人的角度而言,这个阶段不太希望引入各种琐碎的 feature,很容易让项目成为一个大杂烩,既提高开发者的维护成本,也增加了用户的使用成本。最终某些功能可能只有几个人使用,甚至没有人用,但是持续的维护却需要耗费很多精力。

所以,目前可能更多的是希望做减法,专注核心能力,做一些重构。之后能通过插件的方式开放更多的扩展能力出来,可以由有需求的人来完善。

感谢,使用防火墙限制端口可以满足,我目前有一部分内网服务端口需要暴露到公网(比如mstsc),而另一部分只支持给frps公网服务器访问(比如mysql,文件服务,仅提供给公网服务内部访问)

<!-- gh-comment-id:1435872690 --> @iiimapidan commented on GitHub (Feb 19, 2023): > > > 防火墙禁止此端口的外部访问 或者在配置文件里把frps的监听地址改为127.0.0.1 > > > https://github.com/fatedier/frp/blob/293003fcdb6a090f9e2919b8e7d1224ab1e41549/conf/frps_full.ini#L3-L6 > > > > > > 我觉得加一个配置项标识一下比较好 > > > proxy_bind_addr = 127.0.0.1 > > https://github.com/fatedier/frp/blob/293003fcdb6a090f9e2919b8e7d1224ab1e41549/conf/frps_full.ini#L16-L17 > > > > 可以使用以上配置实现你的需求。 > > 使用 frp 的目的通常是将服务暴露在公网供其他人访问。所以默认状态不会只监听 127.0.0.1 ,这种做法有点本末倒置。通过上面的配置可以实现你的特殊需求。 > > > 从需求的角度出发,什么场景下需要严格去要求只有 HTTP/HTTPS 的服务要监听在 127.0.0.1 ,而其他的服务都可以监听在其他地址? > > > 从我个人的角度而言,这个阶段不太希望引入各种琐碎的 feature,很容易让项目成为一个大杂烩,既提高开发者的维护成本,也增加了用户的使用成本。最终某些功能可能只有几个人使用,甚至没有人用,但是持续的维护却需要耗费很多精力。 > > > 所以,目前可能更多的是希望做减法,专注核心能力,做一些重构。之后能通过插件的方式开放更多的扩展能力出来,可以由有需求的人来完善。 感谢,使用防火墙限制端口可以满足,我目前有一部分内网服务端口需要暴露到公网(比如mstsc),而另一部分只支持给frps公网服务器访问(比如mysql,文件服务,仅提供给公网服务内部访问)
Author
Owner

@github-actions[bot] commented on GitHub (Mar 22, 2023):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1478764156 --> @github-actions[bot] commented on GitHub (Mar 22, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2653
No description provided.