Skip to content

Instantly share code, notes, and snippets.

@metathrone
metathrone / readme.md
Created March 13, 2023 14:22 — forked from BlackHacked/readme.md
n1 docker openwrt

镜像构建

FROM scratch
ADD openwrtmix-n1-R20.2.15-rootfs.tar.gz /
RUN mkdir /var/lock
USER root
CMD /sbin/init

食用方法

@metathrone
metathrone / k3s-helm-install.sh
Created February 6, 2023 13:22 — forked from JasonkayZK/k3s-helm-install.sh
k3s-helm-install.sh
# Install K3S
curl -sfL https://get.k3s.io | sh -
# Copy k3s config
mkdir $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
sudo chmod 644 $HOME/.kube/config
# Check K3S
kubectl get pods -n kube-system
@metathrone
metathrone / wsl_clash_proxy.sh
Last active February 2, 2023 07:51 — forked from libChan/wsl_clash_proxy.sh
WSL2使用clash for windows代理
# WSL通过Win访问网络,所以WSL的网关指向的是Windows,DNS服务器指向的也是Windows,设置WSL的proxy为win的代理ip+端口即可
# WSL中的DNS server在/etc/resolv.conf中查看,该文件是由/etc/wsl.conf自动生成的。
# 如果关闭了wsl.conf中自动生成resolve.conf并自行修改了resolve.conf,DNS nameserver并不是本机win ip
# 需要开启wsl.conf的自动生成,再运行以下命令
# https://zhuanlan.zhihu.com/p/153124468
# 添加到环境变量设置中,例如~/.zshrc
export hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*')
export https_proxy="http://${hostip}:7890"
export http_proxy="http://${hostip}:7890"