Access DBs through proxy?
How to configure proxy? I am behind a corporate firewall. All we do must go thru proxy. I can connect to localhost pg fine. Trying to connect to pg on remote server fails with
Connection Error
connect ECONNREFUSED 10.202.84.47:5432
i have set my typical http_proxy value in my session and launched sqlectron gui from there, but same result. I don't see any reference doc on configuring proxy. Atom and VS Code have their own ways of configuring proxies. Has this been addressed by Sqlectron?
Just found Sqlectron. love it! beautiful work, folks. If i can get this to work for all my DBs regardless of where they live, this is the universal SQL client. Death to php*admin!
Hi @btmurrell,
First of all. I'm glad you like the app.
It is the first time someone issue a problem related to proxies.
My first solution would be the HTTP_PROXY env variable. But you have already tried that without success. Just checking, have you done some like this?
(OSX)
export HTTP_PROXY=http://user:[email protected]:port
cd /Applications/Sqlectron.app
open .
What makes this problem more confuse is that the connections does not use HTTP protocol for communications. So I am not even sure that HTTP_PROXY would really work at all.
The solutions (or not) I have found for each db:
- mysql - Seems is possible. But need to create a socket to the proxy.
- pg - Someone tried the same solution from mysql. But seems that didn't worked for him.
- mssql - Seems is not possible. And has no support for linux socket.
I unfortunately don't have a proxy to test that.
thanks @maxcnunes. i forked and will investigate a fix in my proxy world when i have a chance. i spent a little time on it, but had to stop. running your dev setup was a breeze. kudos. i ran your npm link script to reference local sqlelectron-core... but could not get the debugger to stop in core.... i see you have top level node_modules and app/node_modules.... any pointers to getting into core code in debugger is appreciated.
Do you mean debugger from the browser? You will not have access to that code through the browser. Because that is a nodejs code (backend). The code you have access through the browser is just the frontend. There are some ways to allow debug on nodejs. But I have never used that. My debug is console.log 😆
😁 no worries. yeah, i meant the server side. that's where the pg connect code runs (sqlectron-core), so, if i'm not mistaken, that's where i'd need to step. i'm comfortable debugging server side thru attaching to port 5858 in various debuggers.... the problem i faced is that even tho i attached, it never stopped inside the connect functions, so i suspect i was loading the wrong code in my debugger. it's ok, i'll try to figure it out.
Just to ensure. The code you probably gonna need to debug is:
- runWithConnection -
node_modules/sqlectron-core/lib/db/clients/postgresql.js
If you are using ssh. You may have to debug this one as well:
node_modules/sqlectron-core/lib/db/tunnel.js
facing the same issue
had the issue been solved? i had the same problem