一、准备工作: 1、应用商店安装Ubuntu 16.04 2、自备socks5全局代理 二、编译说明: 1、使用Lean的Openwrt源码https://github.com/coolsnowwolf/lede 2、加入lienol的软件仓库https://github.com/Lienol/openwrt-package 3、不要用 root 用户 git 和编译!!! 4、默认登陆IP 192.168.1.1, 密码 password 5、LuCI说明https://www.vrrmr.net/img/luCI--说明.txt 三、编译过程 1、安装组件(国内源见结尾备注) 代码: sudo apt-get update sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib linux-libc-dev:i386 2、安装proxychains使用socks5代理 代码: git clone https://github.com/rofl0r/proxychains-ng.git cd proxychains-ng ./configure make && make install cp ./src/proxychains.conf /etc/proxychains.conf cd .. && rm -rf proxychains-ng 编辑配置文件/etc/proxychains.conf结尾处 代码: socks5 127.0.0.1 1080 3、克隆Lean的源码 代码: proxychains4 git clone http://github.com/coolsnowwolf/lede 4、添加lienol的软件仓库 编辑feeds.conf.default最后插入 代码: src-git lienol http://github.com/Lienol/openwrt-package 5、清理、更新、安装源feeds 代码: proxychains4 ./scripts/feeds clean proxychains4 ./scripts/feeds update -a proxychains4 ./scripts/feeds install -a 6、预下载源码 代码: proxychains4 make -j1 V=s download 7、config配置,参考LuCI说明。 代码: make menuconfig 8、开始编译,n=线程数+1,例如4线程的I5填-j5。 代码: proxychains4 make -j5 V=s 四、更新编译,建议每次重新生成config。 代码: cd lede proxychains4 git pull proxychains4 ./scripts/feeds update -a && ./scripts/feeds install -a proxychains4 make -j1 V=s download rm -rf ./tmp && rm -rf .config make menuconfig proxychains4 make -j5 V=s 五、备注 1、如遇ubuntu: Unable to correct problems, you have held broken packages 备份并替换/etc/apt/sources.list的源内容 代码: deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源码 deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse 2、如遇find: The relative path 'Files/WindowsApps/CanonicalGroupLimited.Ubuntu16.04onWindows_1604.2019.523.0_x64__79rhkp1fndgsc' is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove that entry from $PATH 修改注册表把值从7 改为5,并重启电脑。 代码: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{GUID}\Flags