Changeset 13133

Show
Ignore:
Timestamp:
10/22/09 03:00:19 (1 month ago)
Author:
BrainSlayer
Message:

wifidog authentication support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/router/kromo/dd-wrt/lang_pack/english.js

    r13080 r13133  
    773773hotspot.wifidog_authsrvpath="AuthServer Path"; 
    774774hotspot.wifidog_config="Firewall Ruleset"; 
     775hotspot.wifidog_messagefile="HTML Message File for Wifidog"; 
     776hotspot.wifidog_realm="HTTP Server Realm"; 
     777hotspot.wifidog_username="HTTP Server Username"; 
     778hotspot.wifidog_password="HTTP Server Password"; 
     779hotspot.wifidog_auth="HTTP Server Authentication Support"; 
    775780 
    776781var anchorfree = new Object(); 
  • src/router/services/services/wifidog.c

    r13131 r13133  
    6464                        fprintf(fp, "HtmlMessageFile %s\n", nvram_safe_get("wd_messagefile")); 
    6565                } 
     66                if (nvram_match("wd_auth","1")) 
     67                    { 
     68                        if (strlen(nvram_safe_get("wd_realm")) > 0)  
     69                        fprintf(fp, "HTTPDRealm %s\n", nvram_safe_get("wd_realm")); 
     70                        fprintf(fp, "HTTPDUserName %s\n", nvram_safe_get("wd_username")); 
     71                        fprintf(fp, "HTTPDPassword %s\n", nvram_safe_get("wd_password")); 
     72                    } 
    6673                fprintf(fp, "Path %s\n", nvram_safe_get("wd_path")); 
    6774                fprintf(fp, "}\n"); 
  • src/router/wifidog/config/2wifidog.webhotspot

    r13131 r13133  
    9696                        <input class="text" maxlength="100" size="39" name="wd_path" value="<% nvram_get("wd_path"); %>" /> 
    9797                </div> 
     98                <div class="setting"> 
     99                        <div class="label"><% tran("hotspot.wifidog_auth"); %></div> 
     100                        <input class="spaceradio" type="radio" name="wd_auth" value="1" <% nvram_checked("wd_auth","1"); %> onclick="show_layer_ext(this, 'idauth', true)" /><% tran("share.enable"); %>&nbsp; 
     101                        <input class="spaceradio" type="radio" name="wd_auth" value="0" <% nvram_checked("wd_auth","0"); %> onclick="show_layer_ext(this, 'idauth', false)" /><% tran("share.disable"); %>  
     102                        <div id="idauth"> 
     103                                <div class="setting"> 
     104                                <div class="label"><% tran("hotspot.wifidog_realm"); %></div> 
     105                                <input name="wd_realm" size="40" maxlength="63" onblur="valid_name(this,share.usrname)" value="<% nvram_get("wd_realm"); %>" /> 
     106                                <div class="label"><% tran("hotspot.wifidog_username"); %></div> 
     107                                <input name="wd_username" size="40" maxlength="63" onblur="valid_name(this,share.usrname)" value="<% nvram_get("wd_username"); %>" /> 
     108                                <div class="label"><% tran("hotspot.wifidog_password"); %></div> 
     109                                <input name="wd_password" size="40" maxlength="63" onblur="valid_name(this,share.passwd)" type="password" value="<% nvram_get("wd_password"); %>" /> 
     110                                <input type="checkbox" name="_wd_password_unmask" value="0" onclick="setElementMask('wd_password', this.checked)" >&nbsp;<% tran("share.unmask"); %></input> 
     111                        </div> 
     112                </div> 
     113        </div> 
     114<script> 
     115//<![CDATA 
     116        show_layer_ext(document.setup.wd_auth, 'idauth', <% nvram_else_match("wd_auth", "1", "1", "0"); %> == 1); 
     117//]]> 
    98118                <div class="setting">    
    99119                        <div class="label"><% tran("hotspot.wifidog_messagefile"); %></div> 
  • src/router/wifidog/config/wifidog.nvramconfig

    r13131 r13133  
    1313"wd_path" "Authserver path" "NULL" "TRUE" "0" 
    1414"wd_messagefile" "Wifidog Messagefile" "NULL" "TRUE" "0" 
    15 "wd_config" "additional config" NULL" "TRUE" "0" 
     15"wd_config" "additional config" "NULL" "TRUE" "0" 
     16"wd_auth" "authentication" "CHOICE" "2" "0" "1" "FALSE" "0" 
     17"wd_realm" "http username" "NULL" "TRUE" "0" 
     18"wd_username" "http username" "NULL" "TRUE" "0" 
     19"wd_password" "http password" "PASSWORD2" "63" "TRUE" "0"