[GH-ISSUE #2781] frpc如何转发到本地域名 #2224

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

Originally created by @candivan on GitHub (Jan 25, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2781

Describe the feature request

[common]
server_addr = xx.xx
server_port = 5443

[AA]
type = tcp
local_port = 8001
local_ip = 127.0.0.1
remote_port = 8002

[BB]
type = http
local_port = 82
remote_port = 8010
custom_domains = local.domain (这个在本机host 配置为127.0.0.1)

AA项目监听本地端口8001 这时候可以通过http://xx:8002访问

由于本机部署多个项目(同端口82 通过域名来识别不同项目 (nginx处理)) 比如BB 如何才可以http://xx:8010访问

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 @candivan on GitHub (Jan 25, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2781 ### Describe the feature request [common] server_addr = xx.xx server_port = 5443 [AA] type = tcp local_port = 8001 local_ip = 127.0.0.1 remote_port = 8002 [BB] type = http local_port = 82 remote_port = 8010 custom_domains = local.domain (这个在本机host 配置为127.0.0.1) AA项目监听本地端口8001 这时候可以通过http://xx:8002访问 由于本机部署多个项目(同端口82 通过域名来识别不同项目 (nginx处理)) 比如BB 如何才可以http://xx:8010访问 ### 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
Author
Owner

@Becods commented on GitHub (Feb 4, 2022):

?看不懂你想要表达什么

没理解错误的话
bb→nginx(82)→frp(8010)→client
nginx单独开个端口给frp,走tcp映射就行了

<!-- gh-comment-id:1030204784 --> @Becods commented on GitHub (Feb 4, 2022): ?看不懂你想要表达什么 没理解错误的话 `bb→nginx(82)→frp(8010)→client` nginx单独开个端口给frp,走tcp映射就行了
Author
Owner

@candivan commented on GitHub (Feb 7, 2022):

?看不懂你想要表达什么

没理解错误的话 bb→nginx(82)→frp(8010)→client nginx单独开个端口给frp,走tcp映射就行了

单独开端口是可以的 因为电脑开发很久了 很多项目都是用一个相同nginx端口82 然后通过不同域名(每个域名指向127.0.0.1)去指到不同项目的

<!-- gh-comment-id:1031020035 --> @candivan commented on GitHub (Feb 7, 2022): > ?看不懂你想要表达什么 > > 没理解错误的话 `bb→nginx(82)→frp(8010)→client` nginx单独开个端口给frp,走tcp映射就行了 单独开端口是可以的 因为电脑开发很久了 很多项目都是用一个相同nginx端口82 然后通过不同域名(每个域名指向127.0.0.1)去指到不同项目的
Author
Owner

@fatedier commented on GitHub (Feb 9, 2022):

https://github.com/fatedier/frp#rewriting-the-http-host-header

<!-- gh-comment-id:1033434503 --> @fatedier commented on GitHub (Feb 9, 2022): https://github.com/fatedier/frp#rewriting-the-http-host-header
Author
Owner

@candivan commented on GitHub (Feb 9, 2022):

https://github.com/fatedier/frp#rewriting-the-http-host-header

这个之前试过了 都默认指到ngin的第一个项目

<!-- gh-comment-id:1033482062 --> @candivan commented on GitHub (Feb 9, 2022): > https://github.com/fatedier/frp#rewriting-the-http-host-header 这个之前试过了 都默认指到ngin的第一个项目
Author
Owner

@Becods commented on GitHub (Feb 28, 2022):

nginx绑定域名
frpc映射相应端口
此issue不属于frp的配置问题

server {
  listen 82;
  server_name xxx;
  <config>
}
[AA]
type = tcp
local_port = 82
remote_port = 8010
<!-- gh-comment-id:1054071583 --> @Becods commented on GitHub (Feb 28, 2022): nginx绑定域名 frpc映射相应端口 此issue不属于frp的配置问题 ```nginx server { listen 82; server_name xxx; <config> } ``` ```ini [AA] type = tcp local_port = 82 remote_port = 8010 ```
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#2224
No description provided.