Füge Unterstützung für SSL/TLS in die Konfiguration und das Build-System ein
- Integriere die libwebsockets-Bibliothek für SSL/TLS WebSocket-Unterstützung in `CMakeLists.txt`. - Aktualisiere `chatconfig.json`, um SSL-Optionen wie `ssl_enabled`, `ssl_cert_path` und `ssl_key_path` hinzuzufügen. - Ergänze das `deploy.sh`-Skript um einen Schritt zur optionalen Einrichtung von SSL/TLS. - Modifiziere `update_config.sh`, um die SSL-Konfiguration in die Servereinstellungen zu integrieren. - Implementiere eine Überprüfung in `main.cpp`, um den SSL-Status zu prüfen und entsprechende Meldungen auszugeben.
This commit is contained in:
@@ -39,6 +39,12 @@ endif()
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(yourchat OpenSSL::SSL OpenSSL::Crypto)
|
||||
|
||||
# Link libwebsockets for SSL/TLS WebSocket support
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LWS REQUIRED libwebsockets)
|
||||
target_include_directories(yourchat PRIVATE ${LWS_INCLUDE_DIRS})
|
||||
target_link_libraries(yourchat ${LWS_LIBRARIES})
|
||||
|
||||
add_executable(ws_probe tools/ws_probe.cpp)
|
||||
target_compile_features(ws_probe PRIVATE cxx_std_17)
|
||||
target_link_libraries(ws_probe pthread)
|
||||
|
||||
Reference in New Issue
Block a user