强制应用程序使用正在运行的计算机上的特定 IP 地址
我有一台服务器(服务器 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技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如何更改 HttpWebRequest 中的原始 IP
查看该帖子,看起来像您所问的确切问题和答案:) 干杯!
how to change originating IP in HttpWebRequest
Check out that post, looks like the exact question and answer you are asking :) cheers!
这是由操作系统中的网络配置控制的。研究使用路由指标,以便所需的 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.