mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Reorganize service config parsing / main loop
This commit is contained in:
1 parent
b00e3b9a9c
commit
89d2131094
6 files changed
+1040
-931
No files matched your search
+9
-5
@@ -729,12 +729,12 @@ foreach(PROXY_NAME proxy socks pop3p imapp smtpp ftppr tcppm udppm tlspr)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE
|
||||
WITHMAIN
|
||||
NOPORTMAP
|
||||
)
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE WITHMAIN)
|
||||
|
||||
if(NOT PROXY_NAME STREQUAL "udppm")
|
||||
# each takes the main loop of its kind only: udppm UDP, the others TCP
|
||||
if(PROXY_NAME STREQUAL "udppm")
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE NOTCPMAIN)
|
||||
else()
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE NOUDPMAIN)
|
||||
endif()
|
||||
|
||||
@@ -744,8 +744,12 @@ foreach(PROXY_NAME proxy socks pop3p imapp smtpp ftppr tcppm udppm tlspr)
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE ANONYMOUS)
|
||||
endif()
|
||||
|
||||
# port mappers take port, host and port as arguments, the others options
|
||||
# only; one of the two is defined, as in src/Makefile.inc
|
||||
if(PROXY_NAME STREQUAL "tcppm" OR PROXY_NAME STREQUAL "udppm" OR PROXY_NAME STREQUAL "tlspr")
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE PORTMAP)
|
||||
else()
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE NOPORTMAP)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
||||
Reference in new issue
Block a user