I would like to connect to neo4j instance hosted in aws through my node server running in local. I can connect to it using neo4j desktop using proxy settings. I couldent find similar settings in driver though...
Am i missing something?
Tried setting proxy at system level, bash level using export/set nothing works....
Tried using library 'global-tunnel' but this only supports 'request' library and I guess relies on http and https. I am using bolt and that seems to be problem...
Related
I was working in a project and sudden noticed that while react is calling node api, i can see port number also in console network, which i think is not secure.
So is there any tool, settings whcih we can use to hide ports from api calls.
I am using apache as server, node api and react frontend.
Thanks
Tried virtual host settings but not worked
[UPDATE]
I created an NPM module for my nodejs SDK.
My SDK is used to ease access to the server I develop.
In addition I develop a front-end, which imports the SDK and access to the server thru it.
While developing:
Summing up the architecture while developing in local:
http://localhost:3000/frontend (w/ imported npm sdk) --> http://localhost:5000/api
In localhost development, I import it and everything works well, the SDK consumes the localhost server I develop. (In devel mode, the module itself is npm link'ed).
While testing:
The SDK has a function that enables it to switch the infrastructure, so that it can be tested against previous version of the server deploy to production (or staging).
Summing up testing against production server after the sdk.switchToInfrastructure():
http://localhost:3000/frontend (w/ imported npm sdk) --> https://server.com/api
When I switch to something like the production server at https://server.com, all the requests issued from the SDK are blocked by the browser:
GET https://server.com/api net::ERR_SSL_PROTOCOL_ERROR
I believe that the fact the front is still on HTTP causes the issue.
What to do to prevent this to occur? Or any tips to help in the process of testing one's NPM module against several deployed infrastructures.
[UPDATE 2]
Additional info: when I do not import my SDK via npm (I simply import the sdk from a local file), there is no issue at all, I can issue the request from localhost.
The browser blocks Cross Origin Requests if your server not supports CORS.
This means that if your client (which runs on localhost) tries to fetch endpoint of production.server.com it will be blocked by default.
Read the article about CORS and how to enable it.
Where do we do the proxy settings for the node mqtt package?
I have a system ready, that needs to get through a SOCKS5 proxy. But where do i do the settings for it?
I was not able to find anything regarding that on the github repo of the package.
I would guess that you don't actually in the nodejs code.
Have you tried using the socksify application to wrap your nodejs application?
socksify man page
To launch Node.js app one needs to run node app.js
The app is to read data from Internet.
Now I work behind firewall and the target server is only available via proxy that is running as localhost:3213
I don't want to change OS setting and allow all apps to use the proxy.
How to specify proxy for launched Node.js app without changing JavaScript code?
Node options (listed with node -h) don't give hint.
How can I use an http proxy with node.js http.Client? refers to altering Node app.
For Java I can pass [Java] system properties via -D parameters
java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3213 -Dhttp.nonProxyHosts=”localhost|host.example.com” MyJavaApplication
I'm having fits accomplishing something and after scouring google & SO, throwing my hands up after a few days. Trying to do something that I think is pretty common: debug / examine all HTTP traffic while developing a node.js app.
In Windows it is as simple as firing up Fiddler and I can see all HTTP & HTTPS traffic from all processes. But I've switched platforms over to OSX and trying to make the same work.
I've tried using Charles & MITMPROXY, but all I'm seeing is the traffic to, with the response, my node.js app. My node.js app is calling external services, some using the popular request package (which I have seen how to set that up) but also using other packages, like azure-storage. What's troubling me is I can't get any of the debugging proxies to show me at the azure-storage package is sending / receiving to the endpoints they are calling.
Conceptually I think I get it... I have to tell these different things (like node.js, request & azure-storage) to go through the proxy each of these tools uses... but how can you do that without modifying their source? Can't, like how Fiddler works on Windows, you do something to "all traffic goes through this proxy"?
I'd use Fiddler on OSX but it is currently not working with no ETA in sight after talking to Telerik.
So the problem I was having is what I thought... in my specific instance the module that I was using to access Azure storage was not using the default proxy. I found a package (**global-tunnel that hijacked everything that used the request package to control it going through a proxy. Now I saw stuff show up in the HTTP debuggers I was using.
The problem now is when I am trying to reach an HTTPS endpoint... using something like Charles, it used it's own SSL cert which wasn't trusted by Azure so the connections were refused. Back to the drawing board...