[GH-ISSUE #2480] TCP端口映射无法正常访问到IIS的应用 #1968

Closed
opened 2026-05-05 13:16:01 -06:00 by gitea-mirror · 12 comments
Owner

Originally created by @zsinba on GitHub (Jul 13, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2480

[REQUIRED] hat version of frp are you using

Version: 0.37.0
[REQUIRED] What operating system and processor architecture are you using
OS: Windows2012
CPU architecture: Xen Aliyun Ecs Server

[REQUIRED] description of errors

有一台服务器启动了IIS(监听20000端口),IIS 启动了多个网站,通过域名区分,所有网站都使用20000端口.

FRPC映射本地20000端口到FRPS的20000端口.
frpc.ini
[webport]
type = tcp
local_ip = 127.0.0.1
local_port = 20000
remote_port = 20000

frps 的ip为 1.1.1.1

使用CDN,HTTPS 访问:
https://www.abc.com( CDN) --- >http://1.1.1.1:20000
问题:
网站400错误

怀疑是使用了HTTPS访问再映射到http协议的时候出的问题. 以前一直这样用没有出问题,最近出问题的.好像是0.37.0开始有这个问题的.

confile

log file

Steps to reproduce the issue
1.
2.
3.

Supplementary information

Can you guess what caused this issue

Checklist:

  • [] I included all information required in the sections above
  • [] I made sure there are no duplicates of this report (Use Search)
Originally created by @zsinba on GitHub (Jul 13, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2480 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> <!-- ⚠️⚠️ Incomplete reports will be marked as invalid, and closed, with few exceptions ⚠️⚠️ --> <!-- in addition, please use search well so that the same solution can be found in the feedback, we will close it directly --> <!-- for convenience of differentiation, use FRPS or FRPC to refer to the FRP server or client --> **[REQUIRED] hat version of frp are you using** <!-- Use ./frpc -v or ./frps -v --> Version: 0.37.0 **[REQUIRED] What operating system and processor architecture are you using** OS: Windows2012 CPU architecture: Xen Aliyun Ecs Server **[REQUIRED] description of errors** 有一台服务器启动了IIS(监听20000端口),IIS 启动了多个网站,通过域名区分,所有网站都使用20000端口. FRPC映射本地20000端口到FRPS的20000端口. frpc.ini [webport] type = tcp local_ip = 127.0.0.1 local_port = 20000 remote_port = 20000 frps 的ip为 1.1.1.1 使用CDN,HTTPS 访问: https://www.abc.com( CDN) --- >http://1.1.1.1:20000 问题: 网站400错误 怀疑是使用了HTTPS访问再映射到http协议的时候出的问题. 以前一直这样用没有出问题,最近出问题的.好像是0.37.0开始有这个问题的. **confile** <!-- Please pay attention to hiding the token, server_addr and other privacy information --> **log file** <!-- If the file is too large, use Pastebin, for example https://pastebin.ubuntu.com/ --> **Steps to reproduce the issue** 1. 2. 3. **Supplementary information** **Can you guess what caused this issue** **Checklist**: <!--- Make sure you've completed the following steps (put an "X" between of brackets): --> - [] I included all information required in the sections above - [] I made sure there are no duplicates of this report [(Use Search)](https://github.com/fatedier/frp/issues?q=is%3Aissue)
Author
Owner

@zsinba commented on GitHub (Jul 14, 2021):

老板有人吗?

我有尝试添加 协议等于V2在frpc的配置文件,也是不行。

<!-- gh-comment-id:879688514 --> @zsinba commented on GitHub (Jul 14, 2021): 老板有人吗? 我有尝试添加 协议等于V2在frpc的配置文件,也是不行。
Author
Owner

@blizard863 commented on GitHub (Jul 25, 2021):

frpc 和 frps 有报错日志吗 ?

<!-- gh-comment-id:886151572 --> @blizard863 commented on GitHub (Jul 25, 2021): frpc 和 frps 有报错日志吗 ?
Author
Owner

@zsinba commented on GitHub (Jul 25, 2021):

没有报错。
线上最新版本可复现

<!-- gh-comment-id:886157684 --> @zsinba commented on GitHub (Jul 25, 2021): 没有报错。 线上最新版本可复现
Author
Owner

@blizard863 commented on GitHub (Jul 25, 2021):

“”怀疑是使用了HTTPS访问再映射到http协议的时候出的问题. “”

以前是 http - http 吗?

<!-- gh-comment-id:886214690 --> @blizard863 commented on GitHub (Jul 25, 2021): “”怀疑是使用了HTTPS访问再映射到http协议的时候出的问题. “” 以前是 http - http 吗?
Author
Owner

@zsinba commented on GitHub (Jul 26, 2021):

不是的。
我是直接使用的TCP映射,没有使用HTTP映射;
IIS 使用的是80端口,对外映射了80端口;
把内网的80端口,映射到一台服务器上面的80端口;
192.168.1.123:80 --- 11.22.33.44:80这样的FRP TCP 端口映射 ;
Nginx是HTTPS----访问到:11.22.33.44:80这个HTTP协议上;
Nginx对外是使用HTTPS协议的, 这仅是常规的Nginx端的功能了.

以前也是这样用的,FRP没有出现问题, 是近期发布的FRP更新出现的问题.

使用FRP有几年了 ,不是常见问题.

<!-- gh-comment-id:886357253 --> @zsinba commented on GitHub (Jul 26, 2021): 不是的。 我是直接使用的TCP映射,没有使用HTTP映射; IIS 使用的是80端口,对外映射了80端口; 把内网的80端口,映射到一台服务器上面的80端口; 192.168.1.123:80 --- 11.22.33.44:80这样的FRP TCP 端口映射 ; Nginx是HTTPS----访问到:11.22.33.44:80这个HTTP协议上; Nginx对外是使用HTTPS协议的, 这仅是常规的Nginx端的功能了. 以前也是这样用的,FRP没有出现问题, 是近期发布的FRP更新出现的问题. 使用FRP有几年了 ,不是常见问题.
Author
Owner

@blizard863 commented on GitHub (Jul 26, 2021):

不是的。
我是直接使用的TCP映射,没有使用HTTP映射;
IIS 使用的是80端口,对外映射了80端口;
把内网的80端口,映射到一台服务器上面的80端口;
192.168.1.123:80 --- 11.22.33.44:80这样的FRP TCP 端口映射 ;
Nginx是HTTPS----访问到:11.22.33.44:80这个HTTP协议上;
Nginx对外是使用HTTPS协议的, 这仅是常规的Nginx端的功能了.

以前也是这样用的,FRP没有出现问题, 是近期发布的FRP更新出现的问题.

使用FRP有几年了 ,不是常见问题.

恩,我来复现一下。

<!-- gh-comment-id:886589665 --> @blizard863 commented on GitHub (Jul 26, 2021): > 不是的。 > 我是直接使用的TCP映射,没有使用HTTP映射; > IIS 使用的是80端口,对外映射了80端口; > 把内网的80端口,映射到一台服务器上面的80端口; > 192.168.1.123:80 --- 11.22.33.44:80这样的FRP TCP 端口映射 ; > Nginx是HTTPS----访问到:11.22.33.44:80这个HTTP协议上; > Nginx对外是使用HTTPS协议的, 这仅是常规的Nginx端的功能了. > > 以前也是这样用的,FRP没有出现问题, 是近期发布的FRP更新出现的问题. > > 使用FRP有几年了 ,不是常见问题. 恩,我来复现一下。
Author
Owner

@zsinba commented on GitHub (Aug 2, 2021):

请问有复现吗?

<!-- gh-comment-id:891395901 --> @zsinba commented on GitHub (Aug 2, 2021): 请问有复现吗?
Author
Owner

@blizard863 commented on GitHub (Aug 3, 2021):

请问有复现吗?

没有复现出来,你 frpc 和 frps 的版本一样吗 ?

<!-- gh-comment-id:891821637 --> @blizard863 commented on GitHub (Aug 3, 2021): > 请问有复现吗? 没有复现出来,你 frpc 和 frps 的版本一样吗 ?
Author
Owner

@zsinba commented on GitHub (Aug 3, 2021):

奇怪了,这应该是必现的呀。 我的FTPC和FRPS是同一套代码编译出来 的。

<!-- gh-comment-id:891825099 --> @zsinba commented on GitHub (Aug 3, 2021): 奇怪了,这应该是必现的呀。 我的FTPC和FRPS是同一套代码编译出来 的。
Author
Owner

@zsinba commented on GitHub (Aug 3, 2021):

你看啊: https://showdoc.un-bug.com/web/static/js/app.1773fa4abe372dfac8ef.js
访问这个地址, 出来 的是HTTP Error 400. The request verb is invalid.
这个400,是因为FRPS --FTPC --TCP 端口转发, 只转发了端口,并没有把域名带过去,所以出来了400。

这就是必现的。

<!-- gh-comment-id:891828705 --> @zsinba commented on GitHub (Aug 3, 2021): 你看啊: https://showdoc.un-bug.com/web/static/js/app.1773fa4abe372dfac8ef.js 访问这个地址, 出来 的是HTTP Error 400. The request verb is invalid. 这个400,是因为FRPS --FTPC --TCP 端口转发, 只转发了端口,并没有把域名带过去,所以出来了400。 这就是必现的。
Author
Owner

@zsinba commented on GitHub (Aug 3, 2021):

image

这个是打开网页的表现。
因为这是内部系统,短暂的可以中断, 一会我要恢复它。

<!-- gh-comment-id:891830399 --> @zsinba commented on GitHub (Aug 3, 2021): ![image](https://user-images.githubusercontent.com/890157/128020341-2f86a40c-5bf1-410d-b0be-270b7029e27b.png) 这个是打开网页的表现。 因为这是内部系统,短暂的可以中断, 一会我要恢复它。
Author
Owner

@zsinba commented on GitHub (Aug 3, 2021):

已经恢复不使用FRPS映射的了,现在线上是正常的。

<!-- gh-comment-id:891844310 --> @zsinba commented on GitHub (Aug 3, 2021): 已经恢复不使用FRPS映射的了,现在线上是正常的。
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#1968
No description provided.