[GH-ISSUE #3429] tunnel reach wrong proxy-webside #2743

Closed
opened 2026-05-05 13:46:04 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @cedricbieder on GitHub (Apr 27, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3429

Bug Description

Hello,

I have to websides running on the same machine, on different ports. With the help of an proxy one of them is reachable under
user.domain.com and the other is reachable under admin.domain.comhost_header_rewrite.

If I set the frpc client now to user.domain.com the tunnel always gets the admin.domain.com page.
I thought I can fix this but manipulating the request header-host with the "host_header_rewrite=user.domain.com" parameter but that shows now effect. In the webrequest the host is still mytunnelsubdomain.tunneldomain.com.

Does I understand the parameter wrong or does he just not work?

Is there another way to get the correct webpage?

frpc Version

0.45

frps Version

0.45

System Architecture

linux/amd64

Configurations

frpc:

[common]
token = mytoken
server_addr = tunneldomain.com
server_port = 443

[secret_ssh]
type = https
local_ip = user.domain.com
local_port = 443
subdomain = mytunnelsubdomain
host_header_rewrite = user.domain.com

Logs

No response

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @cedricbieder on GitHub (Apr 27, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3429 ### Bug Description Hello, I have to websides running on the same machine, on different ports. With the help of an proxy one of them is reachable under user.domain.com and the other is reachable under admin.domain.comhost_header_rewrite. If I set the frpc client now to user.domain.com the tunnel always gets the admin.domain.com page. I thought I can fix this but manipulating the request header-host with the "host_header_rewrite=user.domain.com" parameter but that shows now effect. In the webrequest the host is still mytunnelsubdomain.tunneldomain.com. Does I understand the parameter wrong or does he just not work? Is there another way to get the correct webpage? ### frpc Version 0.45 ### frps Version 0.45 ### System Architecture linux/amd64 ### Configurations frpc: [common] token = mytoken server_addr = tunneldomain.com server_port = 443 [secret_ssh] type = https local_ip = user.domain.com local_port = 443 subdomain = mytunnelsubdomain host_header_rewrite = user.domain.com ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Apr 28, 2023):

host_header_rewrite is only valid for HTTP, not HTTPS. frp cannot modify content that is encrypted via TLS.

<!-- gh-comment-id:1526936112 --> @fatedier commented on GitHub (Apr 28, 2023): `host_header_rewrite` is only valid for HTTP, not HTTPS. frp cannot modify content that is encrypted via TLS.
Author
Owner

@cedricbieder commented on GitHub (Apr 28, 2023):

Right, thank you. It works with the https2https plugin and "plugin_host_header_rewrite".

<!-- gh-comment-id:1527680336 --> @cedricbieder commented on GitHub (Apr 28, 2023): Right, thank you. It works with the https2https plugin and "plugin_host_header_rewrite".
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#2743
No description provided.