mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-25 16:15:55 +03:00
[GH-ISSUE #1777] Wrong target host is used although raw HTTP request shows the right target host #1771
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1771
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ChristianWeyer on GitHub (Sep 21, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1777
Originally assigned to: @NghiaTranUIT on GitHub.
Description
This is really strange.
I am using Proxyman on macOS all the time without any issues.
Now, I have a node.js app that uses axios to talk to OpenAI API and Spotify API.
I get a 403 on a request that should go to Spotify but actually goes to OpenAI, using the token meant for Spotify. Obviously, OpenAI gives me a 403.
If I disable proxying for the node.js app, everything works fine.
If I use Charles proxy, everything works fine.
I am lost... ;-)
Environment
@NghiaTranUIT commented on GitHub (Sep 22, 2023):
@ChristianWeyer do you use any Debugging Tools that modify the Request Header?
By default, Proxyman doesn't change any Request/Response data, each request is a separate tunnel, so it doesn't affect to other requests/responses. It means that the
Host: api.spotify.comissue is likely from the client side, not Proxyman.Can you double-check it on your side?
@ChristianWeyer commented on GitHub (Sep 22, 2023):
Hi @NghiaTranUIT - nope, I am going straight from the TypeScript/JS code via Proxyman to the target URLs. It works with other debugging proxy tools. This is why I am so confused...
@ChristianWeyer commented on GitHub (Sep 22, 2023):
FYI: this is the code I am using in this case:
https://github.com/microsoft/TypeChat/tree/main/examples/music
@ChristianWeyer commented on GitHub (Sep 22, 2023):
E.g., this is a line in the code that seems to fail (according to the screenshot above):
github.com/microsoft/TypeChat@ec3a37c441/examples/music/src/endpoints.ts (L445)@mattruby commented on GitHub (Dec 28, 2023):
I have a similar issue. Different hosts switching.
When I quit proxyman, things work fine. This is very frustrating.
@NghiaTranUIT commented on GitHub (Dec 29, 2023):
It's odd. Let's me investigate it 👍
@NghiaTranUIT commented on GitHub (Dec 29, 2023):
@mattruby do you use any debugging tool that might change the host? (such as Map Remote, Breakpoint or Scripting)
By default, Proxyman doesn't change the host, and Proxyman makes a connection by the Host Header, so I'm not sure why it can happen 🤔
@mattruby commented on GitHub (Dec 29, 2023):
I have PIA with a dedicated IP in the mix. It really makes no sense.
I'm happy to hop on a screen share and show you what's happening.
I've tried resetting everything in proxyman.
I'm using axios in a nest.js app. I'm pointing it at the proxy using this:
export https_proxy=http://192.168.68.126:9090 http_proxy=http://192.168.68.126:9090This is the correct endpoint being proxied and called:

For some reason, those introspect calls seem to leak into the cart service:

With

export NODE_DEBUG=http,httpI can see that I'm trying to call the correct endpoint:
@mattruby commented on GitHub (Dec 29, 2023):
Is there a way for me to send you a debug log or anything? I'm happy to do so. ProxyMan has saved me so much time!
@mattruby commented on GitHub (Feb 19, 2024):
I wonder if axios is the problem? https://github.com/axios/axios/issues/5725 looks like it's worth looking into.
@mattruby commented on GitHub (Feb 19, 2024):
Here's another interesting axios proxy issue: https://github.com/axios/axios/pull/3159
When I set the env params to what proxyman provides:
export https_proxy=http://192.168.68.128:9090 http_proxy=http://192.168.68.128:9090both entries are http.@NghiaTranUIT commented on GitHub (Feb 20, 2024):
@mattruby I believe that it's from
Axiosbecause there are some people has encountered issue on Axios too.From what I see on your screenshot, you don't have any debugging tool, so Proxyman won't modify your URL.