Skip to content

Commit

Permalink
revert passwall status css
Browse files Browse the repository at this point in the history
  • Loading branch information
Lienol committed Oct 18, 2019
1 parent 0331bc2 commit 2529c97
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
10 changes: 4 additions & 6 deletions lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-%>

<style>
@media screen and (min-width: 1600px) {
/* @media screen and (min-width: 1600px) {
#_passwall_status_fieldset > fieldset {
padding: 0px;
}
Expand Down Expand Up @@ -51,7 +51,7 @@
display: block;
}
}

*/
</style>

<fieldset id="_passwall_status_fieldset" class="cbi-section">
Expand Down Expand Up @@ -137,8 +137,8 @@
</label>
<div class="cbi-value-field">
<input type="button" class="cbi-button cbi-input-apply" value="<%:Check%>" onclick="return check_port(this)" />


<font id="_server_status"></font>
<input id="clear_check_port_btn" type="button" class="cbi-button cbi-button-remove" style="display:none" value="<%:Clear%>" onclick="return clear_check_port(this)" />
</div>
</div>
<div class="cbi-value">
Expand All @@ -148,8 +148,6 @@
</div>
</div>
</fieldset>
<font id="_server_status"></font>
<input id="clear_check_port_btn" type="button" class="cbi-button cbi-button-remove" style="display:none" value="<%:Clear%>" onclick="return clear_check_port(this)" />
</fieldset>

<script type="text/javascript">
Expand Down
21 changes: 10 additions & 11 deletions lienol/luci-app-passwall/root/usr/share/passwall/iptables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,16 @@ EOF
fi
# 用于本机流量转发,默认只走router
#$iptables_nat -I OUTPUT -j SS
$iptables_nat -A OUTPUT -m set --match-set $IPSET_LANIPLIST dst -j RETURN
$iptables_nat -A OUTPUT -m set --match-set $IPSET_VPSIPLIST dst -j RETURN
$iptables_nat -A OUTPUT -m set --match-set $IPSET_WHITELIST dst -j RETURN
$iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m set --match-set $IPSET_ROUTER dst -j REDIRECT --to-ports $TCP_REDIR_PORT
$iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m set --match-set $IPSET_BLACKLIST dst -j REDIRECT --to-ports $TCP_REDIR_PORT
$iptables_nat -A OUTPUT -m set --match-set $IPSET_LANIPLIST dst -m comment --comment "PassWall" -j RETURN
$iptables_nat -A OUTPUT -m set --match-set $IPSET_VPSIPLIST dst -m comment --comment "PassWall" -j RETURN
$iptables_nat -A OUTPUT -m set --match-set $IPSET_WHITELIST dst -m comment --comment "PassWall" -j RETURN
$iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m set --match-set $IPSET_ROUTER dst -m comment --comment "PassWall" -j REDIRECT --to-ports $TCP_REDIR_PORT
$iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m set --match-set $IPSET_BLACKLIST dst -m comment --comment "PassWall" -j REDIRECT --to-ports $TCP_REDIR_PORT

[ "$LOCALHOST_PROXY_MODE" == "global" ] && $iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -j REDIRECT --to-ports $TCP_REDIR_PORT
[ "$LOCALHOST_PROXY_MODE" == "gfwlist" ] && $iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m set --match-set $IPSET_GFW dst -j REDIRECT --to-ports $TCP_REDIR_PORT
[ "$LOCALHOST_PROXY_MODE" == "global" ] && $iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m comment --comment "PassWall" -j REDIRECT --to-ports $TCP_REDIR_PORT
[ "$LOCALHOST_PROXY_MODE" == "gfwlist" ] && $iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m set --match-set $IPSET_GFW dst -m comment --comment "PassWall" -j REDIRECT --to-ports $TCP_REDIR_PORT
[ "$LOCALHOST_PROXY_MODE" == "chnroute" ] && {
$iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m set --match-set $IPSET_CHN dst -j RETURN
$iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -j REDIRECT --to-ports $TCP_REDIR_PORT
$iptables_nat -A OUTPUT -p tcp -m multiport --dport $TCP_REDIR_PORTS -m set ! --match-set $IPSET_CHN dst -m comment --comment "PassWall" -j REDIRECT --to-ports $TCP_REDIR_PORT
}
}
# 重定所有流量到透明代理端口
Expand Down Expand Up @@ -461,11 +460,11 @@ EOF

del_firewall_rule() {
echolog "删除所有防火墙规则..."
ipv4_output_exist=`$iptables_nat -L OUTPUT 2>/dev/null | grep -c -E "SS|$TCP_REDIR_PORTS|$IPSET_LANIPLIST|$IPSET_VPSIPLIST|$IPSET_WHITELIST|$IPSET_ROUTER|$IPSET_BLACKLIST|$IPSET_GFW|$IPSET_CHN"`
ipv4_output_exist=`$iptables_nat -L OUTPUT 2>/dev/null | grep -c -E "PassWall"`
[ -n "$ipv4_output_exist" ] && {
until [ "$ipv4_output_exist" = 0 ]
do
rules=`$iptables_nat -L OUTPUT --line-numbers | grep -E "SS|$TCP_REDIR_PORTS|$IPSET_LANIPLIST|$IPSET_VPSIPLIST|$IPSET_WHITELIST|$IPSET_ROUTER|$IPSET_BLACKLIST|$IPSET_GFW|$IPSET_CHN" | awk '{print $1}'`
rules=`$iptables_nat -L OUTPUT --line-numbers | grep -E "PassWall" | awk '{print $1}'`
for rule in $rules
do
$iptables_nat -D OUTPUT $rule 2> /dev/null
Expand Down

0 comments on commit 2529c97

Please sign in to comment.