Skip to content

Commit

Permalink
Resolve merge conflict 1.12..n3vu0r/fix-router-access-page
Browse files Browse the repository at this point in the history
  • Loading branch information
lantis1008 committed Mar 1, 2020
2 parents 3b42e23 + fe464aa commit e6715e9
Show file tree
Hide file tree
Showing 16 changed files with 452 additions and 139 deletions.
44 changes: 37 additions & 7 deletions package/gargoyle/files/www/access.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
if [ -e /etc/dropbear/authorized_keys ] ; then
cat /etc/dropbear/authorized_keys | awk -F' ' ' $0 ~ /./ {print "authorizedKeyMap[\""$NF"\"]=\""$0"\";"}'
fi

echo "const REMOTE_ADDR = \"$REMOTE_ADDR\";";
echo "const SERVER_ADDR = \"$SERVER_ADDR\";";

echo "const HTTPS = \"$HTTPS\";";
echo "const HTTP_HOST = \"$HTTP_HOST\";";
echo "const SERVER_PORT = \"$SERVER_PORT\";";
%>
//-->
</script>
Expand Down Expand Up @@ -66,12 +73,16 @@
<label class="col-xs-5" id="local_web_protocol_label" for="local_web_protocol"><%~ WebProtocol %>:</label>
<span class="col-xs-7">
<select class="form-control" id="local_web_protocol" onchange="updateVisibility()">
<option value="https">HTTPS</option>
<option value="http">HTTP</option>
<option value="both">HTTP & HTTPS</option>
<option value="redirect">HTTP ➔ HTTPS</option>
<option value="https">HTTPS</option>
</select>
</span>
</div>

<div id="local_web_protocol_lockout_container" class="row form-group" style="display: none"></div>

<div>
<div id="local_http_port_container" class="row form-group">
<label class="col-xs-5" for="local_http_port" id="local_http_port_label"><%~ LocalPort %>:</label>
Expand All @@ -80,22 +91,27 @@

<div id="local_https_port_container" class="row form-group">
<label class="col-xs-5" for="local_https_port" id="local_https_port_label"><%~ Local_S_Port %>:</label>
<span class="col-xs-7"><input type="text" class="form-control" id="local_https_port" size="7" maxlength="5" oninput="proofreadNumericRange(this,1,65535)"/></span>
<span class="col-xs-7"><input type="text" class="form-control" id="local_https_port" size="7" maxlength="5" onkeyup="proofreadNumericRange(this,1,65535); updateReadOnlyAssociate('remote_https_port', this)"/></span>
</div>
</div>

<div style="display: block;" id="remote_web_divider" class="internal_divider"></div>

<div id="remote_web_protocol_container" class="row form-group">
<label class="col-xs-5" id="remote_web_protocol_label" for="remote_web_protocol"><%~ RemoteWebAccess %>:</label>
<span class="col-xs-7">
<select class="form-control" id="remote_web_protocol" onchange="updateVisibility()">
<option value="disabled"><%~ disabled %></option>
<option value="https">HTTPS</option>
<option value="http">HTTP</option>
<option value="both">HTTP & HTTPS</option>
<option value="redirect">HTTP ➔ HTTPS</option>
<option value="https">HTTPS</option>
<option value="disabled"><%~ disabled %></option>
</select>
</span>
</div>

<div id="remote_web_protocol_lockout_container" class="row form-group" style="display: none"></div>

<div id="remote_web_ports_container">
<div id="remote_http_port_container" class="row form-group">
<label class="col-xs-5" for="remote_http_port" id="remote_http_port_label"><%~ RemotePort %>:</label>
Expand All @@ -108,6 +124,17 @@
</div>
</div>

<div id="disable_rfc1918_filter_container" class="row form-group">
<span class="col-xs-12">
<input type="checkbox" id="disable_rfc1918_filter" onclick="updateVisibility()"/>
<label id="disable_rfc1918_filter_label" for="disable_rfc1918_filter"><%~ DisableRFC1918Filter %> <em>(<%~ warning %>)</em></label>
</span>
</div>

<div id="rfc1918_filter_lockout_container" class="row form-group" style="display: none"></div>

<div style="display: block;" id="common_web_divider" class="internal_divider"></div>

<div id="session_length_container" class="row form-group">
<label class="col-xs-5" id="session_length_label" for="session_length"><%~ Session %>:</label>
<span class="col-xs-7">
Expand Down Expand Up @@ -145,6 +172,8 @@
<span class="col-xs-7"><input type="text" class="form-control" id="local_ssh_port" size="7" maxlength="5" oninput="proofreadNumericRange(this,1,65535)"/></span>
</div>

<div style="display: block;" id="remote_ssh_divider" class="internal_divider"></div>

<div class="row form-group" id="remote_ssh_enabled_container">
<span class="col-xs-12">
<input type="checkbox" id="remote_ssh_enabled" onclick="updateVisibility()"/>
Expand All @@ -171,15 +200,16 @@
</span>
</div>

<div style="display: block;" id="internal_divider1" class="internal_divider"></div>
<div style="display: block;" id="ssh_pwd_auth_divider" class="internal_divider"></div>

<div class="row form-group" id="pwd_enabled_container">
<span class="col-xs-12">
<input type="checkbox" id="pwd_auth_enabled" />
<label id="pwd_auth_label" for="pwd_auth_enabled"><%~ SSHEnablePwd %></label>
</span>
</div>

<div style="display: block;" id="internal_divider2" class="internal_divider"></div>
<div style="display: block;" id="ssh_key_auth_divider" class="internal_divider"></div>

<div class="row form-group" id="authorized_keys_container">
<label class="col-xs-5" for="add_key" id="add_key_label"><%~ SSHExistKey %>:</label>
Expand All @@ -199,6 +229,7 @@
<label id="authorized_keys_label" class="col-xs-5" for="authorized_keys_table_container"><%~ SSHKeys %>:</label>
<div id="authorized_keys_table_container" class="col-xs-7 table-responsive"></div>
<div id="ssh_help">
<span class="col-xs-12"><a id="ssh_help_ref" href="javascript:setDescriptionVisibility('ssh_help')"><%~ MoreInfo %></a></span>
<span class="col-xs-12" id="ssh_help_txt" style="display:none">
<p><%~ SSHHelp1 %></p>
<p><%~ SSHHelp2 %></p>
Expand All @@ -209,7 +240,6 @@
</ul>
<p><%~ SSHHelp4 %></p>
</span>
<span class="col-xs-12"><a onclick="setDescriptionVisibility('ssh_help')" id="ssh_help_ref" href="#ssh_help"><%~ MoreInfo %></a></span>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit e6715e9

Please sign in to comment.