ProxymanApp / ProxymanApp/Proxyman
The "Host" field in the request header is forcefully modified
@NghiaTranUIT is already working on this.
Since Mar 1, 2024.
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Description
In my work, I have the following usage requirement:
I need to map the access of mobile devices to the production environment URL to the offline environment URL, for example:
xx.yy.com(production) -> 10.2.2.2:8100(offline)
At the same time, I need to set a specific value for the Host field in the request Header to access my specific business environment, for example:
Host: scene_biz.xx.yy.com
When sending requests using Proxyman, even if I manually set the Host field in the request Header to scene_biz.xx.yy.com, the actual request will still be modified to match the URL, i.e., 10.2.2.2:8100. Regardless of whether I use map remote, script, or no tools at all, simply constructing a request and sending it to Proxyman, the Host field in the Header will be tampered with.
Steps to Reproduce
- Construct a request using Proxyman, where the URL is in the format of ip:port and the Host in the request header is different from the URL.
- Send the request.
- Examine the request result, where the Host field in the request header has been tampered with to match the content of the requested URL.
Based on my testing, it seems that the above-mentioned abnormal behavior only occurs when the URL contains a port number.
e.g.
The Host header won't be tampered with:
curl -H "Host: xx.yy.com" http://10.2.2.2
The Host header will be tampered with and changed to "10.2.2.2:8100":
curl -H "Host: xx.yy.com" http://10.2.2.2:8100
Current Behavior
The "Host" field in the request header is forcibly tampered with to match the content of the requested URL.
Expected Behavior
The Host field in the request header should not be tampered.
Environment
- App version: e.g Proxyman 5.0.0
- macOS version: e.g macOS Sonoma 14.2.1 (23C71)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.