mvbasov / lWS

lightweight Web Server (lWS) for Android
GNU General Public License v3.0
75 stars 19 forks source link

Server on tethering working only with cellular connection. #6

Open Sooyka opened 4 years ago

Sooyka commented 4 years ago

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).

mvbasov commented 4 years ago

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

cloudspeech commented 11 months ago

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 commented 11 months ago

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?

mvbasov commented 10 months ago

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