lWS icon indicating copy to clipboard operation
lWS copied to clipboard

Server on tethering working only with cellular connection.

Open Sooyka opened this issue 6 years ago • 4 comments

When I start server after enabling tethering with cellural connection off it gives these messeges immediatly after starting:

I: Web server address http://192.168.43.1:8080 I: Web server stopped because WiFi disconnected. I: Socket closed

When I do the same thing with cellular connection on it is working correctly.

I am using the version that is the latest currently available on F-droid (7.00.00).

Sooyka avatar Nov 19 '19 14:11 Sooyka

Thank you for bug report. I can reproduce it also. I will do my best to fix it.

mvbasov avatar Nov 21 '19 17:11 mvbasov

I am very interested in this use case also, i.e. personal hotspot on Android device with no WiFi or cellular connection whatsoever, and lWS as web server accessible via the personal hotspot.

This is a crucial scenario to support IMHO.

Is there a chance this will be fixed?

cloudspeech avatar Sep 07 '23 10:09 cloudspeech

It seems https://github.com/bodeme/androidwebserver/blob/a35c179e31c68afc3712b8ff3aa57fe0f9d7987b/app/src/main/java/net/basov/lws/ServerService.java#L101 is the culprit.

If we would conditionalize stopping the server with a flag toggled by a checkbox 'Keep server running when offline', the behaviour desired in this issue could be achieved in a settable fashion.

@mvbasov Is this analysis correct, or is there more to it?

cloudspeech avatar Sep 07 '23 10:09 cloudspeech

The main reason is protect from start connection on home network and move to public network. The web server has no any security.

mvbasov avatar Nov 01 '23 22:11 mvbasov