in reply to Re: Connecting to a database using a socks proxy?
in thread Connecting to a database using a socks proxy?

Which database is it? I'm not sure about DBI (I don't think it supports the environment variable ALL_PROXY=socks5h://host:port?), but as a general solution, I've had some success with proxychains (and/or proxychains-ng depending on which your Linux distro provides). On newer Debian/Ubuntu releases, there's a package proxychains4 (alternatively, just proxychains), install that, and in /etc/proxychains.conf change the socks4 entry to socks5 if necessary and adjust the IP and port. Then, for many (but not all) programs, you can just do e.g. proxychains4 perl ... and it will try to intercept the networking to send it through the SOCKS proxy.

Replies are listed 'Best First'.
Re^3: Connecting to a database using a socks proxy?
by Skeeve (Parson) on Feb 26, 2020 at 20:20 UTC

    Postgres is what I want to use.

    I saw that there is a DBD::Proxy but as far as I understood this is only for DBI::ProxyServer.

    I also wonder whether or not IO::Socket::Socks::Wrapper could be a way to go…

    Will think about proxychain but I'm not sure it's worth the effort. As it's mainly for testing purposes, I think I will (again?) go for port-forwarding.


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e