官方原版 19.07 + luci-app-ssr-plus, 选 ssr-plus 透明代理简单
编译在全局翻墙环境下进行,或者在海外高配 VPS 上
编译环境配置
sudo apt install build-essential libncursesw5-dev python unzip #ubuntu 18.04 or later
git clone https://github.com/coolsnowwolf/lede.git
git clone https://github.com/openwrt/openwrt.git
cd openwrt && git checkout openwrt-19.07
cp ../lede/package/lean/ package/ -R
./scripts/feeds update -a && ./scripts/feeds install -a
只编译 k3
sed -i 's|^TARGET_|# TARGET_|g; s|# TARGET_DEVICES += phicomm-k3|TARGET_DEVICES += phicomm-k3|' target/linux/bcm53xx/image/Makefile
编译配置
make menuconfig
Target 选 Broadcom BCM47xx/53xx (ARM)
Target Profile 选 PHICOMM K3
luCI–>Applictions–>luci-app-ssr-plus
检查配置 预先下载 (可选)
make defconfig
make download
开始编译, 8=线程数,V=99 生成固件并显示每一步及正确性,V=s:生成固件忽略不影响固件主功能的错误
make -j8 V=99
编译完成后固件输出在 openwrt/bin/targets
刷机,上传到路由 /tmp
mtd -r write /tmp/k3.trx firmware
编译指定 ipk
make V=99 package/lean/luci-app-ssr-plus/compile
开启 luci-app-ssr-plus,官版不需要
echo 0xDEADBEEF > /etc/config/google_fu_mode
可选更换 k3 无线驱动
mv xxxx.bin.xx brcmfmac4366c-pcie.bin && cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/
无线驱动
- https://github.com/Hill-98/phicommk3-firmware
- https://github.com/coolsnowwolf/lede/tree/master/package/lean/k3-brcmfmac4366c-firmware
参考
- https://lwz322.github.io/2019/08/31/Build_OpenWrt.html
- https://www.right.com.cn/forum/forum.php?mod=viewthread&tid=419328
- https://github.com/HamsterReserved/blog_posts/blob/master/_posts/K3-BCM4366C0-Firmware-Test.md
- https://bootell.net/2019/02/28/LEDE-K3-Build-with-GitLab-CI/
- https://openwrt.org/docs/guide-developer/quickstart-build-images
TODO
需要强制安装 luci-app-ssr-plus, ssr 依赖 kcptun-client,但是目前编译出来的的包是 kcptun-c,包名与可执行文件不符合要求,需更改成 kcptun-clinet