发布于2020的文章

Mar 05

本脚本适用于 DD-WRT 和 Tomato,来源于: https://git.losert.xyz/krypton/Scripts/tree/master

适用于 LEDE/OpenWRT 的脚本在: https://gist.github.com/lg/e91d1c5c9640d963e13dbb1901bb4396

#!/bin/sh

##############################################
# This script disconnects connected clients, #
# where the signal is below the configured   #
# signal.                                    #
##############################################
# v1.0                                       #
# maintained by Rene Losert  #
##############################################
DEV=$(nvram show 2>&1 |grep ifname|grep 'wl[01]'|cut -d"=" -f2)
SIGNAL="-80"
EXCLUDE="38:D5:47:62:F8:7A"
key="$1"

if [[ "$key" == "-d" ]]; then
	echo "Signal Threshold: $SIGNAL"
	echo "Connected Clients:"
fi

while true; do

date=$(date +"%a %b %e %H:%M:%S %Z %Y")

for current in $DEV; do
CLIENTS=$(/usr/sbin/wl -a $current assoclist)
	for MAC in $CLIENTS; do    # for loop for each client (MAC)
		if [ $MAC != "assoclist" ]; then
			SIG=$(/usr/sbin/wl -a $current rssi $MAC)
			if [[ "$key" == "-d" ]]; then echo "MAC: $MAC, Signal: $SIG"; fi
			if [[ ! "$MAC" = "$EXCLUDE" ]]; then
				if [ $SIG -lt $SIGNAL ]; then
					if [[ "$key" == "-d" ]]; then echo "$date: BELOW! Sending deauth to $MAC"; fi
					echo "$date: BELOW! Sending deauth to $MAC" >> /tmp/cleanup.log
					/usr/sbin/wl -a $current deauthenticate $MAC
				fi
			fi

		fi
	done
done

if [[ "$key" == "-d" ]]; then echo "-----------------------------------"; fi
#echo $date >> /tmp/cleanup.log
sleep 5
done

:!: :!: :!:


Mar 03

ProxyChain

这几个工具都支持带用户名密码认证的上级代理,代理可以是 socks4/5,http-connect 等,glider 和 gost 还额外支持 ss,ssr 作为上级代理,但是对用户名密码或者附加参数中带‘@’号处理有些问题。

还需要注意,代理链中的第二级代理(最后一级?),‘必须’要具有外网 IP ,不然很容易失败。(这也是为什么要求支持用户名密码认证)

范例:
本地代理监听 0.0.0.0:7777 端口,上级两个代理级联(代理链),第一代理为: 192.168.2.20:7575 ,第二代理为:1.1.1.1:10086 (用户名 user , 密码 passwd)

gost:(https://github.com/ginuerzh/gost)

gost -L=:7777 -F=socks5://192.168.2.20:7575 -F=socks5://user:passwd@1.1.1.1:10086 -D

glider: (https://github.com/nadoo/glider)

glider -listen 0.0.0.0:7777 -forward socks5://192.168.2.20:7575,socks5://user:passwd@1.1.1.1:10086 -verbose

proxychains+microsocks (https://github.com/rofl0r/proxychains-ng, https://github.com/rofl0r/microsocks)

proxychains 配置文件:
strict_chain
proxy_dns
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
[ProxyList]
socks5 192.168.2.20 7575
socks5 1.1.1.1 10086 user passwd

命令行:
proxychains4 microsocks -p 7777

访问流程:
客户端请求-->SOCKS5:7777-->SOCKS5:192.168.2.20:7575-->SOCKS5:1.1.1.1:10086-->远程服务

gost 启动很慢,内存占用极高,glider 比较均衡,这两个都是 golang 编写的;proxychains+microsocks 是 C 写的,占用最小,适合配置不高的设备,但是需要自己编译,配置稍显麻烦。


Feb 11

Upcycle Windows 7 petition image

Microsoft's support of Windows 7 is over, but its life doesn't have to end. We call on Microsoft to upcycle it instead.


Jan 01

为了体验 BBRPlus,然后,就,崩了。。。丢了几篇文章貌似。。。

重装 Debian (以前是 Ubuntu),居然可以了~

:evil: :evil: :evil:

Tags: