Перейти к содержимому
Калькуляторы
Блокировка веб ресурса  

565 пользователей проголосовало

  1. 1. Для блокировка используем



Блокировка сайтов провайдерами маневры с DNS

Имхо, не лучшая идея использовать C++ 11, его компиляторов с полной поддержкой стандарта нет в нормальном виде ни в одном дистрибутиве почти. Я в свое время так обжегся, 90% людей не могли собрать мой софт. А перебирать/подпихивать новый компилер и libstdc++ - не лучшее времяпровождение :)

Изменено пользователем pavel.odintsov

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

компилятор и блокировка сайтов - очень тесто связанные вещи

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

NFQ_FILTER собрался на Centos, но не могу понять почему не фильтрует

 

Запустил:

[root@alpha nfq]# ps ax | grep nfq
2011 ?        Ssl    0:00 /usr/local/bin/nfq_filter -c /etc/nfq/nfq_filter.cfg -d
2042 pts/0    S+     0:00 tail -f /tmp/nfq_debug.txt

Проверил логи(влючен debug 4):

[root@alpha ~]# tail -f /tmp/nfq_filter.log
01.04.2015 16:05:57:
--------------------------
Starting program.

Buffer size:    8388608
Log file:       /tmp/nfq_filter.log
Debug:          4
Multiqueued:    false
Queue:          0
01.04.2015 16:07:37:    Parent memory usage:    134597360

 

Настроил iptables:

[root@alpha nfq]# iptables -vL -n -t mangle
Chain PREROUTING (policy ACCEPT 323 packets, 26984 bytes)
pkts bytes target     prot opt in     out     source               destination
  24  1440 NFQUEUE    tcp  --  eth2   *       214.234.44.0/21     0.0.0.0/0           tcp dpt:80 NFQUEUE num 0 bypass

Пакетики на правило приходят, счетчик pkts увеличивается.

 

В nfq_debug пусто:

[root@alpha ~]# tail -f /tmp/nfq_debug.txt

 

 

Сервер с одним интерфейсом, без роутинга, просто для теста.

 

Как можно убедиться что nfq_filter вообще что-то получает для фильтрации и где искать затык?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

после

Попробуйте добавить "#include <stdint.h>" в файл libnetfilter_queue.h

и замены 2-х строк, собралось. Дебиан8 х32

Но не работает редирект.

У кого работает, как записана строка в конфиге?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

И еще: где можно почитать про вариант с днс заглушкой?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Коллеги, кто может помочь с настройкой NFQ_FILTER на виртуалке на базе Centos за денежку дайте знать в личку.

У самого руки никак не дойдут.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

День добрый!

Может кто подскажет:

"ERROR: ENOBUFS: App is not fast enough, increase socket buffer size by nfnl_rcvbufsiz()"

Как бороться???

коль что:

Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64 GNU/Linux

и прога из git

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Как обычно: увеличить буфера сокетов.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

В оригинальном коде nfq_filter есть утечка памяти. Я немного модифицировал данную программу, прикрутив к ней nDPI, что позволило работать с SSL. Если кому надо - обращайтесь.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Может быть выложите обновления на git?

Я думаю нужно всем, блокировать-то роскомнадзор всем нужно.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Может быть выложите обновления на git?

Я думаю нужно всем, блокировать-то роскомнадзор всем нужно.

Выложил на github'е.

Изменено пользователем max1976

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Спасибо! Будем тестировать. Еще бы парсер дампа разработать, чтобы отлавливал и реагировал на все причуды роскомнадзора (русские, английские буквы в URL, новые протоколы, и генерировал списки для фильтра), и скрипт запуска для работы нескольких демонов на нескольких процессорах, если интересно - последнее сделал, но надо допиливать.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Спасибо! Будем тестировать. Еще бы парсер дампа разработать, чтобы отлавливал и реагировал на все причуды роскомнадзора (русские, английские буквы в URL, новые протоколы, и генерировал списки для фильтра), и скрипт запуска для работы нескольких демонов на нескольких процессорах, если интересно - последнее сделал, но надо допиливать.

Скрипт разбора есть. Его входные данные - таблицы из https://github.com/ircop/zapret.

Изменено пользователем max1976

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Выложил на github'е.

 

Скажите, пожалуйста, под какой лицензией выставлен код? Верно ли предположение, что если в нем есть куски под LGPLv3, то и вся остальная программа тоже идет под этой же лицензией? (Мне это нужно, чтобы опакеченая программа попала в официальный репозитарий одного дистрибутива)

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Выложил на github'е.

 

Скажите, пожалуйста, под какой лицензией выставлен код? Верно ли предположение, что если в нем есть куски под LGPLv3, то и вся остальная программа тоже идет под этой же лицензией? (Мне это нужно, чтобы опакеченая программа попала в официальный репозитарий одного дистрибутива)

 

Честно говоря не думал под какой лицензией делать. Можно остановиться на GPL.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Спасибо. Если вас не затруднит, выложите в репо еще явную декларацию в виде файла COPYRIGHT с соотвествующим содержимым :)

 

Извиняюсь за занудство, просто в дистроваятельстве есть свои тараканы.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Спасибо. Если вас не затруднит, выложите в репо еще явную декларацию в виде файла COPYRIGHT с соотвествующим содержимым :)

 

Извиняюсь за занудство, просто в дистроваятельстве есть свои тараканы.

Да, добавлю недостающие файлы.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Может быть выложите обновления на git?

Я думаю нужно всем, блокировать-то роскомнадзор всем нужно.

Выложил на github'е.

 

При попытке собрать:

Making all in src
make[1]: Entering directory '/usr/src/nfqfilter-master/src'
g++ -DHAVE_CONFIG_H -I. -I../include     -std=c++0x -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cpp
In file included from /usr/include/Poco/Util/ServerApplication.h:44:0,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Util/Application.h:358:35: error: ‘typedef class std::vector<std::basic_string<char> > Poco::Util::Application::ArgVec’ is private
 typedef std::vector<std::string> ArgVec;
                                  ^
In file included from main.cpp:21:0:
../include/main.h:80:17: error: within this context
 int main(const ArgVec& args);
                ^
main.cpp: In member function ‘virtual void nfqFilter::initialize(Poco::Util::Application&)’:
main.cpp:77:62: error: no matching function for call to ‘Poco::Logger::information(const char [25], int&)’
 logger().information("Starting up on queue: %d",_queueNumber);
                                                             ^
main.cpp:77:62: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:409:13: note: void Poco::Logger::information(const string&)
inline void Logger::information(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:409:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:463:13: note: bool Poco::Logger::information() const
inline bool Logger::information() const
            ^
/usr/include/Poco/Logger.h:463:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:93:71: error: no matching function for call to ‘Poco::Logger::debug(std::basic_string<char>, int&)’
     logger().debug("Inserted domain: " + str + " from line %d",lineno);
                                                                      ^
main.cpp:93:71: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:95:70: error: no matching function for call to ‘Poco::Logger::debug(std::basic_string<char>, int&)’
     logger().debug("Updated domain: " + str + " from line %d",lineno);
                                                                     ^
main.cpp:95:70: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:126:72: error: no matching function for call to ‘Poco::Logger::warning(const char [43], std::string&)’
      logger().warning("Pattern %s already present in URL database",str);
                                                                       ^
main.cpp:126:72: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:397:13: note: void Poco::Logger::warning(const string&)
inline void Logger::warning(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:397:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:451:13: note: bool Poco::Logger::warning() const
inline bool Logger::warning() const
            ^
/usr/include/Poco/Logger.h:451:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:128:64: error: no matching function for call to ‘Poco::Logger::error(const char [30], std::string&, int&)’
      logger().error("Failed to add %s from line %d",str,lineno);
                                                               ^
main.cpp:128:64: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:391:13: note: void Poco::Logger::error(const string&)
inline void Logger::error(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:391:13: note:   candidate expects 1 argument, 3 provided
/usr/include/Poco/Logger.h:445:13: note: bool Poco::Logger::error() const
inline bool Logger::error() const
            ^
/usr/include/Poco/Logger.h:445:13: note:   candidate expects 0 arguments, 3 provided
main.cpp:162:73: error: no matching function for call to ‘Poco::Logger::warning(const char [43], std::string&)’
       logger().warning("Pattern %s already present in SSL database",str);
                                                                        ^
main.cpp:162:73: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:397:13: note: void Poco::Logger::warning(const string&)
inline void Logger::warning(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:397:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:451:13: note: bool Poco::Logger::warning() const
inline bool Logger::warning() const
            ^
/usr/include/Poco/Logger.h:451:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:164:65: error: no matching function for call to ‘Poco::Logger::error(const char [30], std::string&, int&)’
       logger().error("Failed to add %s from line %d",str,lineno);
                                                                ^
main.cpp:164:65: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:391:13: note: void Poco::Logger::error(const string&)
inline void Logger::error(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:391:13: note:   candidate expects 1 argument, 3 provided
/usr/include/Poco/Logger.h:445:13: note: bool Poco::Logger::error() const
inline bool Logger::error() const
            ^
/usr/include/Poco/Logger.h:445:13: note:   candidate expects 0 arguments, 3 provided
main.cpp:192:47: error: no matching function for call to ‘Poco::Logger::debug(const char [17], std::string&, std::string&)’
     logger().debug("IP is %s port %s",ip,port);
                                              ^
main.cpp:192:47: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 3 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 3 provided
main.cpp:204:87: error: no matching function for call to ‘Poco::Logger::debug(std::basic_string<char>, int&)’
      logger().debug("Inserted ip: " + ip + " port:  " + port + " from line %d",lineno);
                                                                                      ^
main.cpp:204:87: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:206:80: error: no matching function for call to ‘Poco::Logger::debug(std::basic_string<char>, int&, std::string&)’
      logger().debug("Adding port " + port + " from line %d to ip %s",lineno,ip);
                                                                               ^
main.cpp:206:80: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 3 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 3 provided
In file included from /usr/include/Poco/Util/ServerApplication.h:44:0,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Util/Application.h: In member function ‘virtual int nfqFilter::main(const ArgVec&)’:
/usr/include/Poco/Util/Application.h:358:35: error: ‘typedef class std::vector<std::basic_string<char> > Poco::Util::Application::ArgVec’ is private
 typedef std::vector<std::string> ArgVec;
                                  ^
main.cpp:282:27: error: within this context
int nfqFilter::main(const ArgVec& args)
                          ^
Makefile:349: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
make[1]: Leaving directory '/usr/src/nfqfilter-master/src'
Makefile:329: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
root@servl:/usr/src/nfqfilter-master# poco
-bash: poco: command not found
root@servl:/usr/src/nfqfilter-master# clear
[3;J
root@servl:/usr/src/nfqfilter-master# make
Making all in src
make[1]: Entering directory '/usr/src/nfqfilter-master/src'
g++ -DHAVE_CONFIG_H -I. -I../include     -std=c++0x -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cpp
In file included from /usr/include/Poco/Util/ServerApplication.h:44:0,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Util/Application.h:358:35: error: ‘typedef class std::vector<std::basic_string<char> > Poco::Util::Application::ArgVec’ is private
 typedef std::vector<std::string> ArgVec;
                                  ^
In file included from main.cpp:21:0:
../include/main.h:80:17: error: within this context
 int main(const ArgVec& args);
                ^
main.cpp: In member function ‘virtual void nfqFilter::initialize(Poco::Util::Application&)’:
main.cpp:77:62: error: no matching function for call to ‘Poco::Logger::information(const char [25], int&)’
 logger().information("Starting up on queue: %d",_queueNumber);
                                                             ^
main.cpp:77:62: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:409:13: note: void Poco::Logger::information(const string&)
inline void Logger::information(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:409:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:463:13: note: bool Poco::Logger::information() const
inline bool Logger::information() const
            ^
/usr/include/Poco/Logger.h:463:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:93:71: error: no matching function for call to ‘Poco::Logger::debug(std::basic_string<char>, int&)’
     logger().debug("Inserted domain: " + str + " from line %d",lineno);
                                                                      ^
main.cpp:93:71: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:95:70: error: no matching function for call to ‘Poco::Logger::debug(std::basic_string<char>, int&)’
     logger().debug("Updated domain: " + str + " from line %d",lineno);
                                                                     ^
main.cpp:95:70: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:126:72: error: no matching function for call to ‘Poco::Logger::warning(const char [43], std::string&)’
      logger().warning("Pattern %s already present in URL database",str);
                                                                       ^
main.cpp:126:72: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:397:13: note: void Poco::Logger::warning(const string&)
inline void Logger::warning(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:397:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:451:13: note: bool Poco::Logger::warning() const
inline bool Logger::warning() const
            ^
/usr/include/Poco/Logger.h:451:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:128:64: error: no matching function for call to ‘Poco::Logger::error(const char [30], std::string&, int&)’
      logger().error("Failed to add %s from line %d",str,lineno);
                                                               ^
main.cpp:128:64: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:391:13: note: void Poco::Logger::error(const string&)
inline void Logger::error(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:391:13: note:   candidate expects 1 argument, 3 provided
/usr/include/Poco/Logger.h:445:13: note: bool Poco::Logger::error() const
inline bool Logger::error() const
            ^
/usr/include/Poco/Logger.h:445:13: note:   candidate expects 0 arguments, 3 provided
main.cpp:162:73: error: no matching function for call to ‘Poco::Logger::warning(const char [43], std::string&)’
       logger().warning("Pattern %s already present in SSL database",str);
                                                                        ^
main.cpp:162:73: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:397:13: note: void Poco::Logger::warning(const string&)
inline void Logger::warning(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:397:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:451:13: note: bool Poco::Logger::warning() const
inline bool Logger::warning() const
            ^
/usr/include/Poco/Logger.h:451:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:164:65: error: no matching function for call to ‘Poco::Logger::error(const char [30], std::string&, int&)’
       logger().error("Failed to add %s from line %d",str,lineno);
                                                                ^
main.cpp:164:65: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:391:13: note: void Poco::Logger::error(const string&)
inline void Logger::error(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:391:13: note:   candidate expects 1 argument, 3 provided
/usr/include/Poco/Logger.h:445:13: note: bool Poco::Logger::error() const
inline bool Logger::error() const
            ^
/usr/include/Poco/Logger.h:445:13: note:   candidate expects 0 arguments, 3 provided
main.cpp:192:47: error: no matching function for call to ‘Poco::Logger::debug(const char [17], std::string&, std::string&)’
     logger().debug("IP is %s port %s",ip,port);
                                              ^
main.cpp:192:47: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 3 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 3 provided
main.cpp:204:87: error: no matching function for call to ‘Poco::Logger::debug(std::basic_string<char>, int&)’
      logger().debug("Inserted ip: " + ip + " port:  " + port + " from line %d",lineno);
                                                                                      ^
main.cpp:204:87: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 2 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 2 provided
main.cpp:206:80: error: no matching function for call to ‘Poco::Logger::debug(std::basic_string<char>, int&, std::string&)’
      logger().debug("Adding port " + port + " from line %d to ip %s",lineno,ip);
                                                                               ^
main.cpp:206:80: note: candidates are:
In file included from /usr/include/Poco/Util/Application.h:48:0,
                from /usr/include/Poco/Util/ServerApplication.h:44,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Logger.h:415:13: note: void Poco::Logger::debug(const string&)
inline void Logger::debug(const std::string& msg)
            ^
/usr/include/Poco/Logger.h:415:13: note:   candidate expects 1 argument, 3 provided
/usr/include/Poco/Logger.h:469:13: note: bool Poco::Logger::debug() const
inline bool Logger::debug() const
            ^
/usr/include/Poco/Logger.h:469:13: note:   candidate expects 0 arguments, 3 provided
In file included from /usr/include/Poco/Util/ServerApplication.h:44:0,
                from ../include/main.h:23,
                from main.cpp:21:
/usr/include/Poco/Util/Application.h: In member function ‘virtual int nfqFilter::main(const ArgVec&)’:
/usr/include/Poco/Util/Application.h:358:35: error: ‘typedef class std::vector<std::basic_string<char> > Poco::Util::Application::ArgVec’ is private
 typedef std::vector<std::string> ArgVec;
                                  ^
main.cpp:282:27: error: within this context
int nfqFilter::main(const ArgVec& args)
                          ^
Makefile:349: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
make[1]: Leaving directory '/usr/src/nfqfilter-master/src'
Makefile:329: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

 

как исправить

Debian Jessie

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

poco точно версии >= 1.6?

 

У меня poco стоковый из debian.

Там 1.3

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Дык... Вы с README загляните, там минимальные требования описаны. Среди прочего poco >= 1.6

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

max1976 фильтр также работает только в режиме прокси, в режиме зеркала не работает?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

На debian 8.2 попробовал собрать - при make ругается на отсутствие

 

 

../include/main.h:34:30: fatal error: libndpi/ndpi_api.h: Нет такого файла или каталога#include <libndpi/ndpi_api.h>

 

Поглядел - исправил путь: libndpi-1.7.1/libndpi/ndpi_api.h

Так собралось.

Пробую запустить:

./nfqfilter: error while loading shared libraries: libndpi.so.1: cannot open shared object file: No such file or directory

Куда бы дальше копнуть?

libndpi.so.1 - есть /usr/local/lib

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

На debian 8.2 попробовал собрать - при make ругается на отсутствие

 

../include/main.h:34:30: fatal error: libndpi/ndpi_api.h: Нет такого файла или каталога
#include <libndpi/ndpi_api.h>

Поглядел - исправил путь: libndpi-1.7.1/libndpi/ndpi_api.h

Так собралось.

Пробую запустить:

./nfqfilter: error while loading shared libraries: libndpi.so.1: cannot open shared object file: No such file or directory

Куда бы дальше копнуть?

libndpi.so.1 - есть /usr/local/lib

 

Я бы добавил /usr/local/lib в /etc/ld.so.conf

 

Ну или, для дебиана, сделал файлик /etc/ld.so.conf/local.conf куда написал бы эту строку.

Изменено пользователем vop

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

В нем написано include /etc/ld.so.conf.d/*.conf

А в cat /etc/ld.so.conf.d/libc.conf

# libc default configuration
/usr/local/lib

 

Запуск ldconfig -v помог

Изменено пользователем wed

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 смайлов.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.