Reverse proxy services

Hi all.

This post is about reverse proxy Start9 services (not necessarily exposing them to the internet).

I know from other posts that an upcoming update to start9 would allow for more sophisticated networking, but until then we’re stuck.

What I was trying to do is use nginx to reverse proxy services inside start9.

Here’s an example:

events {
    # Optional: Specify event handling parameters
    # For example:
    # worker_connections 1024;

# Define the HTTP block
http {
    # Define the server block
    server {
        # Listen on port 80 (HTTP)
        listen 80;

        location / {
            proxy_pass https://rv7k4bmgyrvwxbq6wzfoxgfb32cyhevn636johpz4taucoghw5jp5oid.local;

            # Proxy headers
            proxy_set_header Host rv7k4bmgyrvwxbq6wzfoxgfb32cyhevn636johpz4taucoghw5jp5oid.local;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;

             # Enable WebSocket support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";

            # Additional headers (if needed)
            proxy_set_header Referer $http_referer;
            proxy_set_header User-Agent $http_user_agent;

The issue here is that even though I’m providing the address of an installed service, it still gets the start9 home page. Which is similar to curl.

When curl some-name.local - it gets the StartOS home page. And when curl someServiceRandomName.local - the result is still StartOS. I assumed that providing the Host header would fix it, but that wasn’t the case.

Now I’m not an expert on these things.
So, I’m curious if it’s possible at all to reach the services via a reverse proxy?

You are fighting mDNS aliasing here, which is going away with v036. There are workarounds if you search this forum, but we will of course recommend waiting for the update if you can.

Thanks for your reply Dave, it is really appreciated!

Unfortunately I couldn’t find anything on the forums to sort out mdns aliasing.

Looking forward to v036.

It would help to know exactly what you want to accomplish. For example, here is a method for reverse proxying services. You specifically mentioned not exposing to the internet though, so what is it you need?

1 Like

Thanks for sharing the link. I’ll have a look.

At first glance, it looks like this sets up a VPS with Tor with a reverse proxy to clear net. That’s not exactly what I’m looking for unfortunately.

Reasons I want a reverse proxy on services:

  1. A galaxy phone I have does not support mdns
  2. Locally hosted services (discord bot and what not) exposed to the internet - these services would consume the APIs of StartOS services (nextcloud, gpt…)

This sounds like a pretty hefty project, unfortunately. Perhaps someone else in the community will chime in, but it probably makes sense to just wait for v036.

Haha, maybe. Thanks Dave!

You can expose ports for services on your LAN using this hack. I made for example my jellyfin service to expose port 8096 and have my appleTV client “swiftfin” to work on my TV. I am not sure if this is what you are looking for tho.