feat(native): guests see the session hostname from uname and gethostname

This commit is contained in:
Kurt Himebauch committed 2026-11-09 13:36:38 -05:00
1 parent bde8c9fbed
commit 0c5219b225
6 files changed
+43 -2

No files matched your search

+2
View File
@@ -34,6 +34,8 @@ static void init_ddnatv_hook(void) {
}
}
ddnatv_load_binds(getenv("DDNATV_BINDS"));
const char *hostname = getenv("DDNATV_HOSTNAME");
if (hostname && hostname[0] && strlen(hostname) < sizeof(g_hostname)) ddnatv_copy_cstr(g_hostname, sizeof(g_hostname), hostname);
const char *preload = getenv("DDNATV_PRELOAD");
if (preload && preload[0] && g_ddnatv_root_len > 0) {
size_t cap = strlen(preload) + (g_ddnatv_root_len + 1) * 16 + 1;