Skip to content

Commit

Permalink
Merge pull request #12 from Paull/DropOTA
Browse files Browse the repository at this point in the history
丢弃一次性验证功能
  • Loading branch information
Paull authored Nov 9, 2017
2 parents b09de1e + 7f21430 commit ffab6e5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 37 deletions.
2 changes: 0 additions & 2 deletions hiwifi/etc/init.d/easucks
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ss_get_config() {
ss_server_meth=$(uci get $NAME.$ss_server_choice.ss_server_meth)
ss_runnin_mode=$(uci get $NAME.$ss_server_choice.ss_runnin_mode)
ss_remote_dnss=$(uci get $NAME.$ss_server_choice.ss_remote_dnss)
ss_server_auth=$(uci get $NAME.$ss_server_choice.ss_server_auth)
ss_server_fsop=$(uci get $NAME.$ss_server_choice.ss_server_fsop)
ss_local_port=$(uci get $NAME.$ss_server_choice.ss_local_port)
}
Expand All @@ -36,7 +35,6 @@ ss_create_config_file(){
"password": "$ss_server_pass",
"method": "$ss_server_meth",
"timeout": 60,
"auth": $ss_server_auth,
"fast_open": $ss_server_fsop,
"mode": "tcp_only"
}
Expand Down
9 changes: 0 additions & 9 deletions hiwifi/usr/lib/lua/luci/view/admin_web/easucks/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@ <h2 class="J_view_right" style="visibility: hidden;"><%=i18n.translate("web_rout
<a href="javascript:;" class="G-switch-btn off btn" id="ss_auto_start"><span></span></a>
</td>
</tr>
<tr>
<th>一次性验证</th>
<td style="padding-top:10px;">
<input type="hidden" name="ss_server_auth" value="false" />
<a href="javascript:;" class="G-switch-btn off" id="ss_server_auth"><span></span></a>
<span class="icon icon22 J_Tip G-handle" style="width: 14px; height: 14px; display: inline-block; vertical-align: middle; margin-left: 5px;"></span>
</td>
</tr>
<tr style="display: none;">
<th>fastopen</th>
<td style="padding-top:10px;">
Expand Down Expand Up @@ -297,7 +289,6 @@ <h2 class="J_view_right" style="visibility: hidden;"><%=i18n.translate("web_rout
</div>
</div>
</div>
<div class="G-tip-pop J_ss_auth_tip_text" style="width: 170px; height: 16px; display: none">需与服务器设定一致,默认关闭</div>
<div class="G-tip-pop J_ss_fsop_tip_text" style="width: 170px; height: 16px; display: none">ss-redir不支持该功能</div>
<% include('admin_web/footer') %>
<!-- 通用模块的专属js -->
Expand Down
4 changes: 1 addition & 3 deletions hiwifi/usr/lib/lua/luci/view/admin_web/easucks/ss.htm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
local ss_server_port = luci.http.formvalue('ss_server_port')
local ss_server_pass = luci.http.formvalue('ss_server_pass')
local ss_server_meth = luci.http.formvalue('ss_server_meth')
local ss_server_auth = luci.http.formvalue('ss_server_auth')
local ss_server_fsop = luci.http.formvalue('ss_server_fsop')
local ss_runnin_mode = luci.http.formvalue('ss_runnin_mode')
local ss_remote_dnss = luci.http.formvalue('ss_remote_dnss')
Expand All @@ -44,7 +43,7 @@
ss_server_choice = luci.sys.exec("uci -q get easucks.ss_server_choice")
end
if ss_server_choice == '' then
json = '{"ss_servers": {"server1": "服务器1"}, "ss_server_choice": "server1", "ss_server_name": "服务器1", "ss_server_fsop": "false", "ss_server_meth": "rc4-md5", "ss_server_port": "1717", "ss_local_port": "61717", "ss_remote_dnss": "8.8.4.4", "ss_server_pass": "easucks", "ss_server_auth": "false", "ss_server_ipad": "xxx.xxx.xxx.xxx", "ss_runnin_mode": "gfwlist"}'
json = '{"ss_servers": {"server1": "服务器1"}, "ss_server_choice": "server1", "ss_server_name": "服务器1", "ss_server_fsop": "false", "ss_server_meth": "rc4-md5", "ss_server_port": "1717", "ss_local_port": "61717", "ss_remote_dnss": "8.8.4.4", "ss_server_pass": "easucks", "ss_server_ipad": "xxx.xxx.xxx.xxx", "ss_runnin_mode": "gfwlist"}'
else
ss_server_choice = string.gsub(ss_server_choice, '\n', '')
local ss_servers = luci.sys.exec("uci show easucks | sed 's/easucks\\.//g' | egrep 'ss_server_name|node' | sed 's/.ss_server_name//g' | awk -F= '{servers[$1]=$2}END{print \"{\"; for(i in servers){if(servers[i]==\"node\") print \"\\42\"i\"\\42: \\42\"i\"\\42,\"; else print \"\\42\"i\"\\42: \\42\"servers[i]\"\\42,\";} print \"}\"}' | tr '\\n' ' ' | sed 's/, ]/ ]/'")
Expand All @@ -62,7 +61,6 @@
luci.sys.exec('uci set easucks.'..ss_server_choice..'.ss_server_port='..ss_server_port..';')
luci.sys.exec('uci set easucks.'..ss_server_choice..'.ss_server_pass='..ss_server_pass..';')
luci.sys.exec('uci set easucks.'..ss_server_choice..'.ss_server_meth='..ss_server_meth..';')
luci.sys.exec('uci set easucks.'..ss_server_choice..'.ss_server_auth='..ss_server_auth..';')
luci.sys.exec('uci set easucks.'..ss_server_choice..'.ss_server_fsop='..ss_server_fsop..';')
luci.sys.exec('uci set easucks.'..ss_server_choice..'.ss_runnin_mode='..ss_runnin_mode..';')
luci.sys.exec('uci set easucks.'..ss_server_choice..'.ss_remote_dnss='..ss_remote_dnss..';')
Expand Down
24 changes: 1 addition & 23 deletions hiwifi/www/turbo-static/turbo/v2/js/admin_web/easucks.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,6 @@ $(function () {
$('#ss_runnin_mode').val(data['ss_runnin_mode']);
$('#ss_remote_dnss').val(data['ss_remote_dnss'] ? data['ss_remote_dnss'] : '8.8.4.4');
$('#ss_local_port').val(data['ss_local_port'] ? data['ss_local_port'] : '61717');
if (data['ss_server_auth'] == "true") {
$('#ss_server_auth').siblings("input").val("true");
$('#ss_server_auth').removeClass("off").addClass("on");
}else{
$('#ss_server_auth').siblings("input").val("false");
$('#ss_server_auth').removeClass("on").addClass("off");
}
if (data['ss_server_fsop'] == "true") {
$('#ss_server_fsop').siblings("input").val("true");
$('#ss_server_fsop').removeClass("off").addClass("on");
Expand Down Expand Up @@ -549,7 +542,7 @@ $(function () {
});

//一次性验证和fastopen选项的按钮
$("#ss_server_auth, #ss_server_fsop").click(function (e) {
$("#ss_server_fsop").click(function (e) {
var $bt = $(this);
var $input = $bt.siblings('input');
if ($bt.hasClass("on")) {
Expand All @@ -561,20 +554,6 @@ $(function () {
}
});

//一次性验证开关的提示
$("#ss_server_auth").next('span.J_Tip').hover(function () {
var $tipPop = $('.J_ss_auth_tip_text');
var $this = $(this),
l = $this.offset().left - 15,
t = $this.offset().top + 20;
$tipPop.css({
'left': l + 'px',
'top': t + 'px'
}).show();
}, function () {
$('.J_ss_auth_tip_text').hide();
});

//FASTOPEN开关的提示
$("#ss_server_fsop").next('span.J_Tip').hover(function () {
var $tipPop = $('.J_ss_fsop_tip_text');
Expand Down Expand Up @@ -677,7 +656,6 @@ $(function () {
$('#ss_server_pass').val('easucks');
$('#ss_server_meth').val('rc4-md5');
$('#ss_runnin_mode').val('gfwlist');
$('#ss_server_auth').val('false');
$('#ss_server_fsop').val('false');
$('#ss_remote_dnss').val('8.8.4.4');
$('#ss_local_port').val('61717');
Expand Down

0 comments on commit ffab6e5

Please sign in to comment.