博文

根据操作系统架构, 取最新版本Go编译环境, 编译NaïveProxy的Caddy

图片
一键执行 bash <(curl -L https://github.com/crazypeace/naive/raw/main/buildcaddy.sh) 作为我的NaiveProxy一键脚本的一部分,如果系统环境不能直接使用NaïveProxy作者编译出来的Caddy,那就自己编译一份吧。 参考 Go 官方安装过程 https://go.dev/doc/install NaïveProxy 官方编译流程 https://github.com/klzgrad/naiveproxy 其它脚本中的代码 https://github.com/shell-script/naivecaddy/blob/master/naivecaddy.sh https://lhy.life/20211218-naiveproxy/ https://github.com/233boy/v2ray/blob/master/install.sh

Shell在ping的结果中grep过滤IP地址 IPv4 IPv6

图片
IPv4的正则表达式 [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} 获得IPv4地址 ping 域名 - 4  -c 1 -W 2   | head -1 | grep -oP ' [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ' | head -1  各个命令的意义就不啰嗦了,都可以查得到。 先说说 head -1 相当于 head -n 1 再说说为什么最后还要有个 head -1  因为如果结果是下面这样的话,grep -o 会得到2条结果 IPv6的正则表达式 ((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\

自定义端口NaiveProxy与Caddy V2前置的VLESS/Vmess V2Ray共存 可开CDN

图片
* 推荐使用 Xshell 的撰写窗格,这样多行命令可以写到撰写窗格里面执行。 1. 极简一键脚本搭 Caddy V2 前置的VLESS或Vmess+WebSocket+TLS   设置好域名解析, 如 vless.mydomain.com , CDN关掉 bash <(curl -L https://github.com/crazypeace/v2ray_wss/raw/main/install.sh) 搭完自己检查一下是否能正常使用 CDN可以开 2. 搭建NaiveProxy 2.1 设置域名解析, 如 np.mydomain.com , CDN关掉 -update- 所有以下这些步骤,我做成了一个一键脚本。执行这个脚本,以下步骤都不用手搓了。 bash <(curl -L https://github.com/crazypeace/naive/raw/main/install.sh) 2.2 用Caddy官方脚本安装Caddy 来源: https://caddyserver.com/docs/install#debian-ubuntu-raspbian sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list sudo apt update sudo apt install caddy 2.3 下载NaiveProxy作者编译的caddy https://github.com/klzgrad/forwardproxy/releases 找最新的版本 cd /tmp wget https://

The Hot3 in Last 30 Days

无服务器 自建短链服务 Url-Shorten-Worker 完整的部署教程

ClouDNS .asia免费域名 托管到CloudFlare开CDN白嫖Websocket WS通道翻墙 / desec.io