EdgerRouter Lite和EdgerRouter X使用的固件版本 1.9.0 是基于debian wheezy的,但是debian wheezy现在已经进入LTS了,mips和mipsel不在官方的维护架构里,以至于现在无法使用官方的apt更新debian-security,而且在ubnt的路由上,安装很多开发库都没法搞了。
EdgerRoute Lite 使用的是mips64,debian源里需要用 mips 的包;而 EdgeRoute X 使用的是mipsel。
使用lscpu看CPU的信息:
EdgeRouter Lite
1 2 3 4 5 6 7 8 9 10 |
Architecture: mips64 Byte Order: Big Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 2 L1d cache: 16K L1i cache: 32K L2 cache: 128K |
EdgeRouter X
1 2 3 4 5 6 7 |
Architecture: mips Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 |
准备
编译libudns和sniproxy
待补充。我已经把构建好的包发到了 http://dl.sskaje.me/debian/。
SSH登录ER
1 2 3 |
ubnt@ubnt:~$ sudo su root@ubnt:/home/ubnt# cd /tmp/ root@ubnt:/tmp# |
下载软件
EdgeRouter Lite 请使用mips
1 2 3 4 |
# 下载编译好的mips库 wget http://dl.sskaje.me/debian/mips/libudns0_0.4-1_mips.deb http://dl.sskaje.me/debian/mips/udns-utils_0.4-1_mips.deb http://dl.sskaje.me/debian/mips/sniproxy_0.4.0_mips.deb # 下载 libev4 wget https://ftp2.cn.debian.org/debian/pool/main/libe/libev/libev4_4.11-1_mips.deb |
EdgeRouter X 请使用mipsel
1 2 3 4 |
# 下载编译好的mipsel库 wget http://dl.sskaje.me/debian/mipsel/libudns0_0.4-1_mipsel.deb http://dl.sskaje.me/debian/mipsel/udns-utils_0.4-1_mipsel.deb http://dl.sskaje.me/debian/mipsel/sniproxy_0.4.0_mipsel.deb # 下载 libev4 wget https://ftp2.cn.debian.org/debian/pool/main/libe/libev/libev4_4.11-1_mipsel.deb |
安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
root@ubnt:/tmp# dpkg -i *.deb (Reading database ... 37513 files and directories currently installed.) Preparing to replace libev4 1:4.11-1 (using libev4_4.11-1_mips.deb) ... Unpacking replacement libev4 ... Selecting previously unselected package libudns0:mips. Unpacking libudns0:mips (from libudns0_0.4-1_mips.deb) ... Selecting previously unselected package sniproxy. Unpacking sniproxy (from sniproxy_0.4.0_mips.deb) ... Selecting previously unselected package udns-utils. Unpacking udns-utils (from udns-utils_0.4-1_mips.deb) ... Setting up libev4 (1:4.11-1) ... Setting up libudns0:mips (0.4-1) ... Setting up sniproxy (0.4.0) ... Setting up udns-utils (0.4-1) ... |
配置
请参考官方文档。
按我的需求,官方的功能没法满足,所以我对官方的源码做了一些改动,具体可见 https://github.com/sskaje/sniproxy。
使用
首先修改 /etc/default/sniproxy,这样才可以使用init的脚本启动
1 2 3 4 5 6 7 8 9 10 11 12 |
# Defaults for sniproxy initscript # This file has two functions: # 1) to completely disable starting sniproxy, # 2) to select an alternative config file # by setting DAEMON_ARGS to -c <file> # Additional options that are passed to the Daemon. DAEMON_ARGS="-c /etc/sniproxy.conf" # Whether or not to run the sniproxy daemon; set to 0 to disable, 1 to enable. ENABLED=1 |
启动
1 |
/etc/init.d/sniproxy start |
Ubnt EdgeRouter Lite 和 EdgeRouter X 上安装使用SNIProxy by @sskaje: https://sskaje.me/2016/11/install-sniproxy-ubnt-edgerouter-lite-edgerouter/
Incoming search terms:
- ubnt er-x
- flies8st
- wantn67
- slidei2k
- safeiba
- queenn3n
- practiceps1
- opportunitygco
- luckrcf
- its742
- interiori97
- adult2sy
- father8v7
- ER-X 安装软件
- edge修改sni
- edgerouterx ipv6
- edgerouterx
- edgerouter x 手册
- EdgeRouter X
- edgerouter sniproxy
Link to this post!