[GH-ISSUE #236] Node.js requests don't display in Proxyman #233

Open
opened 2026-03-03 19:16:27 +03:00 by kerem · 72 comments
Owner

Originally created by @fishcharlie on GitHub (Aug 4, 2019).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/236

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

Proxyman 1.4.7

macOS Version? (Ex. mac 10.14)

macOS 10.15 Beta (19A526h)

Steps to reproduce

  1. Open Proxyman
  2. Create request in Node.js (ex. https://github.com/axios/axios)
  3. Run Node.js script
  4. Observe that request doesn't display in Proxyman

Expected behavior

Request from Node.js to display in Proxyman

Screenshots (optional)

NA

Originally created by @fishcharlie on GitHub (Aug 4, 2019). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/236 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) Proxyman 1.4.7 ### macOS Version? (Ex. mac 10.14) macOS 10.15 Beta (19A526h) ### Steps to reproduce 1. Open Proxyman 2. Create request in Node.js (ex. https://github.com/axios/axios) 3. Run Node.js script 4. Observe that request doesn't display in Proxyman ### Expected behavior Request from Node.js to display in Proxyman ### Screenshots (optional) NA
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 5, 2019):

Hey, thank for the report. I will check it out today 👍

<!-- gh-comment-id:518059038 --> @NghiaTranUIT commented on GitHub (Aug 5, 2019): Hey, thank for the report. I will check it out today 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 5, 2019):

Hey @fishcharlie, I've checked and the answer is that we have to explicitly point the axios to Proxyman.

const axios = require('axios');

// Proxy to Proxyman
axios.defaults.proxy = {
    host: '127.0.0.1',
    port: 9090,
}

// Make a request for a user with a given ID
axios.get('https://httpbin.org/get?data=123&value=nghia')
  .then(function (response) {
    // handle success
    console.log(response.data);
  })
  .catch(function (error) {
    // handle error
    console.log(error);
  })
  .finally(function () {
    // always executed
  });

then, the request will appear in Proxyman

Screen_Shot_2019-08-05_at_09_13_40

It's relevant to https://github.com/ProxymanApp/Proxyman/issues/175#issuecomment-515282923, since some CLI doesn't use System Proxy until we explicitly override it.

Additionally, we have to do same for Charles Proxy too.

Hope that could help you 😄 🌮

<!-- gh-comment-id:518062379 --> @NghiaTranUIT commented on GitHub (Aug 5, 2019): Hey @fishcharlie, I've checked and the answer is that we have to **explicitly** point the `axios` to Proxyman. ```js const axios = require('axios'); // Proxy to Proxyman axios.defaults.proxy = { host: '127.0.0.1', port: 9090, } // Make a request for a user with a given ID axios.get('https://httpbin.org/get?data=123&value=nghia') .then(function (response) { // handle success console.log(response.data); }) .catch(function (error) { // handle error console.log(error); }) .finally(function () { // always executed }); ``` then, the request will appear in Proxyman <img width="1339" alt="Screen_Shot_2019-08-05_at_09_13_40" src="https://user-images.githubusercontent.com/5878421/62434189-cff28900-b761-11e9-962e-3fb09c25c9b3.png"> It's relevant to https://github.com/ProxymanApp/Proxyman/issues/175#issuecomment-515282923, since some CLI doesn't use System Proxy until we explicitly override it. Additionally, we have to do same for Charles Proxy too. Hope that could help you 😄 🌮
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 5, 2019):

If you don't want to explicitly point the axios to Proxyman, we can use

$ export http_proxy=http://127.0.01:9090
$ export https_proxy=http://127.0.01:9090

Then all CLIs (curl, nodejs, ...) will automatically proxy to Proxyman, but make sure we remove it when we don't use Proxyman. Or the app will be failed 😄

<!-- gh-comment-id:518063728 --> @NghiaTranUIT commented on GitHub (Aug 5, 2019): If you don't want to explicitly point the axios to Proxyman, we can use ``` $ export http_proxy=http://127.0.01:9090 $ export https_proxy=http://127.0.01:9090 ``` Then all CLIs (curl, nodejs, ...) will automatically proxy to Proxyman, but make sure we remove it when we don't use Proxyman. Or the app will be failed 😄
Author
Owner

@shirshak55 commented on GitHub (Aug 17, 2019):

actually its working on mine. If we use terminal it wont work directly we need to explicitly say axios to use proxy and that is how it work in other cli apps too :) Every cli supports proxy like curl etc.. And as u have already given implicit way using environment variable its fine.

But please add it in request so other don't get same problem.

<!-- gh-comment-id:522198886 --> @shirshak55 commented on GitHub (Aug 17, 2019): actually its working on mine. If we use terminal it wont work directly we need to explicitly say axios to use proxy and that is how it work in other cli apps too :) Every cli supports proxy like curl etc.. And as u have already given implicit way using environment variable its fine. But please add it in request so other don't get same problem.
Author
Owner

@alnorris commented on GitHub (Nov 17, 2020):

I'm getting this when ever I try both the environmental vars and the axios proxy. Any ideas?

Error: socket hang up
    at connResetException (internal/errors.js:610:14)
    at Socket.socketOnEnd (_http_client.js:453:23)
    at Socket.emit (events.js:327:22)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  code: 'ECONNRESET',
<!-- gh-comment-id:728853337 --> @alnorris commented on GitHub (Nov 17, 2020): I'm getting this when ever I try both the environmental vars and the axios proxy. Any ideas? ``` Error: socket hang up at connResetException (internal/errors.js:610:14) at Socket.socketOnEnd (_http_client.js:453:23) at Socket.emit (events.js:327:22) at Socket.EventEmitter.emit (domain.js:483:12) at endReadableNT (_stream_readable.js:1220:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) { code: 'ECONNRESET', ```
Author
Owner

@shirshak55 commented on GitHub (Nov 17, 2020):

@alnorris it can be your server.

<!-- gh-comment-id:728869764 --> @shirshak55 commented on GitHub (Nov 17, 2020): @alnorris it can be your server.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 17, 2020):

@alnorris it might be your port is different than the listening port of Proxyman ( default is 9090)

You can go to proxyman Preference and see the port, then setting it correctly

<!-- gh-comment-id:728871816 --> @NghiaTranUIT commented on GitHub (Nov 17, 2020): @alnorris it might be your port is different than the listening port of Proxyman ( default is 9090) You can go to proxyman Preference and see the port, then setting it correctly
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 17, 2020):

If you don’t mind, pls do the same config with other proxy tools to see where the bug is 😄 because there are many hidden factors could affect

<!-- gh-comment-id:728873383 --> @NghiaTranUIT commented on GitHub (Nov 17, 2020): If you don’t mind, pls do the same config with other proxy tools to see where the bug is 😄 because there are many hidden factors could affect
Author
Owner

@dvcrn commented on GitHub (Nov 29, 2020):

Is there a workaround to enable the proxy for everything? I sometimes have no influence on what the node app is doing, so having an option to transparently proxy everything would be nice.

Right now I am falling back to mitmproxy which has a workaround using pfctl and transparent mode to route traffic system-wide to the proxy. Works pretty good, but if Proxyman could do that out of the box, it would be reaaaally nice. Setup like this: https://docs.mitmproxy.org/stable/howto-transparent/#macos

<!-- gh-comment-id:735359992 --> @dvcrn commented on GitHub (Nov 29, 2020): Is there a workaround to enable the proxy for everything? I sometimes have no influence on what the node app is doing, so having an option to transparently proxy everything would be nice. Right now I am falling back to mitmproxy which has a workaround using `pfctl` and transparent mode to route traffic system-wide to the proxy. Works pretty good, but if Proxyman could do that out of the box, it would be reaaaally nice. Setup like this: https://docs.mitmproxy.org/stable/howto-transparent/#macos
Author
Owner

@shirshak55 commented on GitHub (Nov 29, 2020):

@dvcrn it still wont work if they enable certs pinning (Like zoom app enable cert pinning). And transparent proxy is different thing than http/https proxy. And regarding node app you will have source code right so you can change proxy easily from source code? But yes transparent proxy can help in many situations like some app that don't obey proxy but it still isn't easy today due to certs pinning, android certs being hard to place, and we can forget ios app as most of them use certs pinning anyway. I know we can use frida but thats not easy.

<!-- gh-comment-id:735360307 --> @shirshak55 commented on GitHub (Nov 29, 2020): @dvcrn it still wont work if they enable certs pinning (Like zoom app enable cert pinning). And transparent proxy is different thing than http/https proxy. And regarding node app you will have source code right so you can change proxy easily from source code? But yes transparent proxy can help in many situations like some app that don't obey proxy but it still isn't easy today due to certs pinning, android certs being hard to place, and we can forget ios app as most of them use certs pinning anyway. I know we can use frida but thats not easy.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 29, 2020):

I haven't tested pfctl, but wondering what happens if we use 9090 in the following script

rdr pass on en0 inet proto tcp to any port {80, 443} -> 127.0.0.1 port 9090

9090 is where Proxyman serves

<!-- gh-comment-id:735360480 --> @NghiaTranUIT commented on GitHub (Nov 29, 2020): I haven't tested `pfctl`, but wondering what happens if we use 9090 in the following script ``` rdr pass on en0 inet proto tcp to any port {80, 443} -> 127.0.0.1 port 9090 ``` 9090 is where Proxyman serves
Author
Owner

@dvcrn commented on GitHub (Nov 29, 2020):

I don't always have access to the source. For example I was pentesting one mac app but it just wasn't showing up in proxyman/charles and I had no idea why. It took me a while to figure out that the app was spawning a node worker in the background that does the connection and that's why nothing was showing up, which got me wondering what else is happening that I'm missing with Proxyman.

Using mitmproxy + pfctl worked fine even for SSL after trusting the certificate globally

<!-- gh-comment-id:735360677 --> @dvcrn commented on GitHub (Nov 29, 2020): I don't always have access to the source. For example I was pentesting one mac app but it just wasn't showing up in proxyman/charles and I had no idea why. It took me a while to figure out that the app was spawning a node worker in the background that does the connection and that's why nothing was showing up, which got me wondering what else is happening that I'm missing with Proxyman. Using mitmproxy + pfctl worked fine even for SSL after trusting the certificate globally
Author
Owner

@shirshak55 commented on GitHub (Nov 29, 2020):

@dvcrn did u use pfctl to forward to proxyman? BSD uses pf firewall which is a bit different than iptables unfortunately.

<!-- gh-comment-id:735362087 --> @shirshak55 commented on GitHub (Nov 29, 2020): @dvcrn did u use pfctl to forward to proxyman? BSD uses pf firewall which is a bit different than iptables unfortunately.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 29, 2020):

He forwarded it to mitmproxy @shirshak55. Btw, it's a cool idea to use pfctl to do transparent Proxy.

From what I see, if pfctl can work with Proxyman, we can fix the VPN issue 😄

<!-- gh-comment-id:735363109 --> @NghiaTranUIT commented on GitHub (Nov 29, 2020): He forwarded it to mitmproxy @shirshak55. Btw, it's a cool idea to use pfctl to do transparent Proxy. From what I see, if pfctl can work with Proxyman, we can fix the VPN issue 😄
Author
Owner

@shirshak55 commented on GitHub (Nov 29, 2020):

@NghiaTranUIT pfctl is just a firewall :) And you should have transparent proxy support on proxyman (I think at the moment proxyman supports Http/Https proxy only). pfctl isn't any magic its like iptables for osx. Buy the way if you land transparant proxy soon let me know I can help you with docs regarding how to connect andriod with that transparent proxy.

<!-- gh-comment-id:735365837 --> @shirshak55 commented on GitHub (Nov 29, 2020): @NghiaTranUIT pfctl is just a firewall :) And you should have transparent proxy support on proxyman (I think at the moment proxyman supports Http/Https proxy only). pfctl isn't any magic its like iptables for osx. Buy the way if you land transparant proxy soon let me know I can help you with docs regarding how to connect andriod with that transparent proxy.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 29, 2020):

There is a workaround by using proxychains to swamp your app under proxychain umbrella , and all traffic will appear on Proxyman. Read more at https://github.com/ProxymanApp/Proxyman/issues/544

It's quite difficult to set up and requires to disable SIP on your mac, so I would not recommend this approach.

<!-- gh-comment-id:735371848 --> @NghiaTranUIT commented on GitHub (Nov 29, 2020): There is a workaround by using [proxychains](https://github.com/haad/proxychains) to swamp your app under proxychain umbrella , and all traffic will appear on Proxyman. Read more at https://github.com/ProxymanApp/Proxyman/issues/544 It's quite difficult to set up and requires to disable SIP on your mac, so I would not recommend this approach.
Author
Owner

@shirshak55 commented on GitHub (Dec 1, 2020):

@dvcrn I don't know why you are saying charles proxy doesn't work. Charles proxy has transparent proxy so it should have covered your usecase. Its hidden in ssl settings second tab. I haven't used it for year probably but charles proxy does support transparent proxy.

<!-- gh-comment-id:736647123 --> @shirshak55 commented on GitHub (Dec 1, 2020): @dvcrn I don't know why you are saying charles proxy doesn't work. Charles proxy has transparent proxy so it should have covered your usecase. Its hidden in ssl settings second tab. I haven't used it for year probably but charles proxy does support transparent proxy.
Author
Owner

@Cykelero commented on GitHub (Mar 25, 2021):

Seems like Node.js doesn't respect the http_proxy/https_proxy variables; instead, you need to use something like global-agent. This is what ended up working in my case.

Step by step:

  1. Install global agent: npm install global-agent
  2. Import it in your code: require("global-agent/bootstrap") (or see their docs for how to inject it from the CLI)
  3. Set its env variable to Proxyman's server: export GLOBAL_AGENT_HTTP_PROXY=http://127.0.01:9090

This should be it!

For those interested, there are lengthy issues on the subject of adding support for the standard proxy vars to Node: https://github.com/nodejs/node/issues/8381, https://github.com/nodejs/node/issues/15620

<!-- gh-comment-id:806534924 --> @Cykelero commented on GitHub (Mar 25, 2021): Seems like Node.js doesn't respect the `http_proxy`/`https_proxy` variables; instead, you need to use something like [global-agent](https://github.com/gajus/global-agent). This is what ended up working in my case. Step by step: 1. Install global agent: `npm install global-agent` 2. Import it in your code: `require("global-agent/bootstrap")` (or see their docs for how to inject it from the CLI) 3. Set its env variable to Proxyman's server: `export GLOBAL_AGENT_HTTP_PROXY=http://127.0.01:9090` This should be it! For those interested, there are lengthy issues on the subject of adding support for the standard proxy vars to Node: https://github.com/nodejs/node/issues/8381, https://github.com/nodejs/node/issues/15620
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 25, 2021):

Thank you so much for the contribution 🎉 I will add your comment to official Proxyman doc

<!-- gh-comment-id:806535683 --> @NghiaTranUIT commented on GitHub (Mar 25, 2021): Thank you so much for the contribution 🎉 I will add your comment to official Proxyman doc
Author
Owner

@CyberMew commented on GitHub (May 20, 2021):

Has this been fixed yet such that even javascript requests in browsers or some apps which I don't have code access to will work, and have the network requests show up?

<!-- gh-comment-id:845430173 --> @CyberMew commented on GitHub (May 20, 2021): Has this been fixed yet such that even javascript requests in browsers or some apps which I don't have code access to will work, and have the network requests show up?
Author
Owner

@NghiaTranUIT commented on GitHub (May 21, 2021):

@CyberMew it's not a bug, so I can't fix it. It's how NodeJS works.

If you could not access the source code to change the HTTP Proxy, please try to override on your terminal.

export http_proxy=127.0.0.1:9090
export HTTP_PROXY=127.0.0.1:9090
export https_proxy=127.0.0.1:9090
export HTTPS_PROXY=127.0.0.1:9090

It is not 100% work if your app doesn't respect the env http_proxy

Ref: https://www.serverlab.ca/tutorials/osx/administration-osx/configuring-a-network-proxy-for-osx/

<!-- gh-comment-id:845591483 --> @NghiaTranUIT commented on GitHub (May 21, 2021): @CyberMew it's not a bug, so I can't fix it. It's how NodeJS works. If you could not access the source code to change the HTTP Proxy, please try to override on your terminal. ``` export http_proxy=127.0.0.1:9090 export HTTP_PROXY=127.0.0.1:9090 export https_proxy=127.0.0.1:9090 export HTTPS_PROXY=127.0.0.1:9090 ``` It is not 100% work if your app doesn't respect the env http_proxy Ref: https://www.serverlab.ca/tutorials/osx/administration-osx/configuring-a-network-proxy-for-osx/
Author
Owner

@djpowers commented on GitHub (Jul 28, 2022):

I wanted to check if people have since found a workaround for this. I had tried exporting HTTP(S) proxy variables, and using the global-agent approach, but didn't have any luck. Have people been successful with any other techniques?

Also it looks like the issues referenced above about adding proxy support to Node have been closed, so I'm wondering if people are aware of any other discussions about making that happen.

<!-- gh-comment-id:1197540760 --> @djpowers commented on GitHub (Jul 28, 2022): I wanted to check if people have since found a workaround for this. I had tried exporting HTTP(S) proxy variables, and using the global-agent approach, but didn't have any luck. Have people been successful with any other techniques? Also it looks like the issues referenced above about adding proxy support to Node have been closed, so I'm wondering if people are aware of any other discussions about making that happen.
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 28, 2022):

The solution is depended on what network library you're using on NodeJS. Can you share with me what the lib is? I might google to find a solution 👍

<!-- gh-comment-id:1197542024 --> @NghiaTranUIT commented on GitHub (Jul 28, 2022): The solution is depended on what network library you're using on NodeJS. Can you share with me what the lib is? I might google to find a solution 👍
Author
Owner

@djpowers commented on GitHub (Jul 28, 2022):

Thanks @NghiaTranUIT! I'm specifically working on a Raycast extension using their useFetch hook. It's not currently open source, but the team says the API follows the node-fetch API.

<!-- gh-comment-id:1197547383 --> @djpowers commented on GitHub (Jul 28, 2022): Thanks @NghiaTranUIT! I'm specifically working on a [Raycast extension](https://github.com/raycast/extensions) using their [`useFetch` hook](https://developers.raycast.com/utilities/react-hooks/usefetch). It's not currently open source, but the team says the API follows the node-fetch API.
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 28, 2022):

Google shows that we can pass the HTTPAgent to tell node-fetch to use the Proxy, like this code:

const fetch = require('node-fetch');
const HttpsProxyAgent = require('https-proxy-agent');


(async () => {
    const proxyAgent = new HttpsProxyAgent('http://localhost:9090');
    const response = await fetch('https://httpbin.org/ip?json', { agent: proxyAgent});
    const body = await response.text();
    console.log(body);
})();

However, useFetch wraps the node-fetch lib, so I'm not sure how to pass the HttpsProxyAgent. Maybe you should ask Raycast devs for hints.

<!-- gh-comment-id:1197569227 --> @NghiaTranUIT commented on GitHub (Jul 28, 2022): Google shows that we can pass the HTTPAgent to tell `node-fetch` to use the Proxy, like this code: ```js const fetch = require('node-fetch'); const HttpsProxyAgent = require('https-proxy-agent'); (async () => { const proxyAgent = new HttpsProxyAgent('http://localhost:9090'); const response = await fetch('https://httpbin.org/ip?json', { agent: proxyAgent}); const body = await response.text(); console.log(body); })(); ``` However, useFetch wraps the `node-fetch` lib, so I'm not sure how to pass the `HttpsProxyAgent`. Maybe you should ask Raycast devs for hints.
Author
Owner

@shirshak55 commented on GitHub (Jul 30, 2022):

@NghiaTranUIT if its react, shouldn't it be running in Browser? So, setting global proxies from windows etc. should work?

<!-- gh-comment-id:1200268801 --> @shirshak55 commented on GitHub (Jul 30, 2022): @NghiaTranUIT if its react, shouldn't it be running in Browser? So, setting global proxies from windows etc. should work?
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 31, 2022):

@shirshak55 If it's a React, which access from the web browser or using NodeJS to serve a static file (Build from ReactJS). Proxyman can capture it since the web browser would use the system HTTP Proxy. (Localhost would pass the proxy by default, but there is a solution to fix it).

@djpowers case is different, he is making a request from NodeJS. Thus, it doesn't respect the global/system HTTP proxy.

<!-- gh-comment-id:1200333578 --> @NghiaTranUIT commented on GitHub (Jul 31, 2022): @shirshak55 If it's a React, which access from the web browser or using NodeJS to serve a static file (Build from ReactJS). Proxyman can capture it since the web browser would use the system HTTP Proxy. (Localhost would pass the proxy by default, but there is a solution to fix it). @djpowers case is different, he is making a request from NodeJS. Thus, it doesn't respect the global/system HTTP proxy.
Author
Owner

@sonic1981 commented on GitHub (Dec 11, 2022):

I also had to run

process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
<!-- gh-comment-id:1345642920 --> @sonic1981 commented on GitHub (Dec 11, 2022): I also had to run ``` process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; ```
Author
Owner

@gplusdotgr commented on GitHub (Apr 14, 2023):

set the shell env vars,

master   pnpm start

> request-frontend@0.0.1 start /Users/gkatsanos/repos/visable/requests-frontend
> NODE_OPTIONS='-r dd-trace/init' HOST=0.0.0.0 PORT=3000 node ./dist/server/entry.mjs

HTTP_PROXY 192.168.1.107:9090
HTTPS_PROXY 192.168.1.107:9090
Server listening on http://0.0.0.0:3000

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
# Added by Docker Desktop

127.0.0.1 www.wlw-local.de
# START wlw-compose-setup
127.0.0.1 local.wlw.de local.wlw.at local.wlw.ch api.local.visable.com
127.0.0.1 redirect.local.wlw.de redirect.local.wlw.at redirect.local.wlw.ch
127.0.0.1 api.local.visable.com
127.0.0.1 aws.local.visable.com
127.0.0.1 www.local.europages.co.uk
# END wlw-compose-setup

Could someone explain why would someone buy this product which is supposed to work out of the box but doesnt work even after 3-4 workarounds/hacks?
I'm super disappointed about the effort this requires to get to work. Who is this product for? If its for developers then you're clearly doing something wrong.

<!-- gh-comment-id:1508507823 --> @gplusdotgr commented on GitHub (Apr 14, 2023): set the shell env vars, ```sh master  pnpm start > request-frontend@0.0.1 start /Users/gkatsanos/repos/visable/requests-frontend > NODE_OPTIONS='-r dd-trace/init' HOST=0.0.0.0 PORT=3000 node ./dist/server/entry.mjs HTTP_PROXY 192.168.1.107:9090 HTTPS_PROXY 192.168.1.107:9090 Server listening on http://0.0.0.0:3000 ``` - [x] local bypass in OSX configuration as shown here https://docs.proxyman.io/troubleshooting/.local-doesnt-appear-in-proxyman#2-solution - [x] added the /etc/hosts entries: ``` ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost # Added by Docker Desktop 127.0.0.1 www.wlw-local.de # START wlw-compose-setup 127.0.0.1 local.wlw.de local.wlw.at local.wlw.ch api.local.visable.com 127.0.0.1 redirect.local.wlw.de redirect.local.wlw.at redirect.local.wlw.ch 127.0.0.1 api.local.visable.com 127.0.0.1 aws.local.visable.com 127.0.0.1 www.local.europages.co.uk # END wlw-compose-setup ``` - [x] tried: http://0.0.0.0:3000/status/health , no logs - [x] http://proxyman.local:3000/ - same, no logs - [x] http://localhost.proxyman.io:3000/requests-frontend/status/health - no logs Could someone explain why would someone buy this product which is supposed to work out of the box but doesnt work even after 3-4 workarounds/hacks? I'm super disappointed about the effort this requires to get to work. Who is this product for? If its for developers then you're clearly doing something wrong.
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 14, 2023):

Could someone explain why would someone buy this product which is supposed to work out of the box but doesnt work even after 3-4 workarounds/hacks?

Sorry @gkatsanos, the problem is from the NodeJS, it doesn't respect the system HTTP Proxy, so it doesn't work out of the box. If you develop iOS/Android app, it works out of the box.

Your /etc/host looks like doesn't have the following line:

127.0.0.1 proxyman.local
::1 proxyman.local

Thus, http://proxyman.local:3000/ doesn't work.

Ref: https://docs.proxyman.io/troubleshooting/couldnt-see-any-request-from-localhost-server#solution-2-map-localhost-to-the-domain-name-in-etc-hosts

<!-- gh-comment-id:1508516068 --> @NghiaTranUIT commented on GitHub (Apr 14, 2023): > Could someone explain why would someone buy this product which is supposed to work out of the box but doesnt work even after 3-4 workarounds/hacks? Sorry @gkatsanos, the problem is from the NodeJS, it doesn't respect the system HTTP Proxy, so it doesn't work out of the box. If you develop iOS/Android app, it works out of the box. Your /etc/host looks like doesn't have the following line: ``` 127.0.0.1 proxyman.local ::1 proxyman.local ``` Thus, http://proxyman.local:3000/ doesn't work. Ref: https://docs.proxyman.io/troubleshooting/couldnt-see-any-request-from-localhost-server#solution-2-map-localhost-to-the-domain-name-in-etc-hosts
Author
Owner

@gplusdotgr commented on GitHub (Apr 14, 2023):

But then why recommend to people to set the HTTP_PROXY environment variables in their shell?
I feel everytime I try to use Proxyman I'm ping ponged from hack to hack..

<!-- gh-comment-id:1508519524 --> @gplusdotgr commented on GitHub (Apr 14, 2023): But then why recommend to people to set the HTTP_PROXY environment variables in their shell? I feel everytime I try to use Proxyman I'm ping ponged from hack to hack..
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 14, 2023):

It's because NodeJS development is really messy. Some libraries require the HTTP_PROXY env, some don't respect the System Proxy -> Needs to manually config in their source code, and some libs do respect the proxy -> Proxyman can work out of the box.

There is no silver bullet to fix all NodeJS problems automatically.

Proxyman helps you a lot behind the scene that you don't notice, such as auto install the certificate on your Mac, auto overriding/reverting the system proxy, or auto-scripts for iOS, and Android, ...

You can try other tools, Charles Proxy, Fiddler, Wireshark, and you have to google a lot to make it works with NodeJS too.

<!-- gh-comment-id:1508526938 --> @NghiaTranUIT commented on GitHub (Apr 14, 2023): It's because NodeJS development is really messy. Some libraries require the HTTP_PROXY env, some don't respect the System Proxy -> Needs to manually config in their source code, and some libs do respect the proxy -> Proxyman can work out of the box. There is no silver bullet to fix all NodeJS problems **automatically**. Proxyman helps you a lot behind the scene that you don't notice, such as auto install the certificate on your Mac, auto overriding/reverting the system proxy, or auto-scripts for iOS, and Android, ... You can try other tools, Charles Proxy, Fiddler, Wireshark, and you have to google a lot to make it works with NodeJS too.
Author
Owner

@gplusdotgr commented on GitHub (Apr 14, 2023):

I understand. Concluding, could we have maybe a dedicated NodeJS-specific docs/FAQ page on how to fix it since it's probably a big chunk of the audience?

<!-- gh-comment-id:1508808603 --> @gplusdotgr commented on GitHub (Apr 14, 2023): I understand. Concluding, could we have maybe a dedicated NodeJS-specific docs/FAQ page on how to fix it since it's probably a big chunk of the audience?
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 15, 2023):

@gkatsanos it depends on your setup. If you don't mind, what is the NodeJS web framework you're using?

Here is a simple sample:

  1. Use ExpressJS to create a localhost server
const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})
  1. Open /etc/hosts and add the following text:
127.0.0.1 proxyman.local
::1 proxyman.local
  1. Done. Use Google Chrome, visit http://proxyman.local:3000 -> Proxyman will capture the traffic as usual.

CleanShot 2023-04-15 at 10 18 40@2x


If you;re using fetch or axios to call to 3rd-server, and you'd like to capture these traffic. Please check this doc: https://docs.proxyman.io/debug-devices/nodejs

<!-- gh-comment-id:1509485231 --> @NghiaTranUIT commented on GitHub (Apr 15, 2023): @gkatsanos it depends on your setup. If you don't mind, what is the NodeJS web framework you're using? Here is a simple sample: 1. Use ExpressJS to create a localhost server ```js const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => { res.send('Hello World!') }) app.listen(port, () => { console.log(`Example app listening on port ${port}`) }) ``` 2. Open /etc/hosts and add the following text: ``` 127.0.0.1 proxyman.local ::1 proxyman.local ``` 3. Done. Use Google Chrome, visit `http://proxyman.local:3000` -> Proxyman will capture the traffic as usual. ![CleanShot 2023-04-15 at 10 18 40@2x](https://user-images.githubusercontent.com/5878421/232180487-985733a0-516f-4e85-9bf6-b3e8b1903ecb.jpg) ---------------- If you;re using fetch or axios to call to 3rd-server, and you'd like to capture these traffic. Please check this doc: https://docs.proxyman.io/debug-devices/nodejs
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 15, 2023):

@gkatsanos I've updated the NodeJS Documentation to make it clears what the Proxyman & solution: https://docs.proxyman.io/debug-devices/nodejs

<!-- gh-comment-id:1509489247 --> @NghiaTranUIT commented on GitHub (Apr 15, 2023): @gkatsanos I've updated the NodeJS Documentation to make it clears what the Proxyman & solution: https://docs.proxyman.io/debug-devices/nodejs
Author
Owner

@gplusdotgr commented on GitHub (Apr 15, 2023):

thank you , that worked.

<!-- gh-comment-id:1509824688 --> @gplusdotgr commented on GitHub (Apr 15, 2023): thank you , that worked.
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 16, 2023):

@gkatsanos thanks for your suggestion. I've found the solution to Automatically capture all traffic that is called from the Terminal app.

It can work with NodeJS, cURL, Ruby, and Python without any manual config 💯

For example: Just open Proxyman -> Click on "Terminal" -> New Terminal/iTerm shows up -> Run your NodeJS server here -> Traffic is automatically captured and send to Proxyman 👍

I'm going to play around and support this feature now. It will resolve all pain we have 😄

<!-- gh-comment-id:1510024333 --> @NghiaTranUIT commented on GitHub (Apr 16, 2023): @gkatsanos thanks for your suggestion. I've found the solution to Automatically capture all traffic that is called from the Terminal app. It can work with NodeJS, cURL, Ruby, and Python without any manual config 💯 For example: Just open Proxyman -> Click on "Terminal" -> New Terminal/iTerm shows up -> Run your NodeJS server here -> Traffic is automatically captured and send to Proxyman 👍 I'm going to play around and support this feature now. It will resolve all pain we have 😄
Author
Owner

@gplusdotgr commented on GitHub (Apr 16, 2023):

Sounds awesome! is it possible to start a terminal already now from the current Proxyman version or is this a future feature? :)

<!-- gh-comment-id:1510084362 --> @gplusdotgr commented on GitHub (Apr 16, 2023): Sounds awesome! is it possible to start a terminal already now from the current Proxyman version or is this a future feature? :)
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 19, 2023):

@gkatsanos here is a sneak peek of what I'm doing 😄

  • Proxyman automatically captures all traffic from this Terminal. Support cURL (no need --proxy flag), and NodeJS (including fetch, axios, request, and superagent libraries).

Video Demo

  • Setup: Use ExpressJS for a local web server
  • Use fetch to call to an external API

=> Proxyman captures it automatically
=> User doesn't need to modify any source code.

https://user-images.githubusercontent.com/5878421/232966680-20327230-2818-49a2-b671-5b8f2b6c3f38.mp4

<!-- gh-comment-id:1514114033 --> @NghiaTranUIT commented on GitHub (Apr 19, 2023): @gkatsanos here is a sneak peek of what I'm doing 😄 - Proxyman automatically captures all traffic from this Terminal. Support cURL (no need `--proxy` flag), and NodeJS (including `fetch`, `axios`, `request`, and `superagent` libraries). ### Video Demo - Setup: Use ExpressJS for a local web server - Use `fetch` to call to an external API => ✅ Proxyman captures it automatically => ✅ User doesn't need to modify any source code. https://user-images.githubusercontent.com/5878421/232966680-20327230-2818-49a2-b671-5b8f2b6c3f38.mp4
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 20, 2023):

@gkatsanos just wondering: What's the NodeJS network library you're using? Currently, in the Beta build, It supports axios, got, superagent, fetch (node v18), node-fetch, and a built-in NodeJS https package.

It works out of the box (No Proxy config, no certificate)

<!-- gh-comment-id:1515955512 --> @NghiaTranUIT commented on GitHub (Apr 20, 2023): @gkatsanos just wondering: What's the NodeJS network library you're using? Currently, in the Beta build, It supports axios, got, superagent, fetch (node v18), node-fetch, and a built-in NodeJS `https` package. It works out of the box ✅ (No Proxy config, no certificate)
Author
Owner

@gplusdotgr commented on GitHub (Apr 20, 2023):

@NghiaTranUIT https://docs.astro.build/en/guides/data-fetching/ I think it uses some form of native fetch

<!-- gh-comment-id:1515974693 --> @gplusdotgr commented on GitHub (Apr 20, 2023): @NghiaTranUIT https://docs.astro.build/en/guides/data-fetching/ I think it uses some form of native fetch
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 22, 2023):

Good news: @gkatsanos @sonic1981 @fishcharlie @dvcrn @shirshak55 @Cykelero

Proxyman can:

  • Capture HTTP/HTTPS traffic from NodeJS (axios, fetch, node-fetch, got, superagent), Ruby, and Python out of the box
  • Don't need to set the Proxy or trust the certificate manually.
  • 1-click and done 🎉

Download

Beta: https://download.proxyman.io/beta/Proxyman_4.6.1_Feature:_Automatic_Setup.dmg

Automatic Setup

  1. Proxyman -> Setup menu -> Automatic Setup -> Start the Terminal App
  2. Grant AppleScript permission if needed
  3. You can start your NodeJS server or run a script on this pre-configured Terminal
  4. Done. Enjoy new traffic on Proxyman

CleanShot 2023-04-22 at 15 18 19@2x

Manual Setup

  • Just follow the instruction
    CleanShot 2023-04-22 at 15 23 20@2x

Documentation:

https://docs.proxyman.io/automatic-setup/automatic-setup

Demo video:

<!-- gh-comment-id:1518572201 --> @NghiaTranUIT commented on GitHub (Apr 22, 2023): Good news: @gkatsanos @sonic1981 @fishcharlie @dvcrn @shirshak55 @Cykelero Proxyman can: - Capture HTTP/HTTPS traffic from NodeJS (axios, fetch, node-fetch, got, superagent), Ruby, and Python `out of the box` ✅ - Don't need to set the Proxy or trust the certificate manually. - 1-click and done 🎉 ## Download Beta: https://download.proxyman.io/beta/Proxyman_4.6.1_Feature:_Automatic_Setup.dmg ## Automatic Setup 1. Proxyman -> Setup menu -> Automatic Setup -> Start the Terminal App 2. Grant AppleScript permission if needed 3. You can start your NodeJS server or run a script on this pre-configured Terminal 4. Done. Enjoy new traffic on Proxyman ✅ ![CleanShot 2023-04-22 at 15 18 19@2x](https://user-images.githubusercontent.com/5878421/233774571-e57b14c0-321e-4c30-8df0-7592341a20ab.jpg) ## Manual Setup - Just follow the instruction ![CleanShot 2023-04-22 at 15 23 20@2x](https://user-images.githubusercontent.com/5878421/233774565-4d03a1e0-c9b1-4c4f-8b37-88f45ee7d95b.jpg) ## Documentation: https://docs.proxyman.io/automatic-setup/automatic-setup ## Demo video: - Use Automatic Setup from Proxyman, to capture traffic from Python (`aiohttp` library). NodeJS is similar. - Old approach: The user has to add the Proxy and disable the SSL Verification on their source code. - New approach: 1-click and done ✅ - Video: https://drive.google.com/file/d/1UrWOJtY-tAFVv_OcgulTBB9qRlojgOnp/view?usp=sharing
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 22, 2023):

@gkatsanos if you don't mind, please give it a try. I've tested with NodeJS (fetch). Proxyman can see traffic from fetch requests 👍

<!-- gh-comment-id:1518572551 --> @NghiaTranUIT commented on GitHub (Apr 22, 2023): @gkatsanos if you don't mind, please give it a try. I've tested with NodeJS (fetch). Proxyman can see traffic from `fetch` requests 👍
Author
Owner

@Geczy commented on GitHub (Apr 25, 2023):

trying this now, i think its working to capture requests, but it's not actually forwarding the request to the original server from what i can tell. im getting a HTTP/1.1 301 Moved Permanently on all outgoing requests from inside the electron app. i started the app from the terminal via open ....xdyz/Title.app

i don't have this issue in httptoolkit

it looks like maybe proxyman is not following the location (L parameter in curl)

so the original request is http and it's not following to https

<!-- gh-comment-id:1521095355 --> @Geczy commented on GitHub (Apr 25, 2023): trying this now, i think its working to capture requests, but it's not actually forwarding the request to the original server from what i can tell. im getting a `HTTP/1.1 301 Moved Permanently` on all outgoing requests from inside the electron app. i started the app from the terminal via `open ....xdyz/Title.app` i don't have this issue in httptoolkit it looks like maybe proxyman is not following the location (`L` parameter in curl) so the original request is `http` and it's not following to `https`
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 25, 2023):

@Geczy can you share with me how your setup your Electron app 🤔

You have the source code, which allows you to start the Electron app from the Terminal, right? Or you'd like to capture traffic from other Electron app?


From what I know, I need to support ElectronJS. The above Beta build is only for NodeJS, Ruby, and Python.

<!-- gh-comment-id:1521096466 --> @NghiaTranUIT commented on GitHub (Apr 25, 2023): @Geczy can you share with me how your setup your Electron app 🤔 You have the source code, which allows you to start the Electron app from the Terminal, right? Or you'd like to capture traffic from other Electron app? ------------- From what I know, I need to support ElectronJS. The above Beta build is only for NodeJS, Ruby, and Python.
Author
Owner

@Geczy commented on GitHub (Apr 25, 2023):

well previously in the production release, the electron app did not even display in proxyman as an "app" or any of the domains or anything. it's only captured if i use the terminal that proxyman opens to open the app.

i start this app by doing open /System/Volumes/Data/Users/matt/Applications/xyz.app in the spawned terminal

in this build, it does display. the electron app uses axios under the hood, if that matters. i don't have the source code for it.

<!-- gh-comment-id:1521097799 --> @Geczy commented on GitHub (Apr 25, 2023): well previously in the production release, the electron app did not even display in proxyman as an "app" or any of the domains or anything. it's only captured if i use the terminal that proxyman opens to open the app. i start this app by doing `open /System/Volumes/Data/Users/matt/Applications/xyz.app` in the spawned terminal in this build, it does display. the electron app uses axios under the hood, if that matters. i don't have the source code for it.
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 25, 2023):

I see, if you don't mind, can you share with me the name of your Electron app via nghia@proxyman.io ? I'd like to download production build, test it and fix it 👍

<!-- gh-comment-id:1521098725 --> @NghiaTranUIT commented on GitHub (Apr 25, 2023): I see, if you don't mind, can you share with me the name of your Electron app via nghia@proxyman.io ? I'd like to download production build, test it and fix it 👍
Author
Owner

@Geczy commented on GitHub (Apr 25, 2023):

sure, i sent you the email. thanks for taking a look. super sexy app

<!-- gh-comment-id:1521099855 --> @Geczy commented on GitHub (Apr 25, 2023): sure, i sent you the email. thanks for taking a look. super sexy app
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 26, 2023):

New Beta build 🎉

https://github.com/ProxymanApp/Proxyman/issues/1611#issuecomment-1521044841

<!-- gh-comment-id:1522608989 --> @NghiaTranUIT commented on GitHub (Apr 26, 2023): ### New Beta build 🎉 https://github.com/ProxymanApp/Proxyman/issues/1611#issuecomment-1521044841
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 29, 2023):

Just a friendly reminder that we've released the automatic / manual setup 🎉

cc @gkatsanos @sonic1981 @fishcharlie @dvcrn @shirshak55 @Cykelero

You can checkout the latest build or from this comment: https://github.com/ProxymanApp/Proxyman/issues/236#issuecomment-1518572201

<!-- gh-comment-id:1528715778 --> @NghiaTranUIT commented on GitHub (Apr 29, 2023): Just a friendly reminder that we've released the automatic / manual setup 🎉 cc @gkatsanos @sonic1981 @fishcharlie @dvcrn @shirshak55 @Cykelero You can checkout the latest build or from this comment: https://github.com/ProxymanApp/Proxyman/issues/236#issuecomment-1518572201
Author
Owner

@gplusdotgr commented on GitHub (Apr 29, 2023):

Thank you!

<!-- gh-comment-id:1528715923 --> @gplusdotgr commented on GitHub (Apr 29, 2023): Thank you!
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 29, 2023):

@Geczy I've fixed the ElectronJS issue, please get the Beta build from https://github.com/ProxymanApp/Proxyman/issues/1618#issuecomment-1528565327

<!-- gh-comment-id:1528716020 --> @NghiaTranUIT commented on GitHub (Apr 29, 2023): @Geczy I've fixed the ElectronJS issue, please get the Beta build from https://github.com/ProxymanApp/Proxyman/issues/1618#issuecomment-1528565327
Author
Owner

@Geczy commented on GitHub (Apr 30, 2023):

Can confirm it's fixed !

<!-- gh-comment-id:1529030057 --> @Geczy commented on GitHub (Apr 30, 2023): Can confirm it's fixed !
Author
Owner

@ChiuMungZitAlexander commented on GitHub (May 17, 2023):

My question is how can I disable it?

<!-- gh-comment-id:1550861504 --> @ChiuMungZitAlexander commented on GitHub (May 17, 2023): My question is how can I disable it?
Author
Owner

@NghiaTranUIT commented on GitHub (May 17, 2023):

@ChiuMungZitAlexander Automatic Script doesn't start if you don't open the Terminal app. It only affects the current Terminal Session, not permanently change your OS. So, no need to disable it.

<!-- gh-comment-id:1550863179 --> @NghiaTranUIT commented on GitHub (May 17, 2023): @ChiuMungZitAlexander Automatic Script doesn't start if you don't open the Terminal app. It only affects the current Terminal Session, not permanently change your OS. So, no need to disable it.
Author
Owner

@gplusdotgr commented on GitHub (Jun 14, 2023):

Hey @NghiaTranUIT :


version 3.6.1
----------------------------------------------
------PROXYMAN AUTOMATIC SETUP SCRIPTS--------
----------------------------------------------
⭐️ Auto capture HTTP/HTTPS traffic from this Terminal app.
Support NodeJS: (axios, fetch, got, request, superagent)
Support Ruby: (http, net/http, net/https)
Support Python: (http, httplib, httplib2)

✅ Injected Proxyman variable environments to current shell

👉 Please start your local server or run your script from this Terminal.
set: +a: invalid variable name. See `help identifiers`

(Type 'help set' for related documentation)
 ✘  py[learning]  ~ 


I get this error when trying to open up a new 'automatic setup' terminal. I use

 fish -v
fish, version 3.6.1
<!-- gh-comment-id:1590704588 --> @gplusdotgr commented on GitHub (Jun 14, 2023): Hey @NghiaTranUIT : ``` version 3.6.1 ---------------------------------------------- ------PROXYMAN AUTOMATIC SETUP SCRIPTS-------- ---------------------------------------------- ⭐️ Auto capture HTTP/HTTPS traffic from this Terminal app. Support NodeJS: (axios, fetch, got, request, superagent) Support Ruby: (http, net/http, net/https) Support Python: (http, httplib, httplib2) ✅ Injected Proxyman variable environments to current shell 👉 Please start your local server or run your script from this Terminal. set: +a: invalid variable name. See `help identifiers` (Type 'help set' for related documentation) ✘  py[learning]  ~  ``` I get this error when trying to open up a new 'automatic setup' terminal. I use ``` fish -v fish, version 3.6.1 ```
Author
Owner

@gplusdotgr commented on GitHub (Jun 14, 2023):

another issue I have (unrelated?) is even though I see one request, I dont see another one which happens to an external API endpoint but which passes through my VPN client.. could this be the reason?

<!-- gh-comment-id:1590707156 --> @gplusdotgr commented on GitHub (Jun 14, 2023): another issue I have (unrelated?) is even though I see one request, I dont see another one which happens to an external API endpoint but which passes through my VPN client.. could this be the reason?
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 14, 2023):

@gkatsanos yes it can be a problem. If you're using fish, when opening the Automatic Setup Terminal -> Can you print the echo $PATH, to see if it contains the Proxyman path?

It's where Proxyman overrides the NodeJS env.

➜  ~ echo $PATH            
/Applications/Proxyman.app/Contents/Frameworks/ProxymanCore.framework/Versions/A/Resources/overrides/path

The reason is: there is a small warning from your log.

set: +a: invalid variable name. See `help identifiers`
<!-- gh-comment-id:1590716681 --> @NghiaTranUIT commented on GitHub (Jun 14, 2023): @gkatsanos yes it can be a problem. If you're using `fish`, when opening the Automatic Setup Terminal -> Can you print the `echo $PATH`, to see if it contains the Proxyman path? It's where Proxyman overrides the NodeJS env. ``` ➜ ~ echo $PATH /Applications/Proxyman.app/Contents/Frameworks/ProxymanCore.framework/Versions/A/Resources/overrides/path ``` The reason is: there is a small warning from your log. ``` set: +a: invalid variable name. See `help identifiers` ```
Author
Owner

@gplusdotgr commented on GitHub (Jun 14, 2023):

 ✘  py[learning]  ~  echo $PATH         
/Applications/Proxyman.app/Contents/Frameworks/ProxymanCore.framework/Versions/A/Resources/overrides/path /Users/gkatsanos/Library/pnpm /Users/gkatsanos/.pyenv/shims /opt/homebrew/Cellar/pyenv-virtualenv/1.2.1/shims /Users/gkatsanos/.pyenv/bin /Users/gkatsanos/.nvm/versions/node/v16.19.0/bin /Users/gkatsanos/.rbenv/shims /Users/gkatsanos/.pyenv/bin /opt/homebrew/bin /usr/local/bin /Users/gkatsanos/.yarn/bin /usr/bin /bin /usr/sbin /sbin
 py[learning]  ~  


<!-- gh-comment-id:1590858672 --> @gplusdotgr commented on GitHub (Jun 14, 2023): ``` ✘  py[learning]  ~  echo $PATH /Applications/Proxyman.app/Contents/Frameworks/ProxymanCore.framework/Versions/A/Resources/overrides/path /Users/gkatsanos/Library/pnpm /Users/gkatsanos/.pyenv/shims /opt/homebrew/Cellar/pyenv-virtualenv/1.2.1/shims /Users/gkatsanos/.pyenv/bin /Users/gkatsanos/.nvm/versions/node/v16.19.0/bin /Users/gkatsanos/.rbenv/shims /Users/gkatsanos/.pyenv/bin /opt/homebrew/bin /usr/local/bin /Users/gkatsanos/.yarn/bin /usr/bin /bin /usr/sbin /sbin py[learning]  ~  ```
Author
Owner

@leohxj commented on GitHub (Sep 25, 2023):

add export NODE_TLS_REJECT_UNAUTHORIZED=0 after manual setup.

<!-- gh-comment-id:1732888297 --> @leohxj commented on GitHub (Sep 25, 2023): add `export NODE_TLS_REJECT_UNAUTHORIZED=0` after manual setup.
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 25, 2023):

@leohxj a Beta build for you: https://download.proxyman.io/beta/Proxyman_4.11.0_Improve_UI_v1.dmg

Changelog

  • Add export NODE_TLS_REJECT_UNAUTHORIZED=0
<!-- gh-comment-id:1733100570 --> @NghiaTranUIT commented on GitHub (Sep 25, 2023): @leohxj a Beta build for you: https://download.proxyman.io/beta/Proxyman_4.11.0_Improve_UI_v1.dmg ### Changelog - Add export NODE_TLS_REJECT_UNAUTHORIZED=0
Author
Owner

@leohxj commented on GitHub (Sep 26, 2023):

thanks @NghiaTranUIT , it works well

<!-- gh-comment-id:1734952075 --> @leohxj commented on GitHub (Sep 26, 2023): thanks @NghiaTranUIT , it works well
Author
Owner

@shirshak55 commented on GitHub (Sep 27, 2023):

actually I don't recommend this. Last week , I think from Egypt government was hacked because of http. Although, you may not be the target, I don't recommend messing with security.

I think proxy man should explicitly ask if they want to reduce this security?

<!-- gh-comment-id:1736574578 --> @shirshak55 commented on GitHub (Sep 27, 2023): actually I don't recommend this. Last week , I think from Egypt government was hacked because of http. Although, you may not be the target, I don't recommend messing with security. I think proxy man should explicitly ask if they want to reduce this security?
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 27, 2023):

@shirshak55 it doesn't globally modify your entire system. It only takes effect on the current Terminal app session when you need to debug your NodeJS project.

<!-- gh-comment-id:1736578471 --> @NghiaTranUIT commented on GitHub (Sep 27, 2023): @shirshak55 it doesn't globally modify your entire system. It only takes effect on the current Terminal app session when you need to debug your NodeJS project.
Author
Owner

@leohxj commented on GitHub (Sep 27, 2023):

yes, only for develop and use it locally

<!-- gh-comment-id:1736581091 --> @leohxj commented on GitHub (Sep 27, 2023): yes, only for develop and use it locally
Author
Owner

@tonyxiao commented on GitHub (Nov 3, 2023):

Does this work with the built in node.js fetch now? Or is the node-fetch 3rd party lib required to use with proxyman?

<!-- gh-comment-id:1791887630 --> @tonyxiao commented on GitHub (Nov 3, 2023): Does this work with the built in node.js fetch now? Or is the `node-fetch` 3rd party lib required to use with proxyman?
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 3, 2023):

It works for both. Native fetch and node-fetch

<!-- gh-comment-id:1791896368 --> @NghiaTranUIT commented on GitHub (Nov 3, 2023): It works for both. Native fetch and node-fetch
Author
Owner

@tonyxiao commented on GitHub (Nov 3, 2023):

Which env variable does native fetch use? When I look at the node docs it seems that fetch doesn't support proxy / agent agt all.

<!-- gh-comment-id:1791914495 --> @tonyxiao commented on GitHub (Nov 3, 2023): Which env variable does native fetch use? When I look at the node docs it seems that fetch doesn't support proxy / agent agt all.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 3, 2023):

Auto Setup from Proxyman does more things than just the env. Proxyman uses global-agent to auto override the proxy of NodeJS Fetch in runtime.

You simply:

  1. Open Proxyman, make sure you setup the certificate properly in Certificate menu -> Install for Mac.
  2. Setup menu -> Auto -> start the Termnial.
  3. Run your NodeJS script and this terminal and it's done
<!-- gh-comment-id:1791917950 --> @NghiaTranUIT commented on GitHub (Nov 3, 2023): Auto Setup from Proxyman does more things than just the env. Proxyman uses global-agent to auto override the proxy of NodeJS Fetch in runtime. You simply: 1. Open Proxyman, make sure you setup the certificate properly in Certificate menu -> Install for Mac. 2. Setup menu -> Auto -> start the Termnial. 3. Run your NodeJS script and this terminal and it's done ✅
Author
Owner

@tonyxiao commented on GitHub (Nov 3, 2023):

Hmm but the global-agent lib doesn't actually seem to support node 18 fetch. @see https://github.com/gajus/global-agent/issues/52 Does proxyman use the undici workaround too?

<!-- gh-comment-id:1791935644 --> @tonyxiao commented on GitHub (Nov 3, 2023): Hmm but the `global-agent` lib doesn't actually seem to support node 18 fetch. @see https://github.com/gajus/global-agent/issues/52 Does proxyman use the undici workaround too?
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 3, 2023):

Hmm but the global-agent lib doesn't actually seem to support node 18 fetch. @see gajus/global-agent#52 Does proxyman use the undici workaround too?

Yes, it's.

<!-- gh-comment-id:1791949644 --> @NghiaTranUIT commented on GitHub (Nov 3, 2023): > Hmm but the `global-agent` lib doesn't actually seem to support node 18 fetch. @see [gajus/global-agent#52](https://github.com/gajus/global-agent/issues/52) Does proxyman use the undici workaround too? Yes, it's.
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 26, 2024):

FYI: We can capture all HTTPS Traffic from NodeJS with the Auto Setup (https://docs.proxyman.io/debug-devices/nodejs)

No need to config the Proxy or manually trust the self-signed certificate on your NodeJS code 👍

<!-- gh-comment-id:2376374524 --> @NghiaTranUIT commented on GitHub (Sep 26, 2024): FYI: We can capture all HTTPS Traffic from NodeJS with the Auto Setup (https://docs.proxyman.io/debug-devices/nodejs) No need to config the Proxy or manually trust the self-signed certificate on your NodeJS code 👍
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
starred/Proxyman#233
No description provided.