mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 16:45:57 +03:00
[GH-ISSUE #1618] Help with automatic and manual setup of proxy with NodeJS #1610
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#1610
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 @tomkerswill on GitHub (Apr 28, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1618
Originally assigned to: @NghiaTranUIT on GitHub.
Description
I am trying to get ProxyMan to intercept requests from a NodeJS application running in a terminal.
If I write a simple Node application, to make a request, and then use either ProxyMan's automated or manual methods to set up the proxy, and then run the node app, I find that the request shows in Proxyman, but instead of an HTTPS URL, I see an HTTP URL.
So, for example, https://google.com would appear as http://google.com
For sites that redirect from http to https, I see a redirect loop.
Steps to Reproduce
I have written a simple nodejs application to test out the proxy. The code is:
import axios from 'axios'; const response = await axios.get("https://google.com"); console.log(response);If I run this in the ProxyMan automatic setup terminal, the response looks like it's gone to the http version of the site and not the https version.
If I open a fresh terminal, without automatic setup, I do not see the request in ProxyMan, but the node app does then return the https version of the site, as expected.
Environment
Node 19.6.0
Proxyman 4.7.0
macOS Ventura 13.3.1
@NghiaTranUIT commented on GitHub (Apr 28, 2023):
Thanks. Let me investigate it 👍
@NghiaTranUIT commented on GitHub (Apr 28, 2023):
It's odd. Only
axiosmakes HTTP instead of HTTPS.I tries with
fetchorgot, it works fine.Here is the
fetchandgotsample code:I'm working on the fix now 👍
@NghiaTranUIT commented on GitHub (Apr 29, 2023):
@tomkerswill let's try this beta build: https://download.proxyman.io/beta/Proxyman_4.7.0_Fix_automatic_setup_with_axios_lib.dmg
The HTTPS request from
axioshas been fixed 👍The problem is:
Axios uses a non-standard to make a Proxy HTTPS Connection to Proxyman (Likely a bug from global-agent).
Standard: CONNECT httpbin.org:443 HTTP/1.1
axios: GET https://httpbin.org/get HTTP/1.1 -> HTTPS
I've double checked with other tool, like Charles Proxy, and it's correct 👍
@Geczy commented on GitHub (Apr 30, 2023):
do you have a link to where this issue was first reported on axios? just for history
great work fixing this by the way!