0

See the problem is this: Currently we are in control of a proxy server in our network which redirects all requests using the HTTP protocol. Someone asks for a website, it goes to the proxy, it sends the request in http and goes back in http.

Now what we would want to have is a way for a proxy server to send different protocols. This means: Instead of sending the HTTP,HTTPS w/e protocol we want to send protocol X.

The reasoning behind this is that we have hardware/software solutions on the other side that don't listen to HTTP or HTTPS requests and need to be approached by another protocol.

I would like to know if this is possible in any way or if we have to search for another solution that will take the requests in the middle.

If there are any questions about this question feel free to ask I understand that my description might be a little vague.

You all have my thanks in advance!

-Schmickle

edit: The finished product should be capable of doing the following:

(User) tries to go to (dns-name) with a specific protocol (Specific protocol unknown, let's say it runs on port 8512). Now the proxy-server should send this protocol to the end-device ( So NOT HTML, but protocol 8512!! )


I'm going to do some research into this SOCKS protocol. If it's the answer I need I'll let you know!

Thanks for the answers for now already anyway, if anyone has any other solutions feel free to let me know.

I'll be back here again once I have more understanding of the SOCKS principle.


It would seem like this SOCKS solution is made for application that have native support for the protocol? Or maybe I am misunderstanding something. However, our applications do not have this build-in support for SOCKS, which would mean using SOCKS is out of the question. What I need is a "server/gateway" of sorts that's in between a client and a remote server. This solution should be able to redirect traffic based on protocols/ports.

I'm sorry if the explanation is vague. If there is any confusion please feel free to ask.

  • sure you can use tcp backends, but you loose sni/vhost support. – Jacob Evans Mar 13 '17 at 12:14
1

It sounds like you're looking for the SOCKS protocol as defined in RFC 1928.

Socket Secure (SOCKS) is an Internet protocol that exchanges network packets between a client and server through a proxy server. ... Practically, a SOCKS server proxies TCP connections to an arbitrary IP address, and provides a means for UDP packets to be forwarded. ...

0

On linux, tsocks is one solution to making non-SOCKS aware applications use SOCKS: https://linux.die.net/man/8/tsocks.

However, it sounds like SOCKS may not be the only solution to your problem - I suspect haproxy would, in your case, be a viable alternative.

There are a couple of differences between the two approaches, the most notable one is that haproxy would remove the need for proxy awareness (because there is no SOCKS protocol to deal with). A quick introduction to haproxy can be found here: https://www.digitalocean.com/community/tutorials/an-introduction-to-haproxy-and-load-balancing-concepts. Your use case sounds similar to https://www.digitalocean.com/community/articles/how-to-use-haproxy-to-set-up-mysql-load-balancing--3.

haproxy is not the only option here - nginx can also do UDP and TCP proxying (I would probably go for haproxy, but that's a matter of personal choice).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.