add mbedtls path.
Some checks failed
Deploy / PullDocker (push) Failing after 27s
Deploy / Build (push) Successful in 2m44s

This commit is contained in:
amass 2024-10-29 23:25:45 +08:00
parent 7ceb1311c5
commit da673dfee6
3 changed files with 12 additions and 2 deletions

View File

@ -5,6 +5,12 @@ project(Older)
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(Libraries_ROOT /opt/Libraries)
set(MBEDTLS_ROOT ${Libraries_ROOT}/mbedtls-3.6.2)
set(MBEDTLS_INCLUDE_DIR ${MBEDTLS_ROOT}/include)
set(MBEDTLS_LIBRARY_DIRS ${MBEDTLS_ROOT}/lib)
set(OPENSSL_LIBRARIES ssl crypto) set(OPENSSL_LIBRARIES ssl crypto)
include(FetchContent) include(FetchContent)

View File

@ -53,7 +53,11 @@ void UdpServer::sendData() {
using namespace std::chrono_literals; using namespace std::chrono_literals;
static uint32_t index = 0; static uint32_t index = 0;
m_timer.expires_after(1ms); m_timer.expires_after(1ms);
m_timer.async_wait([this](const boost::system::error_code &) { m_timer.async_wait([this](const boost::system::error_code &error) {
if (error) {
LOG(error) << error.message();
return;
}
std::random_device rd; // 将用于获得随机数引擎的种子 std::random_device rd; // 将用于获得随机数引擎的种子
std::mt19937 gen(rd()); // 以 rd() 播种的标准 mersenne_twister_engine std::mt19937 gen(rd()); // 以 rd() 播种的标准 mersenne_twister_engine
std::uniform_int_distribution<uint32_t> distribution(std::numeric_limits<uint32_t>::min(), std::uniform_int_distribution<uint32_t> distribution(std::numeric_limits<uint32_t>::min(),

View File

@ -31,7 +31,7 @@ location ^~ /api/v1/login {
content_by_lua_file lua/login.lua; content_by_lua_file lua/login.lua;
} }
location ~ /api/v1/.*$ { location ~ ^/api/v1/.*$ {
proxy_pass http://local; proxy_pass http://local;
} }