Alex 'AdUser' Z
8 years ago
14 changed files with 56 additions and 44 deletions
@ -1,2 +1,2 @@
|
||||
[source:files] |
||||
load = libf2b_source_files.so |
||||
load = f2b/sources/files.so |
||||
|
@ -1,5 +1,5 @@
|
||||
[source:portknock] |
||||
load = libf2b_source_portknock.so |
||||
load = f2b/sources/portknock.so |
||||
; listen = 0.0.0.0:23 # telnet |
||||
; listen = 0.0.0.0:5060 # sip |
||||
; listen = 0.0.0.0:6667 # irc |
||||
|
@ -1,2 +1,2 @@
|
||||
[backend:ipset] |
||||
load = libf2b_backend_ipset.so |
||||
load = f2b/backends/ipset.so |
||||
|
@ -1,4 +1,4 @@
|
||||
[backend:mcast] |
||||
load = libf2b_backend_mcast.so |
||||
load = f2b/backends/mcast.so |
||||
; group = 239.255.186.1 |
||||
; port = 3370 |
||||
|
@ -1,5 +1,5 @@
|
||||
[filter:pcre] |
||||
load = libf2b_filter_pcre.so |
||||
load = f2b/filters/pcre.so |
||||
icase = yes |
||||
study = yes |
||||
usejit = no |
||||
|
@ -1,3 +1,3 @@
|
||||
[filter:preg] |
||||
load = libf2b_filter_preg.so |
||||
load = f2b/filters/preg.so |
||||
icase = yes |
||||
|
@ -1,30 +1,34 @@
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
||||
unset(CMAKE_SHARED_MODULE_PREFIX) |
||||
set(BACKENDS "") |
||||
|
||||
add_library("f2b_backend_exec" MODULE "exec.c" "../strlcpy.c") |
||||
list(APPEND BACKENDS "f2b_backend_exec") |
||||
add_library("b_exec" MODULE "exec.c" "../strlcpy.c") |
||||
list(APPEND BACKENDS "exec") |
||||
|
||||
if (WITH_MCAST) |
||||
add_library("f2b_backend_mcast" MODULE "mcast.c" "../strlcpy.c" |
||||
add_library("b_mcast" MODULE "mcast.c" "../strlcpy.c" |
||||
"../commands.c" "../cmsg.c" "../csocket.c") |
||||
list(APPEND BACKENDS "f2b_backend_mcast") |
||||
list(APPEND BACKENDS "mcast") |
||||
endif () |
||||
|
||||
find_library(REDIS_FOUND "hiredis") |
||||
if (WITH_REDIS AND REDIS_FOUND) |
||||
add_library("f2b_backend_redis" MODULE "redis.c" "../strlcpy.c") |
||||
target_link_libraries("f2b_backend_redis" "hiredis") |
||||
list(APPEND BACKENDS "f2b_backend_redis") |
||||
add_library("b_redis" MODULE "redis.c" "../strlcpy.c") |
||||
target_link_libraries("b_redis" "hiredis") |
||||
list(APPEND BACKENDS "redis") |
||||
endif () |
||||
|
||||
find_library(IPSET_FOUND "ipset") |
||||
if (WITH_IPSET AND IPSET_FOUND) |
||||
add_library("f2b_backend_ipset" MODULE "ipset.c" "../strlcpy.c") |
||||
target_link_libraries("f2b_backend_ipset" "ipset") |
||||
list(APPEND BACKENDS "f2b_backend_ipset") |
||||
add_library("b_ipset" MODULE "ipset.c" "../strlcpy.c") |
||||
target_link_libraries("b_ipset" "ipset") |
||||
list(APPEND BACKENDS "ipset") |
||||
endif () |
||||
|
||||
message(STATUS "- Backends : ${BACKENDS}") |
||||
set(LIB_PATH "${CMAKE_INSTALL_LIBDIR}/f2b/backends") |
||||
foreach (BACKEND IN LISTS BACKENDS) |
||||
set_target_properties("b_${BACKEND}" PROPERTIES OUTPUT_NAME ${BACKEND}) |
||||
install(TARGETS "b_${BACKEND}" LIBRARY DESTINATION ${LIB_PATH}) |
||||
endforeach () |
||||
|
||||
install(TARGETS ${BACKENDS} |
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
||||
message(STATUS "- Backends : ${BACKENDS}") |
||||
|
@ -1,17 +1,21 @@
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
||||
unset(CMAKE_SHARED_MODULE_PREFIX) |
||||
set(FILTERS "") |
||||
|
||||
add_library("f2b_filter_preg" MODULE "preg.c" "../strlcpy.c") |
||||
list(APPEND FILTERS "f2b_filter_preg") |
||||
add_library("f_preg" MODULE "preg.c" "../strlcpy.c") |
||||
list(APPEND FILTERS "preg") |
||||
|
||||
find_library(PCRE_FOUND "pcre") |
||||
if (WITH_PCRE AND PCRE_FOUND) |
||||
add_library("f2b_filter_pcre" MODULE "pcre.c" "../strlcpy.c") |
||||
target_link_libraries("f2b_filter_pcre" "pcre") |
||||
list(APPEND FILTERS "f2b_filter_pcre") |
||||
add_library("f_pcre" MODULE "pcre.c" "../strlcpy.c") |
||||
target_link_libraries("f_pcre" "pcre") |
||||
list(APPEND FILTERS "pcre") |
||||
endif () |
||||
|
||||
message(STATUS "- Filters : ${FILTERS}") |
||||
set(LIB_PATH "${CMAKE_INSTALL_LIBDIR}/f2b/filters") |
||||
foreach (FILTER IN LISTS FILTERS) |
||||
set_target_properties("f_${FILTER}" PROPERTIES OUTPUT_NAME ${FILTER}) |
||||
install(TARGETS "f_${FILTER}" LIBRARY DESTINATION ${LIB_PATH}) |
||||
endforeach () |
||||
|
||||
install(TARGETS ${FILTERS} |
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
||||
message(STATUS "- Filters : ${FILTERS}") |
||||
|
@ -1,26 +1,30 @@
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
||||
unset(CMAKE_SHARED_MODULE_PREFIX) |
||||
set(SOURCES "") |
||||
|
||||
add_library("f2b_source_files" MODULE "files.c" "../strlcpy.c") |
||||
list(APPEND SOURCES "f2b_source_files") |
||||
add_library("s_files" MODULE "files.c" "../strlcpy.c") |
||||
list(APPEND SOURCES "files") |
||||
|
||||
add_library("f2b_source_portknock" MODULE "portknock.c" "../strlcpy.c") |
||||
list(APPEND SOURCES "f2b_source_portknock") |
||||
add_library("s_portknock" MODULE "portknock.c" "../strlcpy.c") |
||||
list(APPEND SOURCES "portknock") |
||||
|
||||
if (WITH_MCAST) |
||||
add_library("f2b_source_mcast" MODULE "mcast.c" "../strlcpy.c" |
||||
add_library("s_mcast" MODULE "mcast.c" "../strlcpy.c" |
||||
"../commands.c" "../cmsg.c" "../csocket.c") |
||||
list(APPEND SOURCES "f2b_source_mcast") |
||||
list(APPEND SOURCES "mcast") |
||||
endif () |
||||
|
||||
find_library(REDIS_FOUND "hiredis") |
||||
if (WITH_REDIS AND REDIS_FOUND) |
||||
add_library("f2b_source_redis" MODULE "redis.c" "../strlcpy.c") |
||||
target_link_libraries("f2b_source_redis" "hiredis") |
||||
list(APPEND SOURCES "f2b_source_redis") |
||||
add_library("s_redis" MODULE "redis.c" "../strlcpy.c") |
||||
target_link_libraries("s_redis" "hiredis") |
||||
list(APPEND SOURCES "redis") |
||||
endif () |
||||
|
||||
message(STATUS "- Sources : ${SOURCES}") |
||||
set(LIB_PATH "${CMAKE_INSTALL_LIBDIR}/f2b/sources") |
||||
foreach (SOURCE IN LISTS SOURCES) |
||||
set_target_properties("s_${SOURCE}" PROPERTIES OUTPUT_NAME ${SOURCE}) |
||||
install(TARGETS "s_${SOURCE}" LIBRARY DESTINATION ${LIB_PATH}) |
||||
endforeach () |
||||
|
||||
install(TARGETS ${SOURCES} |
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
||||
message(STATUS "- Sources : ${SOURCES}") |
||||
|
Loading…
Reference in new issue