[GH-ISSUE #3761] http本质上就是tcp,为什么要单独做一个http和https呢?[Feature Request] #2990

Closed
opened 2026-05-05 13:55:47 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @ryouaki on GitHub (Nov 10, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3761

Describe the feature request

我希望使用frp代理我的http。但是我只有ip没有域名,所以按目前的用法不能使用http模式。所以使用了tcp代理。但是这也导致我用浏览器访问的时候,无服务。而使用curl的时候却可以访问到服务器。

而http协议就是基于tcp协议开发的。那么是否可以直接使用一个tcp来同时处理http,https,tcp。而不需要单独处理?

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 @ryouaki on GitHub (Nov 10, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3761 ### Describe the feature request 我希望使用frp代理我的http。但是我只有ip没有域名,所以按目前的用法不能使用http模式。所以使用了tcp代理。但是这也导致我用浏览器访问的时候,无服务。而使用curl的时候却可以访问到服务器。 而http协议就是基于tcp协议开发的。那么是否可以直接使用一个tcp来同时处理http,https,tcp。而不需要单独处理? ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@superzjg commented on GitHub (Nov 10, 2023):

tcp模式应该可以访问,经常使用tcp访问远端路由器的页面,指定一个 remotePort即可。
不晓得你为何浏览器打不开,注意remotePort需要在服务器防火墙中打开。

至于http/https模式有个特性就是复用端口号。还有一些tcp没有的高级功能,参看:
https://gofrp.org/zh-cn/docs/reference/proxy/#httpproxyconfig

<!-- gh-comment-id:1805210879 --> @superzjg commented on GitHub (Nov 10, 2023): tcp模式应该可以访问,经常使用tcp访问远端路由器的页面,指定一个 `remotePort`即可。 不晓得你为何浏览器打不开,注意remotePort需要在服务器防火墙中打开。 至于http/https模式有个特性就是复用端口号。还有一些tcp没有的高级功能,参看: https://gofrp.org/zh-cn/docs/reference/proxy/#httpproxyconfig
Author
Owner

@xqzr commented on GitHub (Nov 10, 2023):

浏览器无法访问,可通过 F12 检查

<!-- gh-comment-id:1805656876 --> @xqzr commented on GitHub (Nov 10, 2023): 浏览器无法访问,可通过 F12 检查
Author
Owner

@ryouaki commented on GitHub (Nov 13, 2023):

截屏2023-11-13 15 26 03 ![截屏2023-11-13 16 16 33](https://github.com/fatedier/frp/assets/9922563/5d66232b-1aa3-48c0-b5ab-f35a4541f623) 截屏2023-11-13 16 16 41 截屏2023-11-13 16 16 46 截屏2023-11-13 16 16 51 我这里测试,就是这样的。使用tcp代理。然后浏览器发出的请求,会没有响应。。。。。。
<!-- gh-comment-id:1807653424 --> @ryouaki commented on GitHub (Nov 13, 2023): <img width="390" alt="截屏2023-11-13 15 26 03" src="https://github.com/fatedier/frp/assets/9922563/65956bbf-ae8b-4471-9d1d-a95b175f37a2"> ![截屏2023-11-13 16 16 33](https://github.com/fatedier/frp/assets/9922563/5d66232b-1aa3-48c0-b5ab-f35a4541f623) <img width="421" alt="截屏2023-11-13 16 16 41" src="https://github.com/fatedier/frp/assets/9922563/64c5aa4e-2200-49b9-9b43-4d3b3fb5b7b6"> <img width="1014" alt="截屏2023-11-13 16 16 46" src="https://github.com/fatedier/frp/assets/9922563/0464acaa-a10d-46ba-a6ee-ad939e160b91"> <img width="723" alt="截屏2023-11-13 16 16 51" src="https://github.com/fatedier/frp/assets/9922563/336e9ae0-2f82-468a-800c-c5971d10270b"> 我这里测试,就是这样的。使用tcp代理。然后浏览器发出的请求,会没有响应。。。。。。
Author
Owner

@ryouaki commented on GitHub (Nov 13, 2023):

浏览器无法访问,可通过 F12 检查

无法访问,,,f12也是无法访问啊

<!-- gh-comment-id:1807653941 --> @ryouaki commented on GitHub (Nov 13, 2023): > 浏览器无法访问,可通过 F12 检查 无法访问,,,f12也是无法访问啊
Author
Owner

@ryouaki commented on GitHub (Nov 13, 2023):

结案了。可以直接在customDomains写ip。最后发送给frpc的都是按customDomains + vhostHTTPPort去寻找服务的。

<!-- gh-comment-id:1807691933 --> @ryouaki commented on GitHub (Nov 13, 2023): 结案了。可以直接在customDomains写ip。最后发送给frpc的都是按customDomains + vhostHTTPPort去寻找服务的。
Author
Owner

@jkhAIjava commented on GitHub (Jan 30, 2024):

老哥,customDomains是 配置在frpc,vhostHttpPort配置在frps上吗 @ryouaki

<!-- gh-comment-id:1915861691 --> @jkhAIjava commented on GitHub (Jan 30, 2024): 老哥,customDomains是 配置在frpc,vhostHttpPort配置在frps上吗 @ryouaki
Author
Owner

@shyandsy commented on GitHub (Dec 10, 2024):

@ryouaki 可以提供个例子么
我也是内网https,死活不通

<!-- gh-comment-id:2531025725 --> @shyandsy commented on GitHub (Dec 10, 2024): @ryouaki 可以提供个例子么 我也是内网https,死活不通
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#2990
No description provided.