{"record":{"id":"88a381e5118b9e5d","repo":"TechnitiumSoftware/DnsServer","slug":"unix-domain-sockets-uds-are-supported-only-on-li","errorCode":null,"errorMessage":"Unix Domain Sockets (UDS) are supported only on Linux, Windows 10 (build 17063 and later), and Windows Server 2019 (update 1809 and later).","messagePattern":"Unix Domain Sockets \\(UDS\\) are supported only on Linux, Windows 10 \\(build 17063 and later\\), and Windows Server 2019 \\(update 1809 and later\\)\\.","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"DnsServerCore/Dns/DnsServer.cs","lineNumber":7635,"sourceCode":"            get { return _enableDnsOverTcpProxy; }\n            set { _enableDnsOverTcpProxy = value; }\n        }\n\n        public bool EnableDnsOverHttp\n        {\n            get { return _enableDnsOverHttp; }\n            set { _enableDnsOverHttp = value; }\n        }\n\n        public bool EnableDnsOverHttpUnixSocket\n        {\n            get { return _enableDnsOverHttpUnixSocket; }\n            set\n            {\n                if (value)\n                {\n                    if (!IsUnixDomainSocketSupported())\n                        throw new ArgumentException(\"Unix Domain Sockets (UDS) are supported only on Linux, Windows 10 (build 17063 and later), and Windows Server 2019 (update 1809 and later).\", nameof(EnableDnsOverHttpUnixSocket));\n                }\n\n                _enableDnsOverHttpUnixSocket = value;\n            }\n        }\n\n        public bool EnableDnsOverHttpsUnixSocket\n        {\n            get { return _enableDnsOverHttpsUnixSocket; }\n            set\n            {\n                if (value)\n                {\n                    if (!IsUnixDomainSocketSupported())\n                        throw new ArgumentException(\"Unix Domain Sockets (UDS) are supported only on Linux, Windows 10 (build 17063 and later), and Windows Server 2019 (update 1809 and later).\", nameof(EnableDnsOverHttpsUnixSocket));\n                }\n\n                _enableDnsOverHttpsUnixSocket = value;","sourceCodeStart":7617,"sourceCodeEnd":7653,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Dns/DnsServer.cs#L7617-L7653","documentation":"Thrown by the EnableDnsOverHttpUnixSocket setter (a bool) when set to true on a platform that does not support Unix Domain Sockets. The check delegates to IsUnixDomainSocketSupported(), which returns true only on Linux, Windows 10 build 17063+, or Windows Server 2019 update 1809+. On older Windows builds, setting this true raises ArgumentException. This is a platform capability gate, not a numeric range.","triggerScenarios":"Assigning DnsServer.EnableDnsOverHttpUnixSocket = true on an unsupported OS (e.g. Windows Server 2016, older Windows 10). Reached via the settings API enabling the DoH-over-UDS option, or a config restored on such a platform.","commonSituations":"Enabling UDS for DNS-over-HTTP on a Windows box older than 17063/Server 2019. Copying a Linux-oriented config to an older Windows host. Running the server in a container whose base OS lacks UDS support.","solutions":["Run on a supported OS: Linux, Windows 10 17063+, or Windows Server 2019 1809+.","Leave EnableDnsOverHttpUnixSocket false on unsupported platforms and use TCP DoH instead.","Before enabling, call IsUnixDomainSocketSupported() (or replicate its check) to gate the feature.","Upgrade the host OS if UDS is a hard requirement."],"exampleFix":"// before\n_dnsServer.EnableDnsOverHttpUnixSocket = true; // throws on older Windows\n\n// after\nif (IsUnixDomainSocketSupported())\n    _dnsServer.EnableDnsOverHttpUnixSocket = true;\nelse\n    _dnsServer.EnableDnsOverHttp = true; // fall back to TCP DoH","handlingStrategy":"type-guard","validationCode":"if (_dnsServer.IsUnixDomainSocketSupported())\n    _dnsServer.EnableDnsOverHttpUnixSocket = true;\nelse\n    _dnsServer.EnableDnsOverHttpUnixSocket = false; // or fall back to TCP DoH","typeGuard":"// capability gate before enabling UDS-based DoH\nstatic bool CanEnableDohUnixSocket(DnsServer s) => s.IsUnixDomainSocketSupported();","tryCatchPattern":"try { _dnsServer.EnableDnsOverHttpUnixSocket = enable; }\ncatch (ArgumentException ex) when (ex.ParamName == nameof(DnsServer.EnableDnsOverHttpUnixSocket))\n{ _log.Warn(\"UDS unsupported on this OS; DoH over TCP only\"); _dnsServer.EnableDnsOverHttp = true; }","preventionTips":["Gate UDS features behind IsUnixDomainSocketSupported().","Prefer TCP DoH on older Windows.","Document the minimum OS versions for UDS in deployment notes."],"tags":["dns","uds","platform","dnsoverhttp","configuration","argumentexception"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}