redirectURL на nodogsplash не работает на мобильной заставке

У меня есть версия nodogsplash 0.9_beta9.9.9, установленная на устройстве OpenWRT 15.05.01, и они хорошо работают, когда я использую браузер (mozzila, chrome) для доступа к порталу авторизации, и после нажатия «Продолжить» они перенаправляют меня на предварительное страница настроек.

Это мой код:

    `<!DOCTYPE html>
<html>
<head>
<!--
A client is authenticated by requesting the page $authtarget.
        So, href to it here, with an img or link text the user can click on
        Alternatively submit an HTTP form method=get, passing $authaction,
        Also, note that any images you reference must reside in the
        subdirectory that is the value of $imagesdir (default: "images").
Available variables:
        error_msg: $error_msg
        gatewayname: $gatewayname
        tok: $tok
        redir: $redir
        authaction: $authaction
        denyaction: $denyaction
        authtarget: $authtarget
        clientip: $clientip
        clientmac: $clientmac
        gatewaymac: $gatewaymac
        nclients: $nclients
        maxclients: $maxclients
        uptime: $uptime
        imagesdir: $imagesdir
        pagesdir: $pagesdir
Additional Variables that can also be passed back via HTTP get.
Or just append them to the authentication link:
        nodoguser
        nodogpass
        info
        voucher
-->

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalida
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='shortcut icon' href='$imagesdir/splash.jpg' type='image/x-icon' 
<title>$gatewayname Entry</title>                                          

<style>                                                                    
body                                                                       
{                                                                          
background-color:lightgrey;                                                
color:black;                                                               
margin-left: 5%;                                                           
margin-right: 5%;                                                          
text-align: left;                                                          
}                                                                          
img                                                                        
{                                                                          
width: 40%;                                                                
max-width: 180px;                                                          
margin-left: 0%;                                                           
margin-right: 5%;                                                          
}                                                                          
input[type=submit]                                                         
{                                                                          
color:black;                                                               
margin-left: 0%;                                                           
margin-right: 5%;                                                          
text-align:left;                                                           
font-size: 1.0em;                                                          
line-height: 2.5em;                                                        
font-weight: bold;                                                         
border: 1px solid;                                                         
}                                                                          
</style>                                                                   
</head>                                                                    

<body>                                                                    
<b>Funz Hotspot Gateway.</b>                                        
<br>                                                                                                                                        
<br>                                                                       
<b>                                                                        
<img src="$imagesdir/splash.jpg" alt="Splash Page:For access to the Interne
<hr>                                                                       
<span style="color:red; font-style:normal;">                               
Bem Vindo!                                                                 
</span>                                                                    
</b>                                                                       
<hr>                                                                       
<br>                                                                       
<b>Por favor, para acessar a internet clique em continuar.</b>             
<br>                                                                       
<br>                                                                       
<hr>                                                                       

<form method='get' action='$authaction' target='_blank'>                   
<input type='hidden' name='tok' value='$tok'>                              
<input type='hidden' name='redir' value='http://webapp.funz.com.br'>

<input type='submit' value='Continue'>                                     

</form>                                                                    

<hr>Copyright (C) 2004-2016.  This software is released under the GNU GPL l

</body>                                                                    
</html>   

       `

Но настоящая проблема заключается в том, что когда я нажимаю, чтобы отправить форму (см. Ниже) на мобильном устройстве, и «всплывающее окно» для входа в систему мгновенно закрывается, и я не перенаправляюсь на настройку URL-адреса. Но когда я использую браузер на устройстве Android, хорошо перенаправить на URL-адрес настройки.

<form method='get' action='$authaction' target='_blank'>                   
<input type='hidden' name='tok' value='$tok'>                              
<input type='hidden' name='redir' value="http://webapp.funz.com.br">

<input type='submit' value='Continue'>                                     

</form>

У кого-то была идея решить эту проблему с помощью перенаправления на URL-адрес с порталом захвата nodogsplash на мобильных устройствах. Спасибо До сих пор.


person Iago Nicolai Beraldo Dalsenter    schedule 16.04.2018    source источник


Ответы (1)


Это стандартное поведение помощника по сети Android. Он очень специфичен в отношении своей функциональности, и одна из особенностей заключается в том, что когда он, наконец, обнаруживает, что подключился к Интернету, он немедленно закрывается. Однако этого не происходит на устройствах iOS и старых Android.

Возможно, вы захотите попробовать отправить форму с помощью ajax и перенаправить вручную, таким образом, я думаю, что мне удалось дольше удерживать страницу, но теперь я не уверен, почему я отказался от этого решения. Возможно из-за некорректного поведения на других устройствах.

person PKali    schedule 28.03.2019