Look at this nodejs 6pn example: github/fly-apps/privatenet/lookup.js.
Do note that your fly apps would also need to be listening on fly-local-6pn address on whatever 6pn port you intend to connect to.
Quoting from Specify instance-id in fly-replay header - #10 by ignoramous
…forwarding requests over Fly’s 6pn (“internal services” listening on
fly-local-6pnor::or_local_ip.internalPrivate networking not working - #4 by kurt) to the primary instance at<fly-alloc-id>.vm.appname.internalshould work just as well: Send request to a specific VM - #2 by greg
Read also: github/fly-apps/nginx-cluster/readme:discovery.