ubuntu下编译shadowsocks-qt5

在使用apt-get安装shadowsocks-qt5时[1],由于源的版本太老,很多新的协议都不支持。为了支持新的协议,需要自己编译。本文主要参考了这篇文章[2]

  • 系统:Ubuntu 16.04.4 LTS
  • 内核:4.13.0-36-generic

编译Botan2.3.0

wget https://botan.randombit.net/releases/Botan-2.3.0.tgz
tar xvf Botan-2.3.0.tgz
cd Botan-2.3.0
./configure.py
make -j4
sudo make install
sudo ldconfig

编译libqtshadowsocks[3]

Dependencies
  • Qt >= 5.5
  • Botan-2 >= 2.3.0
  • Or Botan-1.10 (Not recommended)
  • CMake >= 3.1
  • A C++ Compiler that supports C++14 features (i.e. GCC >= 4.9)
Building
git clone https://github.com/shadowsocks/libQtShadowsocks
cd libQtShadowsocks
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j8
sudo make install

编译shadowsocks-qt5[4]

Dependencies
  • cmake >= 3.1.0
  • qt5-qtbase-gui >= 5.2 (qtbase5 in Debian/Ubuntu)
  • qrencode (libqrencode in Debian/Ubuntu)
  • libQtShadowsocks >= 1.10.0 (libqtshadowsocks in Debian/Ubuntu. DON'T use the trunk code)
  • zbar (libzbar0 or libzbar in Debian/Ubuntu)
  • libappindicator (libappindicator1 in Debian/Ubuntu)
Building
sudo apt-get install cmake qtbase5-dev libqrencode-dev libzbar0 libappindicator1 libzbar-dev

git clone https://github.com/shadowsocks/shadowsocks-qt5
cd shadowsocks-qt5
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j8
sudo make install

然后就可以在Ubuntu下找到编译好的shadowsocks-qt5了。

ubuntu_shadowsocket


  1. http://luohanjie.com/2017-06-07/using-shadowsocks-qt5-to-implement-global-proxy-under-ubuntu.html

  2. https://www.shangyexin.com/2018/04/20/shadowsocks-qt5

  3. https://github.com/shadowsocks/libQtShadowsocks/wiki/Compiling

  4. https://github.com/shadowsocks/shadowsocks-qt5/wiki