[GH-ISSUE #914] 多个内网web服务的转发问题 #724

Closed
opened 2026-05-05 12:27:57 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @floor23 on GitHub (Sep 5, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/914

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
0.21.0

What operating system and processor architecture are you using (go env)?
windows and ubuntu

Configures you used:

frps.ini:
[common]
bind_port = 7000
vhost_http_port = 80

dashboard_addr = 0.0.0.0
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin
log_file = ./frps.log
log_level = info
log_max_days = 3

frpc.ini:
[common]
server_addr = domain_addr
server_port = 7000

[web00]
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = domain_name
http_user = web00
http_pwd = web00
token=123456

[web01]
type = http
local_ip = 127.0.0.1
local_port = 81
custom_domains = domain_name
http_user = web01
http_pwd = web01
token=123456

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:
内网有两个web服务,如何能根据不同端口转发给不同的web服务

Describe the results you expected:
支持转发请求给不同端口的web服务

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)

Originally created by @floor23 on GitHub (Sep 5, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/914 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** 0.21.0 **What operating system and processor architecture are you using (`go env`)?** windows and ubuntu **Configures you used:** frps.ini: [common] bind_port = 7000 vhost_http_port = 80 dashboard_addr = 0.0.0.0 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = admin log_file = ./frps.log log_level = info log_max_days = 3 frpc.ini: [common] server_addr = domain_addr server_port = 7000 [web00] type = http local_ip = 127.0.0.1 local_port = 80 custom_domains = domain_name http_user = web00 http_pwd = web00 token=123456 [web01] type = http local_ip = 127.0.0.1 local_port = 81 custom_domains = domain_name http_user = web01 http_pwd = web01 token=123456 **Steps to reproduce the issue:** 1. 2. 3. **Describe the results you received:** 内网有两个web服务,如何能根据不同端口转发给不同的web服务 **Describe the results you expected:** 支持转发请求给不同端口的web服务 **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@ddzzhen commented on GitHub (Sep 6, 2018):

这个无法实现,但是可以根据不同的域名进行访问,服务器端的端口不影响访问,在frpc配置中修改custom_domains即可。

<!-- gh-comment-id:418923544 --> @ddzzhen commented on GitHub (Sep 6, 2018): 这个无法实现,但是可以根据不同的域名进行访问,服务器端的端口不影响访问,在frpc配置中修改custom_domains即可。
Author
Owner

@cloverzrg commented on GitHub (Sep 6, 2018):

type = http改为type = tcp

<!-- gh-comment-id:418986484 --> @cloverzrg commented on GitHub (Sep 6, 2018): type = http改为type = tcp
Author
Owner

@TelDragon commented on GitHub (Sep 12, 2018):

这种是使用自定义绑定域名 实现 内网多 WEB 穿透。

[web00] 
type = http 
local_ip = 192.168.1.2 
local_port = 80 
custom_domains = xx0.domain_name 

[web01] 
type = http 
local_ip = 192.168.1.3
local_port = 81 
custom_domains = xx1.domain_name 

这种是使用TCP端口多内网 穿透

[web00] 
type = tcp 
local_ip = 192.168.1.2
local_port = 80
remote_port = 40001 

[web01] 
type = tcp
local_ip = 192.168.1.3
local_port = 81 
remote_port = 40002 
<!-- gh-comment-id:420599218 --> @TelDragon commented on GitHub (Sep 12, 2018): 这种是使用自定义绑定域名 实现 内网多 WEB 穿透。 ``` [web00] type = http local_ip = 192.168.1.2 local_port = 80 custom_domains = xx0.domain_name [web01] type = http local_ip = 192.168.1.3 local_port = 81 custom_domains = xx1.domain_name ``` 这种是使用TCP端口多内网 穿透 ``` [web00] type = tcp local_ip = 192.168.1.2 local_port = 80 remote_port = 40001 [web01] type = tcp local_ip = 192.168.1.3 local_port = 81 remote_port = 40002 ```
Author
Owner

@wmailn commented on GitHub (Mar 22, 2019):

这个无法实现,但是可以根据不同的域名进行访问,服务器端的端口不影响访问,在frpc配置中修改custom_domains即可。

只有一个域名的情况下,有办法吗? https://github.com/fatedier/frp/issues/1151

<!-- gh-comment-id:475467959 --> @wmailn commented on GitHub (Mar 22, 2019): > 这个无法实现,但是可以根据不同的域名进行访问,服务器端的端口不影响访问,在frpc配置中修改custom_domains即可。 只有一个域名的情况下,有办法吗? https://github.com/fatedier/frp/issues/1151
Author
Owner

@ddzzhen commented on GitHub (Mar 22, 2019):

可以,但是需要子域名

<!-- gh-comment-id:475484133 --> @ddzzhen commented on GitHub (Mar 22, 2019): 可以,但是需要子域名
Author
Owner

@wmailn commented on GitHub (Apr 9, 2019):

type = http改为type = tcp

最为正确的一句话,被这么多人忽略了,可惜我也是自己摸索出来以后才发现你的回答。
https://github.com/fatedier/frp/issues/1189

<!-- gh-comment-id:481311592 --> @wmailn commented on GitHub (Apr 9, 2019): > type = http改为type = tcp 最为正确的一句话,被这么多人忽略了,可惜我也是自己摸索出来以后才发现你的回答。 https://github.com/fatedier/frp/issues/1189
Author
Owner

@tigerLiu9 commented on GitHub (Jun 6, 2019):

type = http改为type = tcp

最为正确的一句话,被这么多人忽略了,可惜我也是自己摸索出来以后才发现你的回答。
#1189

6

<!-- gh-comment-id:499385179 --> @tigerLiu9 commented on GitHub (Jun 6, 2019): > > type = http改为type = tcp > > 最为正确的一句话,被这么多人忽略了,可惜我也是自己摸索出来以后才发现你的回答。 > #1189 6
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#724
No description provided.