Hello as you see in the example code below Smack is asking me for a service name and host. I'm using Ejabberd together with Linux and an EC2 instance. While checking XMPP client apps I have seen the option to create accounts with other XMPP providers. I'm afraid that when I release my app to the public, DNS of my EC2 instance will give people the power to create a crazy amount of accounts and not directly from my app but from anywhere. Should I use something like Firebase Functions? Or something similar? What's the best way to go around this? I just don't want the hostname to be public. Thank you!
XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration
.builder();
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
config.setServiceName(serverAddress);
config.setHost(serverAddress);
config.setPort(5222);
config.setResource(context.getResources().getString(R.string.resource_name));
config.setDebuggerEnabled(true);
config.setSendPresence(true);
XMPPTCPConnection.setUseStreamManagementResumptiodDefault(true);
XMPPTCPConnection.setUseStreamManagementDefault(true);
mConnection = new XMPPTCPConnection(config.build());
XMPPConnectionListener connectionListener = new XMPPConnectionListener(type);
mConnection.addConnectionListener(connectionListener);