devtools-backend
devtools-backend copied to clipboard
PROXY_NETWORK_ADDRESS should not be equal os.hostname
I use proxy server locally to inject the script into the app running in the browser
When the app name appears in the panel
I click it and it tries to connect to ws and get
websocket connection failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED
Socket result url is
ws://macbook-pro.local:9222/devtools/page/0abece5a-33ef-4c1b-bdef-ef1e79848a9e
I suppose it should be ws://localhost:9222/blabla
The weird address comes from PROXY_NETWORK_ADDRESS
variable in proxy.js
If the process.env.PROXY_NETWORK_ADDRESS
is not specified it should not be equal os.hostname()
but localhost
The result for os.hostname()
in my case is MacBook-Pro.local