Thanks for reaching out on this, we are seeing now that fly proxy on latest flyctl has some issues and we will investigate.
Your port should be correct, I think the only thing missing might be the db name (which is most likely postgres too): postgres://postgres:<pass>@<app_name>.internal:5432/postgres. Can you share what error message you got?