Add independent STUN NAT probes with RFC 5780 discovery

This commit is contained in:
evgeny committed 2026-10-11 23:35:47 +02:00
1 parent 9cc996b775
commit 2c5deafe56
11 files changed
+1315 -2

No files matched your search

+11
View File
@@ -112,6 +112,13 @@ struct CFG_NTP_SERVER {
struct CFG_NTP_SERVER *next;
};
/* STUN-серверы обходятся в порядке конфигурации; DNS выполняет модуль stun_nat. */
struct CFG_STUN_SERVER {
struct CFG_STUN_SERVER* next;
char host[256];
uint16_t port;
};
#define MAX_TCP_PROXY_CLIENT_MAPPINGS 32
struct tcp_proxy_client_mapping_config {
uint16_t local_port;
@@ -218,6 +225,10 @@ struct global_config {
struct CFG_NTP_SERVER *ntp_servers; // linked list, unlimited
int ntp_server_count;
int ntp_resync_interval; // seconds, default 3600
int stun_enabled; // [stun] enabled=yes; по умолчанию выключено
struct CFG_STUN_SERVER* stun_servers;
int stun_server_count;
// Chatserver configuration ([chatserver] section)
char chatserver_join_password[128]; // пароль для входа в группу