[GH-ISSUE #3798] [Feature Request] :关于移动光猫tcp转发的问题 #3022

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

Originally created by @bzlzm on GitHub (Nov 25, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3798

Describe the feature request

一个中国移动宽带送的光猫,型号H2-3,默认drop阻断了ipv6入站,现实情况是这光猫是朋友的家里的,他家也没电脑,手机不太容易操作破解telenet。目前是光猫拨号且带有wifi,现在在这台光猫下接了一台x86的linux server小主机,需要外网ssh进入这个小主机,所以在这台linux上安装了docker frpc 0.39.1,第一次使用frp,目前配置一切正常。可以实现穿透访问linux上安装的服务。

这个linux小主机IP 192.168.1.33,frpc.ini配置如下

[common]
server_addr = 155.155.155.155
server_port = 7000

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

[mao]
type = tcp
local_ip = 192.168.1.1
local_port = 80
remote_port = 7002

现在的问题是我在家里浏览器输入 155.155.155.155:7002 访问 给跳转到 http://192.168.1.1/webcmcc/login.html 了,才接触frp,也查了不少资料,也试过在服务器加入vhost后用http协议,可仍然不行。请各位吴彦祖指点一下这种情况该如何配置,谢谢!

[mao]
type = http
local_ip = 192.168.1.1
local_port = 80
custom_domains = www.abc.com

服务端
vhost_http_port = 9099

然后用www.abc.com:9099也打不开。

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 @bzlzm on GitHub (Nov 25, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3798 ### Describe the feature request 一个中国移动宽带送的光猫,型号H2-3,默认drop阻断了ipv6入站,现实情况是这光猫是朋友的家里的,他家也没电脑,手机不太容易操作破解telenet。目前是光猫拨号且带有wifi,现在在这台光猫下接了一台x86的linux server小主机,需要外网ssh进入这个小主机,所以在这台linux上安装了docker frpc 0.39.1,第一次使用frp,目前配置一切正常。可以实现穿透访问linux上安装的服务。 这个linux小主机IP 192.168.1.33,frpc.ini配置如下 [common] server_addr = 155.155.155.155 server_port = 7000 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 7001 [mao] type = tcp local_ip = 192.168.1.1 local_port = 80 remote_port = 7002 现在的问题是我在家里浏览器输入 155.155.155.155:7002 访问 给跳转到 http://192.168.1.1/webcmcc/login.html 了,才接触frp,也查了不少资料,也试过在服务器加入vhost后用http协议,可仍然不行。请各位吴彦祖指点一下这种情况该如何配置,谢谢! [mao] type = http local_ip = 192.168.1.1 local_port = 80 custom_domains = www.abc.com 服务端 vhost_http_port = 9099 然后用www.abc.com:9099也打不开。 ### 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 25, 2023):

我试过了,湖南联通、湖南移动的光猫界面使用 tcp 、http等类型都无法代理,浏览器跳转异常。有点搞不懂,既然是转发而已,为何浏览器打不开。可以确定不是配置问题。
输入密码以后,提示:
400 Bad Reuqest
Your request has bad syntax or is inherently impossible to satisfy.

后面用vpn才能访问。

<!-- gh-comment-id:1826281133 --> @superzjg commented on GitHub (Nov 25, 2023): 我试过了,湖南联通、湖南移动的光猫界面使用 tcp 、http等类型都无法代理,浏览器跳转异常。有点搞不懂,既然是转发而已,为何浏览器打不开。可以确定不是配置问题。 输入密码以后,提示: 400 Bad Reuqest Your request has bad syntax or is inherently impossible to satisfy. 后面用vpn才能访问。
Author
Owner

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

host_header_rewrite = www.abc.com

https://gofrp.org/zh-cn/docs/reference/proxy/#httpproxyconfig

<!-- gh-comment-id:1826416329 --> @xqzr commented on GitHub (Nov 25, 2023): ```ini host_header_rewrite = www.abc.com ``` https://gofrp.org/zh-cn/docs/reference/proxy/#httpproxyconfig
Author
Owner

@bzlzm commented on GitHub (Nov 26, 2023):

host_header_rewrite = www.abc.com

https://gofrp.org/zh-cn/docs/reference/proxy/#httpproxyconfig

大佬能说得明白些嘛,不会用啊

[mao-http]
type = http
local_ip = 192.168.1.1
local_port = 80
custom_domains = www.abc.com
host_header_rewrite = www.abc.com

服务器vhost_http_port = 9099 这样配置仍然www.abc.com:9099 仍然跳转到 http://192.168.1.1/webcmcc/login.html

<!-- gh-comment-id:1826472784 --> @bzlzm commented on GitHub (Nov 26, 2023): > ```ini > host_header_rewrite = www.abc.com > ``` > > https://gofrp.org/zh-cn/docs/reference/proxy/#httpproxyconfig 大佬能说得明白些嘛,不会用啊 [mao-http] type = http local_ip = 192.168.1.1 local_port = 80 custom_domains = www.abc.com host_header_rewrite = www.abc.com 服务器vhost_http_port = 9099 这样配置仍然www.abc.com:9099 仍然跳转到 http://192.168.1.1/webcmcc/login.html
Author
Owner

@bzlzm commented on GitHub (Nov 26, 2023):

host_header_rewrite =

谢谢大佬,已经解决,frpc.ini参数里加入 host_header_rewrite = 192.168.1.1 即可解决。再次感谢!

<!-- gh-comment-id:1826478206 --> @bzlzm commented on GitHub (Nov 26, 2023): > host_header_rewrite = 谢谢大佬,已经解决,frpc.ini参数里加入 host_header_rewrite = 192.168.1.1 即可解决。再次感谢!
Author
Owner

@sungamma commented on GitHub (Jan 10, 2025):

我试过了,湖南联通、湖南移动的光猫界面使用 tcp 、http等类型都无法代理,浏览器跳转异常。有点搞不懂,既然是转发而已,为何浏览器打不开。可以确定不是配置问题。 输入密码以后,提示: 400 Bad Reuqest Your request has bad syntax or is inherently impossible to satisfy.

后面用vpn才能访问。

一样的问题,你怎么用vpn解决的,能细细说说吗

<!-- gh-comment-id:2582949533 --> @sungamma commented on GitHub (Jan 10, 2025): > 我试过了,湖南联通、湖南移动的光猫界面使用 tcp 、http等类型都无法代理,浏览器跳转异常。有点搞不懂,既然是转发而已,为何浏览器打不开。可以确定不是配置问题。 输入密码以后,提示: 400 Bad Reuqest Your request has bad syntax or is inherently impossible to satisfy. > > 后面用vpn才能访问。 一样的问题,你怎么用vpn解决的,能细细说说吗
Author
Owner

@superzjg commented on GitHub (Jan 11, 2025):

我试过了,湖南联通、湖南移动的光猫界面使用 tcp 、http等类型都无法代理,浏览器跳转异常。有点搞不懂,既然是转发而已,为何浏览器打不开。可以确定不是配置问题。 输入密码以后,提示: 400 Bad Reuqest Your request has bad syntax or is inherently impossible to satisfy.
后面用vpn才能访问。

一样的问题,你怎么用vpn解决的,能细细说说吗

我是在公网端(路由器)部署vpn服务器(用的SoftEther,教程),客户端(路由器)接入这个内网,使两个局域网合成一个虚拟网,访问自然没有问题。

<!-- gh-comment-id:2585029755 --> @superzjg commented on GitHub (Jan 11, 2025): > > 我试过了,湖南联通、湖南移动的光猫界面使用 tcp 、http等类型都无法代理,浏览器跳转异常。有点搞不懂,既然是转发而已,为何浏览器打不开。可以确定不是配置问题。 输入密码以后,提示: 400 Bad Reuqest Your request has bad syntax or is inherently impossible to satisfy. > > 后面用vpn才能访问。 > > 一样的问题,你怎么用vpn解决的,能细细说说吗 我是在公网端(路由器)部署vpn服务器([用的SoftEther,教程](https://www.right.com.cn/forum/thread-8240065-1-1.html)),客户端(路由器)接入这个内网,使两个局域网合成一个虚拟网,访问自然没有问题。
Author
Owner

@84896150 commented on GitHub (Jan 14, 2025):

host_header_rewrite =

谢谢大佬,已经解决,frpc.ini参数里加入 host_header_rewrite = 192.168.1.1 即可解决。再次感谢!

请问下我加了host_header_rewrite = 192.168.1.1,还是可以打开登录界面,但是登录不了。这是什么原因呢?

<!-- gh-comment-id:2590178926 --> @84896150 commented on GitHub (Jan 14, 2025): > > host_header_rewrite = > > 谢谢大佬,已经解决,frpc.ini参数里加入 host_header_rewrite = 192.168.1.1 即可解决。再次感谢! 请问下我加了host_header_rewrite = 192.168.1.1,还是可以打开登录界面,但是登录不了。这是什么原因呢?
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#3022
No description provided.