为基于 mipsel, mips64 的 Ubiquiti EdgeMax(ER-X, ER-4), UniFi Security Gateway(USG) 等交叉编译 shadowsocks-libev
Cross complie shadowsocks for UBNT devices(ER-X ER-4 USG) based on mips or mips64
编译好的二进制文件请前往 release 下载
You can download pre-complied file here
配合 dnsmasq 以及 iptables 实现内外分流科学上网。教程SS脚本部署 . How to set dnsmasq and iptables
-
安装 Docker Install Docker
curl -sSL https://get.docker.com/ | sh
-
克隆仓库 Clone the git repo
git clone https://github.com/imMMX/ubnt-mips-shadowsocks-libev.git
-
build 镜像 Build the docker image
docker build --tag ubnt-mips-shadowsocks-libev .
-
启动容器 Start the container
docker run -idt --name ubnt-mips-shadowsocks-libev ubnt-mips-shadowsocks-libev
-
从容器中拷贝 Copy from docker container
docker cp ubnt-mips-shadowsocks-libev:/opt/ss-mips/ss-bin .
-
或者(取代上面4和5步骤),直接将编译后的结果存放到本地目录中
docker run -it -v $(pwd)/mipsel:/opt/ss-mips/ss-bin/bin ubnt-mips-shadowsocks-libev
-
或者对 entrypoint.sh 进行了某些修改(比如升级了某些版本号等),不想重新build docker的 Image
docker run -it -v $(pwd)/entrypoint.sh:/opt/ss-mips/entrypoint.sh ubnt-mips-shadowsocks-libev
由 ENV 参数 ARCHITECH 判断,默认生成 mips,需要 mips64 在第 4 步的时候替换成下面的命令
Controlled by ENV ARCHITECH, default build mips, you can set ARCHITECH="mips64" to build mips64 file.
docker run -idt --name ubnt-mips-shadowsocks-libev -e ARCHITECH="mips64" ubnt-mips-shadowsocks-libev