2

A customer uses Apache HTTP Webserver (AW) to redirect HTTP requests to Apache Tomcat (AT).

I need to add a special servlet to a current application being served by AT. This servlet will just start a thread and do nothing more. This thread's sole purpose is to listen to incoming TCP connections.

Is it possible to redirect inbound TCP connections received by AW, to AT ?

So AW will only act as a TCP proxy.I prefer a proxy solution, tunneling is not preferable but I would consider it if there is no other solution.

I have no control over the client, which expects me to follow a strict custom text-based protocol.

[Incoming connection]

Client -> AW -> AT

[Response]

Client <- AW <- AT
5
  • A web socket connection can be (reverse) proxied by apache with mod_proxy_wstunnel
    – HBruijn
    Aug 7 '16 at 15:23
  • @HBruijn, does this mandate a specific protocol over TCP ? Such as the websocket protocol ? Aug 7 '16 at 15:25
  • Yes, but it allows you the most flexibility if your want to interact with a webserver
    – HBruijn
    Aug 7 '16 at 15:32
  • @HBruijn, thanks. But I have no control over the client. I'm afraid this won't work. Thanks again. Aug 7 '16 at 15:36
  • This would be cool to have. Pure TCP socket tunnel in any ws
    – tgkprog
    Jan 3 '19 at 19:44

Your Answer

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

Browse other questions tagged or ask your own question.