Private only service + UDP + Auto shutdown

Hi,

I’m trying to setup a private only service (reachable only via wireguard) that is UDP based plus will support auto shutdown / auto start. Is this possible? I believe I need to use Fly Proxy for this to happen.

What I believe is needed:

  • My fly.toml has a udp service defined
  • My Docker container is bound to listen on ‘fly-global-services’
  • I only have a private IPv6 address allocated to my app

I see my app in DNS when checking ‘application-name.flycast’, but I can’t connect to it. My wireguard client on my local desktop is connected and working (I can connect to another standard http app used for testing just fine via http://appname.flycast).

When I tell the Docker container to bind to ‘fly-global-services’ since it is a UDP service per the doc below, it is showing it binding to a private IPv4 address. Is this correct?

The only way I’ve gotten this to work is to have the Docker container bind to the ‘fly-local-6pn’ address, but then this auto shuts down even when I’m connected and sending UDP traffic.

Is what I’m trying to do possible?

Thanks!!

Hi… My understanding is that auto-scaling via the Fly Proxy is incompatible with UDP. The docs are a little indirect on this topic, but the ones for the related concurrency stanza say that the only two options for gauging traffic are TCP connections and HTTP requests, :leaves:.

You might be able to get something going with the newer metrics-based auto-scaler, though. (I haven’t looked at that one in any depth myself, yet.)

Hope this helps a little!

Added autoscaling, proxy

Thanks! Actually I just found this which looks to have useful info: Running apps on UDP and TCP · Fly Docs

Like @mayailurus mentioned,Fly Proxy most likely doesn’t Autostart/stop feature. Even the doc has only examples pointing to traffic from TCP and HTTP request.
@res0nat0r usually to accept UDP packets, you would require a dedicated IPv4 address which is why your container was trying to bind to a private IPv4

However, UDP does work for Fly.io private IPv6 but you need fly-local-6pn to bind to a port. eg: fly-local-6pn:8080.
Reference this link- (Private Networking · Fly Docs)

Also, make sure to remove force_https = true since Flycast doesn’t do HTTPS.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.