How to ship/fetch data from Client server which is not directly accessible to Logstash

I had implemented ELK stack on my Localhost.

I want to Ship Data from Client server to ELK server.

I am able to do so , if client server is directly accessible from ELK server.

But, in production environment , the Client server is never directly accessible. Instead, we have to Hop (Proxy) between one or two server to access the Client server. (Redis might be able to help here, but i don't know how to implement it.

Also, I want to connect logstash to JDBC server which is present on Client server.

How can i fetch/Ship data from Client server in such case where Client server is not directly accessible.

What kind of protocols do the proxies speak, i.e. what kind of traffic is allowed?

Only TCP

And they're SOCKS5 proxies or what? So you'd essentially need some piece of software on the client side that can speak SOCKS5 in order to call out to the Logstash process on the outside?