[GH-ISSUE #1038] 如何可穿透多个https/wss内网端口? #824

Closed
opened 2026-05-05 12:31:28 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @xfzen on GitHub (Jan 10, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1038

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.22.0

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

Configures you used:

  1. frps.ini
    [common]
    bind_port = 7000

vhost_http_port = 9080
vhost_https_port = 9443

  1. frpc.ini
    [common]
    server_addr = mydomain.com
    server_port = 7000

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000

[web01]
type = http
local_port = 9527
custom_domains = web01.mydomain.com

[web02]
type = https
local_port = 443
custom_domains = web01.mydomain.com

[wss01]
type = tcp
local_port = 9998
remote_port = 9997

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

Describe the results you received:
http/https穿透后可正常访问,但是SSL加密的websocket端口(wss)穿透后无法正常访问

Describe the results you expected:
期望可穿透http/https/wss端口个一个,或多个https/wss端口,可正常访问

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

Can you point out what caused this issue (optional)

Originally created by @xfzen on GitHub (Jan 10, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1038 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.22.0 **What operating system and processor architecture are you using (`go env`)?** ubuntu 16.04 **Configures you used:** 1. frps.ini [common] bind_port = 7000 vhost_http_port = 9080 vhost_https_port = 9443 2. frpc.ini [common] server_addr = mydomain.com server_port = 7000 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000 [web01] type = http local_port = 9527 custom_domains = web01.mydomain.com [web02] type = https local_port = 443 custom_domains = web01.mydomain.com [wss01] type = tcp local_port = 9998 remote_port = 9997 **Steps to reproduce the issue:** 1. 2. 3. **Describe the results you received:** http/https穿透后可正常访问,但是SSL加密的websocket端口(wss)穿透后无法正常访问 **Describe the results you expected:** 期望可穿透http/https/wss端口个一个,或多个https/wss端口,可正常访问 **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
gitea-mirror 2026-05-05 12:31:28 -06:00
Author
Owner

@fatedier commented on GitHub (Jan 16, 2019):

目前只区分 tcp, http, https。wss 符合 https 协议吗?如果是就走 https 的流程,如果不是,可以配置成 tcp 的方式,则不支持根据域名进行路由。

<!-- gh-comment-id:454772140 --> @fatedier commented on GitHub (Jan 16, 2019): 目前只区分 tcp, http, https。wss 符合 https 协议吗?如果是就走 https 的流程,如果不是,可以配置成 tcp 的方式,则不支持根据域名进行路由。
Author
Owner

@xfzen commented on GitHub (Jan 17, 2019):

目前只区分 tcp, http, https。wss 符合 https 协议吗?如果是就走 https 的流程,如果不是,可以配置成 tcp 的方式,则不支持根据域名进行路由。

  1. wss符合https协议,通过vhost可以配置一个https
  2. tcp的方式,会在wss upgrade 到https协议的时候hang住,不能继续往下走。而且,对于tcp的方式,可以配置使用https的?

现在需求呢,需要配置两个及以上https的端口(或wss)。我尝试过vhost配置一个https,正常;再用tcp配置一个wss,但是失败,无法upgrade 到https协议。
目前我能够想到的就是,通过vhost配置一个https,然后在客户端通过nginx对二级域名进行内部分发。除两这个方法,不知道是否还有别的方式,比如直接配置多个vhost(2个以上)?

谢谢

<!-- gh-comment-id:455125682 --> @xfzen commented on GitHub (Jan 17, 2019): > 目前只区分 tcp, http, https。wss 符合 https 协议吗?如果是就走 https 的流程,如果不是,可以配置成 tcp 的方式,则不支持根据域名进行路由。 1. wss符合https协议,通过vhost可以配置一个https 2. tcp的方式,会在wss upgrade 到https协议的时候hang住,不能继续往下走。而且,对于tcp的方式,可以配置使用https的? 现在需求呢,需要配置两个及以上https的端口(或wss)。我尝试过vhost配置一个https,正常;再用tcp配置一个wss,但是失败,无法upgrade 到https协议。 目前我能够想到的就是,通过vhost配置一个https,然后在客户端通过nginx对二级域名进行内部分发。除两这个方法,不知道是否还有别的方式,比如直接配置多个vhost(2个以上)? 谢谢
Author
Owner

@fatedier commented on GitHub (Jan 17, 2019):

那个多个 https 没有关系,你用 tcp 类型配置了一个 wss,不能成功,就应该找这方面的原因,tcp 方式如果都不可用,通常来说可能是应用不能很好地支持反向代理。

<!-- gh-comment-id:455137989 --> @fatedier commented on GitHub (Jan 17, 2019): 那个多个 https 没有关系,你用 tcp 类型配置了一个 wss,不能成功,就应该找这方面的原因,tcp 方式如果都不可用,通常来说可能是应用不能很好地支持反向代理。
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#824
No description provided.