强制应用程序使用正在运行的计算机上的特定 IP 地址

发布于 2024-12-19 05:02:07 字数 181 浏览 2 评论 0原文

我有一台服务器(服务器 A),有多个公共 IP 地址。我正在构建一个桌面应用程序,该应用程序将在服务器 A 上运行,以使用 httpwebrequest 类从另一台服务器(服务器 B)获取数据。

我想要做的是能够以编程方式引导应用程序使用服务器 (A) 拥有的特定 IP 地址。

这可能吗?

I have a server (server A) that has several public IP addresses. I am building a desktop application that will run on server A to fetch data from another server (server B) using the httpwebrequest class.

What I would like to do is be able to programatically direct the application to use a specific IP address from the one the server (A) has.

Is this possible?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夏尔 2024-12-26 05:02:07

如何更改 HttpWebRequest 中的原始 IP

查看该帖子,看起来像您所问的确切问题和答案:) 干杯!

how to change originating IP in HttpWebRequest

Check out that post, looks like the exact question and answer you are asking :) cheers!

落在眉间の轻吻 2024-12-26 05:02:07

这是由操作系统中的网络配置控制的。研究使用路由指标,以便所需的 IP 接口以到达目的地的最低成本路径显示。

This is a controlled by the networking configuration in the operating system. Look into using routing metrics so that the desired IP interface shows up with the least cost path to your destination.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文