Bind android listener to localhost


#1

Is there a way to prevent non-localhost access to the android listener (LiteServer) process?

Does this do the job:

Properties props = new Properties();
props.put(Serve.ARG_BINDADDRESS, "localhost");
return new LiteListener(manager, port, creds, props)

#2

My understanding is that on Android the listener is only accessible over localhost. Other apps than the one running the listener may access localhost and that’s why we recommend to use basic authentication to protect access to it. I’ve not tried using the ARG_BINDADDRESS property on LiteServ before.

Which host other than localhost does the listener bind to by default then?
Can you give a bit more detail about the context in which you would like to do this? Is it for debugging, p2p?

James


#3

Sorry, not sure I phrased my question correctly. I’m trying to prevent access to the listener from anywhere other than localhost. And it looks like my suggestion above has worked.


#4

Ok good to know!

James