# OpenWrt 编译 ## 编译教程 ```bash # 克隆 git clone -b openwrt-23.05 --depth=1 https://github.com/openwrt/openwrt.git cd openwrt # 添加三方库 git submodule add -f --name helloworld https://github.com/fw876/helloworld.git package/helloworld git submodule update --remote package/helloworld # 更新 安装feeds ./scripts/feeds update -a ./scripts/feeds install -a # 编译设置 make menuconfig # 下载编译 -j设置线程数 V=s verbose模式 显示更为详细的信息 make download V=s -j8 make V=s -j4 ``` ## 配置三方库 ```bash # 去除签名校验 sed -i '/option check_signature/d' /etc/opkg.conf # 添加三方库 echo "src/gz openwrt_base_golab https://dl.golab.cc/openwrt/23.05/packages/x86_64/base" >> /etc/opkg/customfeeds.conf # ssr 安装 opkg remove dnsmasq opkg install dnsmasq-full opkg install luci-compat luci-lib-ipkg opkg install luci-app-ssr-plus ``` ## ssr ipv6问题处理 由于ssr不兼容ipv6, 遇到ipv6网站会直连,导致访问部分网站如:docker hub会访问不了,但是本地bt服务有需要ipv6公网地址,连接客户端又不想进行额外关闭ipv6于是选择一个折中方案,DNS设置过滤ipv6记录。 > 需要ipv6解析的客户端手动配置ipv6 dns服务器 ![OpenWrt设置](WX20230916-110221%402x.png) > 三方库 > helloworld https://github.com/fw876/helloworld > 编译全部packages > `CONFIG_ALL=y + make V=99 IGNORE_ERRORS=m`