Chacha20 的加密方式在移动端和路由器上的优势大家有目共睹,这次我就搬了这篇文章过来,文章来自 https://github.com,这篇文章让已经安装了 SSR 服务端的站长支持 CHACHA20 的加密方式。并不是全新安装的哟。
下面进入正题:
libsodium 的安装方法
安装 libsodium
如果要使用 salsa20 或 chacha20 或 chacha20-ietf 算法,请安装 libsodium :
centos:
yum -y groupinstall "Development Tools" && yum -y install wget wget https://github.com/jedisct1/libsodium/releases/download/1.0.10/libsodium-1.0.10.tar.gz tar xf libsodium-1.0.10.tar.gz && cd libsodium-1.0.10 ./configure && make -j2 && make install echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf ldconfig
不用分开输入:
yum -y groupinstall "Development Tools" && yum -y install wget && wget https://github.com/jedisct1/libsodium/releases/download/1.0.10/libsodium-1.0.10.tar.gz && tar xf libsodium-1.0.10.tar.gz && cd libsodium-1.0.10 && ./configure && make -j2 && make install && echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf && ldconfig
ubuntu/debian:
apt-get install build-essential apt-get install wget wget https://github.com/jedisct1/libsodium/releases/download/1.0.10/libsodium-1.0.10.tar.gz tar xf libsodium-1.0.10.tar.gz && cd libsodium-1.0.10 ./configure && make -j2 && make install ldconfig
apt-get install build-essential && apt-get install wget && wget https://github.com/jedisct1/libsodium/releases/download/1.0.10/libsodium-1.0.10.tar.gz && tar xf libsodium-1.0.10.tar.gz && cd libsodium-1.0.10 && ./configure && make -j2 && make install && ldconfig
如果曾经安装过旧版本,亦可重复用以上步骤更新到最新版,仅 1.0.4 或以上版本支持 chacha20-ietf。