Score:0

Proxy TCP connection to different hosts depending on the origin host

eg flag

I have a home server exposed with NoIP, with a wildcard domain.

I have some services that run on some TCP ports (mainly game servers), and I am trying to sort of "assign" each of them a subdomain. To do this, I have a virtual network interface with multiple IPs where I can publish multiple instances of the same kind of service (two game servers for the same game, for example) and use the same port on all of them.

I have an proxy manager set up that I use to proxy HTTP requests depending on the subdomain to different sites (so http://dashboard.example.com goes to my control panel, http://amp.example.com goes to my application manager, etc.)

Since all subdomains go to the same IP address and I have no way to change that (because it's my own public IP and I only have one), I need to proxy the connections from the LAN host of the server to the corresponding virtual addresses.

My proxy manager (Nginx Proxy Manager) handles TCP proxies, but it does not check for the subdomain, so if I have two services running on port 6789 (each on their own virtual host), I can only proxy the connection to one of them, or use a different port outside. The service would also be available on all subdomains, which I don't want.

How can I achieve this?

TL;DR: I want to proxy TCP connections to different hosts based on the subdomain they came through, like with HTTP proxying

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.