Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Add support for chacha20-ietf-poly1305 #595

Closed
cuzfrog opened this issue Nov 1, 2017 · 63 comments
Closed

Add support for chacha20-ietf-poly1305 #595

cuzfrog opened this issue Nov 1, 2017 · 63 comments

Comments

@cuzfrog
Copy link

cuzfrog commented Nov 1, 2017

Thanks. chacha20-ietf seems not working properly against service that uses chacha20-ietf-poly1305

@zxy198717
Copy link

+1

3 similar comments
@simonbinwang
Copy link

+1

@helocy
Copy link

helocy commented Nov 2, 2017

+1

@csy530216
Copy link

+1

@cuzfrog
Copy link
Author

cuzfrog commented Nov 2, 2017

Please do not reply with simple +1s, which spawn meaningless emails to everyone related. Thanks.

@codingdie
Copy link

chacha20-ietf-poly1305 will be necessary

@begeekmyfriend
Copy link

begeekmyfriend commented Nov 2, 2017

This issue can be solved as follows

# Install libsodium
sudo apt-get install libsodium-dev

# Install libbotan-2.x from source
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
sudo make install
sudo ldconfig

# Install libQtShadowsocks
git clone https://github.com/shadowsocks/libQtShadowsocks.git
cd libQtShadowsocks
vim CMakeLists.txt
# Change Line 8 as "On"
mkdir build
cd build
cmake ..
make
sudo make install

# Install 
git clone https://github.com/shadowsocks/shadowsocks-qt5
cd shadowsocks-qt5
mkdir build
cd build
cmake ..
make
sudo make install

Note that when building libQtShadowsocks, please merge my PR first.

@yaochx
Copy link

yaochx commented Nov 2, 2017

@begeekmyfriend thank you, it works, but no need to do the PR change.
I rebooted my system twice, it worked.
before that, proxy return connection closed error or no response error

@Super-Tree
Copy link

@begeekmyfriend @yaochx 我安装了libsodium和libbotan,然后安装了shadowsocks-qt5 , 之后打开shadowsocks没有看到加密方式里面多了chacha20-ietf-poly1305 ,难道是还要安装libQtShadowsocks? (因为电脑山没QT,所以就没装第三个) 望指教!

@begeekmyfriend
Copy link

begeekmyfriend commented Nov 3, 2017

@Super-Tree shadowsocks-qt5调用的就是libQtShadowsocks,你要注意这个

@yaochx
Copy link

yaochx commented Nov 3, 2017

@Super-Tree 需要源码编译安装

@helocy
Copy link

helocy commented Nov 3, 2017

I have tried the solution @begeekmyfriend provided, and it works fine, thank you.

BTW: I need to install two packages:

sudo apt install libzbar-dev libqrencode-dev

@Super-Tree
Copy link

@begeekmyfriend 我已经装了第三个包libQtShadowsocks,在cmake第四个包shadowsocks-qt5的时候,cmake报错:pkg_check_modules(QSS REQUIRED QtShadowsocks>=2.0.0) 找不到这个QtShadowsocks,可是我刚才已经安装第三个包了呀, 我要怎么设置cmakelists才能让它找到QtShadowsocks. 感觉问的问题有些低级,但是我在网上查了好多也没有解决,麻烦指点一下~

@begeekmyfriend
Copy link

begeekmyfriend commented Nov 3, 2017

@wujiangGitHub 如果你是Ubuntu的话请apt安装qtbase5-dev,qt5-default(还有一个记不清了,自己网上搜),会在/usr/lib下面生成QT相关cmake模块

@Super-Tree 你的问题也类似,用apt安装

@wujiangGitHub
Copy link

@begeekmyfriend thanks

@csy530216
Copy link

I finished every step and solved some problems, such as fixing qToBigEndian compile error, installing some libs.
However, after I finished installing shadowsocks-qt5, when I run ss-qt5, it shows:

ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5: version `Qt_5' not found (required by ss-qt5)
ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5Network.so.5: version `Qt_5' not found (required by ss-qt5)
ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version `Qt_5' not found (required by ss-qt5)
ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.6' not found (required by ss-qt5)
ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by ss-qt5)
ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by ss-qt5)
ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5Network.so.5: version `Qt_5' not found (required by /usr/local/lib/libQtShadowsocks.so.2)
ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.6' not found (required by /usr/local/lib/libQtShadowsocks.so.2)
ss-qt5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by /usr/local/lib/libQtShadowsocks.so.2)

Then I installed qtbase5-dev, qt5-default, qt5-qmake, but the error messages still show.

How to fix that? Thanks!

@begeekmyfriend
Copy link

@csy530216 Try

sudo apt install libqtxxxx

@Super-Tree
Copy link

@begeekmyfriend 再次打扰,不好意思 我用apt安装了shadowsocks-qt5,运行ss-qt5选择加密方式时,还是没有chacha20-ietf-poly1305,要怎么办呢? 是不是还是应该从源码安装,还是要解决 package 'QtShadowsocks>=2.0.0' not found
主要是我都安装libQtShadowsocks了,为啥还是找不到呢,哎,求指导
谢谢你了!

@begeekmyfriend
Copy link

begeekmyfriend commented Nov 3, 2017

@Super-Tree 是要源码安装shadowsocks-qt5libQtShadowsocks的宏打开了没有,编译进去了没?

@begeekmyfriend
Copy link

@Super-Tree libQtshadowsocks也要源码编译,记得还要改CMakeLists.txt第八行,还有我的PR

@csy530216
Copy link

@Super-Tree 试试sudo ldconfig

@begeekmyfriend
Copy link

@Super-Tree 我的帖子你都不仔细看么。。。

@yelantf
Copy link

yelantf commented Nov 3, 2017

I think it would be perfect if this issue can be fixed in next release. Building by source code is not a comfortable way.

@ybtsdst
Copy link

ybtsdst commented Nov 3, 2017

@helocy how to install libzbar-dev ? apt seems not work on 16.04

@Super-Tree
Copy link

终于解决了,问题是安装完QT后没有在.bashrc里面添加LD_LIBRARY_PATH,加上这句export LD_LIBRARY_PATH=/home/name/Qt/5.10.0/gcc_64/lib/:/other/lib/you/use/lib:$LD_LIBRARY_PATH;
另外,大家要是在编译shadowsocks-qt5,libQtShadowsocks时,cmake提示没找到qt相关组件(前提是你安装了qt),则需要在cmakelists.txt中添加cmake_prefix_path, set(CMAKE_PREFIX_PATH "/home/name/Qt/5.10.0/gcc_64")
@begeekmyfriend @csy530216 谢谢耐心的指点!

@ghost
Copy link

ghost commented Nov 4, 2017

我在 make libQtShadowsocks 时出现错误,有谁可以告诉我是缺少了哪个包吗?
我的系统是 ubuntu16.04LTS,而且在 cmake .. 时没有错误.

[  3%] Automatic moc for target QtShadowsocks
[  3%] Built target QtShadowsocks_automoc
[  6%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/encryptor.cpp.o
/home/yungkc/Downloads/libQtShadowsocks/lib/encryptor.cpp: In member function ‘std::__cxx11::string QSS::Encryptor::encrypt(const uint8_t*, size_t)’:
/home/yungkc/Downloads/libQtShadowsocks/lib/encryptor.cpp:141:71: error: no matching function for call to ‘qToBigEndian(uint16_t&, uint16_t*)’
         qToBigEndian(inLen, reinterpret_cast<uint16_t*>(&rawLength[0]));
                                                                       ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QtEndian:1:0,
                 from /home/yungkc/Downloads/libQtShadowsocks/lib/encryptor.cpp:25:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qendian.h:206:32: note: candidate: template<class T> T qToBigEndian(T)
 template <typename T> inline T qToBigEndian(T source)
                                ^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qendian.h:206:32: note:   template argument deduction/substitution failed:
/home/yungkc/Downloads/libQtShadowsocks/lib/encryptor.cpp:141:71: note:   candidate expects 1 argument, 2 provided
         qToBigEndian(inLen, reinterpret_cast<uint16_t*>(&rawLength[0]));
                                                                       ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QtEndian:1:0,
                 from /home/yungkc/Downloads/libQtShadowsocks/lib/encryptor.cpp:25:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qendian.h:214:35: note: candidate: template<class T> void qToBigEndian(T, uchar*)
 template <typename T> inline void qToBigEndian(T src, uchar *dest)
                                   ^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qendian.h:214:35: note:   template argument deduction/substitution failed:
/home/yungkc/Downloads/libQtShadowsocks/lib/encryptor.cpp:141:71: note:   cannot convert ‘(uint16_t*)rawLength.std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[]<char, std::char_traits<char>, std::allocator<char> >(0ul)’ (type ‘uint16_t* {aka short unsigned int*}’) to type ‘uchar* {aka unsigned char*}’
         qToBigEndian(inLen, reinterpret_cast<uint16_t*>(&rawLength[0]));
                                                                       ^
lib/CMakeFiles/QtShadowsocks.dir/build.make:206: recipe for target 'lib/CMakeFiles/QtShadowsocks.dir/encryptor.cpp.o' failed
make[2]: *** [lib/CMakeFiles/QtShadowsocks.dir/encryptor.cpp.o] Error 1
CMakeFiles/Makefile2:86: recipe for target 'lib/CMakeFiles/QtShadowsocks.dir/all' failed
make[1]: *** [lib/CMakeFiles/QtShadowsocks.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

@begeekmyfriend
Copy link

@yungkcx See my PR

@ghost
Copy link

ghost commented Nov 4, 2017

@begeekmyfriend OK, thanks~

@librehat
Copy link
Contributor

librehat commented Nov 5, 2017

This method is not supported by current release yet.
I'll release an alpha build in AppImage to let you test in following days.

@cushionXY
Copy link

cushionXY commented Nov 8, 2017

大佬,是把您上边给的所有命令都执行一遍么?而您的意思是不是,将您的PR里面的代码在cmake 的时候粘贴上前去么?还有make后面跟的文件是您的PR么?是不是就是加上这个文件(lib/encryptor.cpp).还有就是,我之前下过qt-5了,要删除了从下么?

@begeekmyfriend
Copy link

begeekmyfriend commented Nov 8, 2017

@cushionXY 请仔细看一遍上面的帖子,我不想再重复一遍

sudo apt install qtbase5-dev
sudo apt install qt5-default

还有一个貌似这样,记不清了,自己试试

sudo apt install libqt5xxx

记住apt安装的位置是在/usr/lib 目录下,也是你在构建时引用的真正位置

@cushionXY
Copy link

谢谢大佬了

@willwhui
Copy link

willwhui commented Nov 8, 2017

Need help again, @begeekmyfriend
When install libQtShadowsocks

build$ make
[  3%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/address.cpp.o
In file included from /home/xxx/coding/ss-qt5/Botan-2.3.0/libQtShadowsocks/lib/address.cpp:25:0:
/home/xxx/coding/ss-qt5/Botan-2.3.0/libQtShadowsocks/lib/common.h:26:24: fatal error: QHostAddress: No such file or directory
 #include <QHostAddress>
                        ^
compilation terminated.
make[2]: *** [lib/CMakeFiles/QtShadowsocks.dir/address.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/QtShadowsocks.dir/all] Error 2
make: *** [all] Error 2

here says need QT += network in the ".pro" file.
but I can't find any .pro file in this project.

And I had found the file QHostAddress at /usr/include/qt5/QtNetwork
Thanks a lot.

@leomatrix
Copy link

leomatrix commented Nov 13, 2017

@begeekmyfriend ss-qt5的使用需要配合 privoxy吗?

@begeekmyfriend
Copy link

@leomatrix 没用到过

@ppflower
Copy link

@willwhui
Maybe you need to install some dependencies. You can refer to this.

@ATKghost
Copy link

ATKghost commented Nov 15, 2017

@begeekmyfriend 我按你的步骤编译安装Botan-2,也从git仓库的代码编译安装了一遍,但是编译libQtShadowsocks时仍找不到botan-2,求解

% sudo ldconfig -v | grep botan
libbotan-2.so.4 -> libbotan-2.so.4.4.0
libbotan-2.so.3 -> libbotan-2.so.3.3.0
libbotan-2.so.4 -> libbotan-2.so.4.4.0
libbotan-1.10.so.1 -> libbotan-1.10.so.1.17

~/git/libQtShadowsocks/build % cmake ..
-- Checking for module 'botan-2>=2.3.0'
-- Package 'botan-2', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:412 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:588 (_pkg_check_modules_internal)
CMakeLists.txt:26 (pkg_check_modules)

@begeekmyfriend
Copy link

begeekmyfriend commented Nov 15, 2017

sudo ldconfig

@ATKghost Please read my post closely and do not make me say "read the f***ing post!"

@ATKghost
Copy link

ATKghost commented Nov 15, 2017

@begeekmyfriend sudo ldconfig执行了没任何回应,问题依旧,所以才来提问的,我是Fedora26,有关联么?

@begeekmyfriend
Copy link

@ATKghost libbotan-1libbotan-2的路径分别是什么,试试删掉(备份)libbotan-1

@ATKghost
Copy link

@begeekmyfriend libbotan-2/lib/usr/lib/usr/local/lib都有。libbotan-1/lib64。我把libbotan-1移除后也还是不行

@librehat
Copy link
Contributor

Please download the AppImage here: https://github.com/shadowsocks/shadowsocks-qt5/releases/tag/v3.0.0alpha

@mylxiaoyi
Copy link

@rexpie 我也遇到文件无法下载的问题,在终端里输出相同的错误。你的问题解决了吗?

@GilBert1987
Copy link

It works thanks

@bringtree
Copy link

@Super-Tree cmake_prefix_path, set(CMAKE_PREFIX_PATH "/home/name/Qt/5.10.0/gcc_64") 这个怎么添加。。。 没用过cmake 求现成的 。 name 是bringtree qt 是 5.10.0

@bringtree
Copy link

@Super-Tree ok 搞定了谢谢哈

@bringtree
Copy link

@begeekmyfriend

Scanning dependencies of target QtShadowsocks_automoc
[  2%] Automatic moc for target QtShadowsocks
Generating moc_httpproxy.cpp
Generating moc_socketstream.cpp
Generating moc_tcprelay.cpp
Generating moc_tcpserver.cpp
Generating moc_udprelay.cpp
Generating moc_addresstester.cpp
Generating moc_controller.cpp
[  2%] Built target QtShadowsocks_automoc
Scanning dependencies of target QtShadowsocks
[  4%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/crypto/chacha.cpp.o
[  6%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/crypto/cipher.cpp.o
[  9%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/crypto/encryptor.cpp.o
[ 11%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/crypto/rc4.cpp.o
[ 13%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/network/httpproxy.cpp.o
[ 16%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/network/socketstream.cpp.o
[ 18%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/network/tcprelay.cpp.o
[ 20%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/network/tcpserver.cpp.o
[ 23%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/network/udprelay.cpp.o
[ 25%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/types/address.cpp.o
[ 27%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/types/profile.cpp.o
[ 30%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/util/addresstester.cpp.o
[ 32%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/util/common.cpp.o
[ 34%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/util/controller.cpp.o
[ 37%] Building CXX object lib/CMakeFiles/QtShadowsocks.dir/QtShadowsocks_automoc.cpp.o
[ 39%] Linking CXX shared library libQtShadowsocks.so
[ 39%] Built target QtShadowsocks
Scanning dependencies of target shadowsocks-libqss_automoc
[ 41%] Automatic moc for target shadowsocks-libqss
[ 41%] Built target shadowsocks-libqss_automoc
Scanning dependencies of target shadowsocks-libqss
[ 44%] Building CXX object shadowsocks-libqss/CMakeFiles/shadowsocks-libqss.dir/client.cpp.o
[ 46%] Building CXX object shadowsocks-libqss/CMakeFiles/shadowsocks-libqss.dir/main.cpp.o
[ 48%] Building CXX object shadowsocks-libqss/CMakeFiles/shadowsocks-libqss.dir/utils.cpp.o
[ 51%] Building CXX object shadowsocks-libqss/CMakeFiles/shadowsocks-libqss.dir/shadowsocks-libqss_automoc.cpp.o
[ 53%] Linking CXX executable shadowsocks-libqss
[ 53%] Built target shadowsocks-libqss
Scanning dependencies of target encryptor_automoc
[ 55%] Automatic moc for target encryptor
Generating encryptor.moc
[ 55%] Built target encryptor_automoc
Scanning dependencies of target encryptor
[ 58%] Building CXX object test/CMakeFiles/encryptor.dir/encryptor.cpp.o
/home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp: In member function ‘void Encryptor::testAesGcm()’:
/home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp:39:11: error: ‘Cipher’ does not name a type
     const Cipher::CipherInfo cInfo = Cipher::cipherInfoMap.at(method);
           ^
In file included from /home/bringtree/Qt5.10.0/5.10.0/gcc_64/include/QtTest/qtest.h:45:0,
                 from /home/bringtree/Qt5.10.0/5.10.0/gcc_64/include/QtTest/QtTest:7,
                 from /home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp:2:
/home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp:45:34: error: ‘cInfo’ was not declared in this scope
     QCOMPARE(encrypted.length(), cInfo.saltLen + 2 + cInfo.tagLen + testData.length() + cInfo.tagLen);
                                  ^
/home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp:51:38: error: ‘cInfo’ was not declared in this scope
     QCOMPARE(encrypted.length(), 2 + cInfo.tagLen + testData.length() + cInfo.tagLen);
                                      ^
/home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp: In member function ‘void Encryptor::testAesGcmUdp()’:
/home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp:60:11: error: ‘Cipher’ does not name a type
     const Cipher::CipherInfo cInfo = Cipher::cipherInfoMap.at(method);
           ^
In file included from /home/bringtree/Qt5.10.0/5.10.0/gcc_64/include/QtTest/qtest.h:45:0,
                 from /home/bringtree/Qt5.10.0/5.10.0/gcc_64/include/QtTest/QtTest:7,
                 from /home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp:2:
/home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp:66:34: error: ‘cInfo’ was not declared in this scope
     QCOMPARE(encrypted.length(), cInfo.saltLen + testData.length() + cInfo.tagLen);
                                  ^
/home/bringtree/桌面/libQtShadowsocks/test/encryptor.cpp:72:34: error: ‘cInfo’ was not declared in this scope
     QCOMPARE(encrypted.length(), cInfo.saltLen + testData.length() + cInfo.tagLen);
                                  ^
test/CMakeFiles/encryptor.dir/build.make:62: recipe for target 'test/CMakeFiles/encryptor.dir/encryptor.cpp.o' failed
make[2]: *** [test/CMakeFiles/encryptor.dir/encryptor.cpp.o] Error 1
CMakeFiles/Makefile2:276: recipe for target 'test/CMakeFiles/encryptor.dir/all' failed
make[1]: *** [test/CMakeFiles/encryptor.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

@bringtree
Copy link

呃呃 我改成- qToBigEndian(inLen, reinterpret_cast<uint16_t*>(&rawLength[0]));
就好了

@begeekmyfriend
Copy link

@bringtree 见我第一个post最后一句话

@bringtree
Copy link

@begeekmyfriend 装完了 然后闪退 退回去用 shadowsocks-libev 。。。。。。

@MacchaX
Copy link

MacchaX commented Jan 28, 2018

@begeekmyfriend
请教一下,我这个问题怎么解决呀,不是很懂,也不知道从何下手,十分感谢
[ 2%] Automatic MOC for target QtShadowsocks
[ 2%] Built target QtShadowsocks_autogen
[ 39%] Built target QtShadowsocks
[ 41%] Automatic MOC for target shadowsocks-libqss
[ 41%] Built target shadowsocks-libqss_autogen
[ 53%] Built target shadowsocks-libqss
[ 55%] Automatic MOC for target chacha
[ 55%] Built target chacha_autogen
[ 62%] Built target chacha
[ 65%] Automatic MOC for target address
[ 65%] Built target address_autogen
[ 72%] Built target address
[ 74%] Automatic MOC for target cipher
[ 74%] Built target cipher_autogen
[ 81%] Built target cipher
[ 83%] Automatic MOC for target encryptor
[ 83%] Built target encryptor_autogen
[ 86%] Building CXX object test/CMakeFiles/encryptor.dir/encryptor.cpp.o
/root/libQtShadowsocks/test/encryptor.cpp: In member function ‘void Encryptor::testAesGcm()’:
/root/libQtShadowsocks/test/encryptor.cpp:39:11: error: ‘Cipher’ does not name a type; did you mean ‘QSslCipher’?
const Cipher::CipherInfo cInfo = Cipher::cipherInfoMap.at(method);//Cipher
^~~~~~
QSslCipher
In file included from /usr/include/i386-linux-gnu/qt5/QtTest/qtest.h:45:0,
from /usr/include/i386-linux-gnu/qt5/QtTest/QtTest:7,
from /root/libQtShadowsocks/test/encryptor.cpp:2:
/root/libQtShadowsocks/test/encryptor.cpp:45:34: error: ‘cInfo’ was not declared in this scope
QCOMPARE(encrypted.length(), cInfo.saltLen + 2 + cInfo.tagLen + testData.length() + cInfo.tagLen);
^
/root/libQtShadowsocks/test/encryptor.cpp:45:34: note: suggested alternative: ‘qInfo’
/root/libQtShadowsocks/test/encryptor.cpp:51:38: error: ‘cInfo’ was not declared in this scope
QCOMPARE(encrypted.length(), 2 + cInfo.tagLen + testData.length() + cInfo.tagLen);
^
/root/libQtShadowsocks/test/encryptor.cpp:51:38: note: suggested alternative: ‘qInfo’
/root/libQtShadowsocks/test/encryptor.cpp: In member function ‘void Encryptor::testAesGcmUdp()’:
/root/libQtShadowsocks/test/encryptor.cpp:60:11: error: ‘Cipher’ does not name a type; did you mean ‘QSslCipher’?
const Cipher::CipherInfo cInfo = Cipher::cipherInfoMap.at(method);//Cipher
^~~~~~
QSslCipher
In file included from /usr/include/i386-linux-gnu/qt5/QtTest/qtest.h:45:0,
from /usr/include/i386-linux-gnu/qt5/QtTest/QtTest:7,
from /root/libQtShadowsocks/test/encryptor.cpp:2:
/root/libQtShadowsocks/test/encryptor.cpp:66:34: error: ‘cInfo’ was not declared in this scope
QCOMPARE(encrypted.length(), cInfo.saltLen + testData.length() + cInfo.tagLen);
^
/root/libQtShadowsocks/test/encryptor.cpp:66:34: note: suggested alternative: ‘qInfo’
/root/libQtShadowsocks/test/encryptor.cpp:72:34: error: ‘cInfo’ was not declared in this scope
QCOMPARE(encrypted.length(), cInfo.saltLen + testData.length() + cInfo.tagLen);
^
/root/libQtShadowsocks/test/encryptor.cpp:72:34: note: suggested alternative: ‘qInfo’
test/CMakeFiles/encryptor.dir/build.make:62: recipe for target 'test/CMakeFiles/encryptor.dir/encryptor.cpp.o' failed
make[2]: *** [test/CMakeFiles/encryptor.dir/encryptor.cpp.o] Error 1
CMakeFiles/Makefile2:390: recipe for target 'test/CMakeFiles/encryptor.dir/all' failed
make[1]: *** [test/CMakeFiles/encryptor.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

@librehat
Copy link
Contributor

librehat commented Feb 3, 2018

@MacchaX use stable branch please. I've also just fixed this error on master branch

@xianghongai
Copy link

# Change Line 8 as "On"

2018-03-02 00-41-02

👎


折腾 libQtShadowsocks Dependencies Qt>= 5.5 都表示吃力了。

下载“Shadowsocks-Qt5-3.0.0-x86_64.AppImage”吧,点开即用,不用太折腾。

散了吧都~

@vision4fun
Copy link

@willwhui
export CMAKE_PREFIX_PATH=/usr/......./qt5/
cmake ......

@heirish
Copy link

heirish commented Jan 4, 2019

@ATKghost,
I meet the same issue as yours, after add the botan-2's pkgconfig path to env variable PKG_CONFIG_PATH, it works.

$ ls /usr/local/lib/pkgconfig
botan-2.pc  QtShadowsocks.pc
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

Hope it helps.

@xmha97
Copy link

xmha97 commented Oct 24, 2019

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests