shadowsocks-libev + privoxy 实现的 http 代理镜像

Introduction

shadowsocks-libev配合privoxy实现的http代理,仅暴露出要使用的http端口给宿主机及内网中的其他设备使用,如:container1使用专线代理,container2使用免费代理
配合nginx可以实现负载均衡(推荐使用nginx-alpine镜像,官方已集成四层转发需要的stream相关模块)

Read more
cloudflare dns管理脚本

Introduction

一个简单、方便的Cloudflare DNS管理脚本
基于 Cloudflare API 实现对DNS记录的增删改查,配合crontab也可以当DDNS用
对DNS记录的修改保存至文件,默认日志文件路径:/var/log/cloudflare_dns.log

Read more
使用docker部署oci-cli(oracle cloud)

利用docker挂载不同账号的认证文件到容器中,可实现多账号管理,先在dockerhub试用了star最多的镜像,但其1GB的占用太大了,还是自己动手整一个吧。

Dockerhub 链接

qwinwin/oci-cli
默认TAG基于 python:3-slim-buster,镜像总大小294MB
docker image ls

Read more
${} in shell

Introduction

${} (parameter substitution) is a useful way to manipulate strings in shell

it can print out the length of a string, just like len() function in python

1
2
3
string="hello"
echo ${#string}
→ 5

More:

  • # : Delete the left part
  • % : Delete the right part
  • Single symbol means minimum matching
  • Double symbol means maxmun matching
Read more
sed

Introduction

regex in sed
\1 \2 matchs the 1st and 2nd ()
( ) should be transferd by \

More:

Read more