From 613e73e1dc22c14aa62f8db1ebe61b03de40e3d3 Mon Sep 17 00:00:00 2001 From: wyc <1104749580@qq.com> Date: Wed, 12 Aug 2026 11:36:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E5=88=99=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/Public_Ip_Config.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/base/Public_Ip_Config.h diff --git a/src/base/Public_Ip_Config.h b/src/base/Public_Ip_Config.h new file mode 100644 index 0000000..54f6ece --- /dev/null +++ b/src/base/Public_Ip_Config.h @@ -0,0 +1,8 @@ +#pragma once +// 出口 IPv4 缓存有效期,单位秒;0 表示永不过期。 +inline constexpr int public_ipv4_cache_ttl_seconds = 7 * 24 * 60 * 60; +// 出口 IPv6 缓存有效期,单位秒;0 表示永不过期。 +inline constexpr int public_ipv6_cache_ttl_seconds = 7 * 24 * 60 * 60; +// true 表示对应缓存过期就重查;false 表示过期且缺少对应 IP 才重查。 +inline constexpr bool radical_ipv4 = true; +inline constexpr bool radical_ipv6 = true;