Java ipfs API connection problem

IPFS ipfs = new IPFS("/ip4/127.0.0.1/tcp/5001");

I built a private network,
When establishing a connection, how to make a public gateway for the private network so that there is no single point of failure when accessing resources later.The above connection string specifies the public gateway for the private network. Not a connection to a particular node.
For example, like public network pain, https://ipfs.io/ipfs access resources.
Thanks.