1.使系统可写
mount -o remount -rw /
2.OpenWrt使用dropbear作为服务端,~/.ssh/authorized_keys并不生效。其实,dropbear的公钥存储文件是600权限的 /etc/dropbear/authorized_keys文件
3.golang 编译指令
GOOS=linux GOARM=5 GOARCH=arm CGO_ENABLED=0 go build xxx.go
4.查看当前所有监听端口
netstat -nlp |grep LISTEN
5.小米路由器R2D开机自启动
vi /etc/init.d/mystart
==========================
#!/bin/sh /etc/rc.common
START=99
start(){
/mnt/sda1/myapp
}
stop(){
/mnt/sda1/myapp -s
}
restart(){
/mnt/sda1/myapp
}
==========================
chmod -R 777 init.d/mystart #设置权限,否则无法激活开机启动,提示权限不足
/etc/init.d/mystart enable #激活开机启动
/etc/init.d/mystart start #运行start函数启动程序
doh-client 配置
vi ~/work/start-dohc.sh
sudo nohup ~/work/doh-client -conf=~/work/doh-client.conf > ~/work/dohc.log 2>&1 &
加入开机启动 /etc/init.d/mystart
指定特定端口的dns服务 查ip
dig www.baidu.com @127.0.0.1 -p 5353
nslookup www.facebook.com localhost:5380 //xiaomiR3G适用
下载证书
doh.dns.sb
openssl
s_client -showcerts -connect sni.cloudflaressl.com:443