Ok, so I did this:
FROM alpine
RUN apk update && apk add nmap-ncat net-tools tcpdump bind-tools
CMD tail -f /dev/null
I ran flyctl launch
, and then edited the fly.toml
to include:
[[services]]
internal_port = 10000
protocol = "udp"
[[services.ports]]
port = "10000"
[[services]]
internal_port = 5000
protocol = "udp"
[[services.ports]]
port = "5000"
(Just in case it was port-specific behavior).
I deployed, then I flyctl ssh console
'd into the instance.
I ran ncat -u -4 -v -l -c cat -k fly-global-services 10000
, then, from my desktop, I ran nc -u <myapp>.fly.dev
(nc
is the one true netcat).
It worked; here’s a transcript:
Client:
> $ nc -u testapp.fly.dev 10000
helu
helu
Server:
/ # ncat -u -4 -v -l -c cat -k fly-global-services 10000
Ncat: Version 7.91 ( https://nmap.org/ncat )
Ncat: Listening on 172.19.2.243:10000
Ncat: Connection from 50.205.163.67.
Ncat: Listening on 172.19.2.243:10000