如何使用C#重定向在浏览器中输入的网址? [英] How Can I Redirect Urls Entered In The Browser With C#?

查看:292
本文介绍了如何使用C#重定向在浏览器中输入的网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。

我想将浏览器中输入的网址重定向到PC上的页面?

例如当我输入http://microsoft.com时,它重定向到127.0.0.1:5000/webpage.html并显示此页面。我想对浏览器中输入的所有网站执行此操作。

Hi.
I want to redirect URLs entered in the browser to a page On PC?
for example when I enter "http://microsoft.com",it redirect to 127.0.0.1:5000/webpage.html and show this page. I want to do this for all website entered in the browser.

推荐答案

不要在客户端计算机上执行此操作。



您需要在网络上设置代理服务器。



配置所有客户端使用代理服务器,以便将他们的http请求发送到代理服务器。



然后,在代理服务器上,您可以为允许的内容和不允许的内容设置规则。



如果代理允许,它将转发请求到互联网,当它收到回复时,转发给客户。



显然,你需要锁定客户端,以便代理设置不能改变。



它们也是市场上大量基于硬件的过滤设备。
Do not do it on the client machine.

You need to set up a proxy server on the network.

Configure all clients to use the proxy server, so their http requests are sent to the proxy server.

Then, on the proxy server, you can set rules for what is allowed and what isn't.

If the proxy allows it, it will forward the request to the internet, and when it receives a response, forward that to the client.

Obviously, you need to lock down the clients, so that the proxy settings cannot be changed.

Their are loads of hardware based filtering devices in the market too.


这篇关于如何使用C#重定向在浏览器中输入的网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆