Android app not connecting since SSL

I have configured Nginx on Beryl AX to forward port 80 to 443 so only HTTPS access is available to the web interface. This is probably the reason why the Android app doesn’t connect to the router anymore.
I am not familiar with how it works, but I guess it uses some API on HTTP, which could be using HTTPS by default since that is available out of the box. Not a big deal, I can live without the app, just a suggestion.

Alternatively is there maybe a detailed config for Nginx that forwards the web access, but leave the API alone on 80?


1 Like

What is the firmware version of your router?
Some features of version 4.1 still have problems adapting to the https api, e.g. tor. Therefore the app uses the http interface. If you upgrade the firmware to version 4.2, the app should use https.

You can modify /etc/nginx/conf.d/gl.conf to modify the port settings of nginx.

I am using firmware 4.2 and I did modify /etc/nginx/conf.d/gl.conf, since then the app does not connect.

Do you want to use https on port 80? That is not supported by the app at the moment.
In a later firmware release we will provide the ability to change the access port so that the app can use https on any port.

I don’t want to use port 80, I redirected port 80 to 443 like this:

server {
   listen 80 default_server;
   server_name _;
   return 301 https://$host$request_uri;

Works great on web, but the app does not connect.

The mobile app doesn’t work when I’m in the guest Wi-Fi. Is that expected? @Leo

That makes sense, I wouldn’t expect a “guest” device to have access to an admin app. A guest doesn’t have access to anything on the local lan.

1 Like

@yuxin.zou ,

I found that app shows me all the logs and contrary to your statement it is not even trying to communicate over https:

2023-03-08 10:46:16.582732
*** Request ***

2023-03-08 10:46:16.582946
*** Request ***


2023-03-08 10:46:16.787424
*** DioError ***:
DioError [DioErrorType.response]: Http status error [301]
Request Data: {"jsonrpc":"2.0","method":"call","params":["","ui","check_initialized",{}],"id":1}
Response Text:
<head><title>301 Moved Permanently</title></head>
<center><h1>301 Moved Permanently</h1></center>

2023-03-08 10:46:16.787624
2023-03-08 10:46:17.025148
*** DioError ***:
DioError [DioErrorType.other]: HandshakeException: Handshake error in client (OS Error: 
	CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(

2023-03-08 10:46:17.027128
*** Request ***
1 Like

check_initialized API used get firmware version. So it is need use http.
We will discuss it when we provide the ability to change the access port.