从客户端机器中获取FQDN(完全合格的域名)

发布于 2025-01-30 12:39:34 字数 352 浏览 3 评论 0原文

我正在研究一个将Windows平板电脑作为终端的项目,它们将在VPN下。设置平板电脑将不是我们的工作,我们只需要为它们提供一些端点,我们需要使用其FQDN对其进行验证。该项目是.NET5 Web API。

以前的要求是,我们将使用终端的IP地址对其进行身份验证,我可以轻松地使用此代码来获取它:

var remoteIpAddress = HttpContext.Connection.RemoteIpAddress?.ToString();

但是请求已更改,我们需要使用FQDN进行身份验证。 问题是我无法从HTTP上下文中获得FQDN,因为我可以使用IP地址。

有什么方法可以从设备获取此参数?

I'm working on a project that will include Windows tablets as a Terminals and they will be under VPN. Setting up the tablets will not be our job, we only need to provide some endpoints for them and we'll need to authenticate the API calls from them with their FQDN. The project is .net5 Web API.

Previously the requirement was that we will use the IP address of the terminals for authenticating them and I can easily use this code for getting that:

var remoteIpAddress = HttpContext.Connection.RemoteIpAddress?.ToString();

However the request was changed and we will need to use FQDN for authentication.
The problem is that I can not get FQDN from HTTP Context as I can take the IP address.

Is there any way to get this parameter from the device?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文