mirror of
				https://github.com/kenzok8/openwrt-packages.git
				synced 2025-10-30 07:50:37 +08:00 
			
		
		
		
	update 2023-05-08 08:25:15
This commit is contained in:
		| @ -1,7 +1,7 @@ | ||||
| include $(TOPDIR)/rules.mk | ||||
|  | ||||
| PKG_NAME:=luci-app-serverchan | ||||
| PKG_VERSION:=2.07.0 | ||||
| PKG_VERSION:=2.07.1 | ||||
| PKG_RELEASE:=10 | ||||
|  | ||||
| PKG_MAINTAINER:=tty228 <tty228@yeah.net> | ||||
|  | ||||
| @ -1068,6 +1068,8 @@ EOF | ||||
|  | ||||
| # 登陆提醒通知 | ||||
| function login_send(){ | ||||
| 	[ -n "$port_knocking" ] && [ "$port_knocking" -eq "1" ] && init_ip_white "ipv4" | ||||
| 	[ -n "$port_knocking" ] && [ "$port_knocking" -eq "1" ] && init_ip_white "ipv6" | ||||
| 	[ -z "$web_logged" ] && [ -z "$ssh_logged" ] && [ -z "$web_login_failed" ] && [ -z "$ssh_login_failed" ] && return | ||||
| 	[ ! -f ${dir}login_monitor ] && return | ||||
| 	# 登录 | ||||
| @ -1221,7 +1223,7 @@ function init_ip_white() { | ||||
| 		if ( opkg list-installed|grep -w -q ^firewall4 ); then | ||||
| 			local count_accept_rules=`nft list ruleset | grep -c "tcp dport.* ${ip_port_white}.* $ip_version saddr @${ipset_name} counter packets .* accept comment \"!serverchan Accept rule\""` | ||||
| 			if [ $count_accept_rules -eq 0 ]; then | ||||
| 				nft insert rule inet fw4 input tcp dport { $ip_port_white } $ip_version saddr @$ipset_name counter accept comment "!serverchan Accept rule" >/dev/null 2>&1 | ||||
| 				nft insert rule inet fw4 input tcp dport { $ip_port_white } $ip_version saddr @$ipset_name counter accept comment \"!serverchan Accept rule\" >/dev/null 2>&1 | ||||
| 			elif [ $count_accept_rules -ne 1 ]; then | ||||
| 				local i=0 | ||||
| 				local handles=`nft --handle list ruleset | grep "!serverchan Accept rule" | grep -v "tcp dport.* ${ip_port_white}.* $ip_version saddr @${ipset_name} counter packets .* accept comment \"!serverchan Accept rule\"" | awk '{print $NF}'` | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png) github-actions[bot]
					github-actions[bot]