📜 ⬆️ ⬇️

Block the block from Roskomnadzor

When once again you redirect to the page from the provider with a warning that access to the requested site is blocked, and you have to manually pull out the URL of the site, you think about automating this routine activity.

image

In my particular case, we will focus on blocking from Beeline. To get rid of its intrusiveness, we need a web server. Suitable installed on the local machine.
')
Beeline takes us to the blackhole.beeline.ru/?url= .... page, where the url variable contains our address in the coded urlencode form. Copying and decoding it each time with your hands is quite a boring thing, so we will try to use our evolutionary feature - the brain.

First you need to find the hosts file .
On Windows, it is located in% SystemRoot% \ system32 \ drivers \ etc \ hosts, in unix-like OS in / etc / hosts.
This file contains the correspondence between domains and IP addresses.

Add the line there: 127.0.0.1 blackhole.beeline.ru

As IP, you must specify the IP of any server that can replace us with a page issued by the provider.

Add this code to index.php on this server:

<?php if ($_GET['url']!=''){ $webProxy="http://www.webproxy.net/view?q="; print '<html><head><title>-! )</title><meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><body>'; print '-! )<br>'; print $_GET['url'] . '<br>'; print '<a href="'. $webProxy . urldecode($_GET['url']) . '">  web proxy</a>'; print "</body></html>"; exit; } ?> 

This code works if the url parameter is passed by the get method and does not interfere with the operation of the existing site.
The variable $ webProxy contains the address of the working web proxy.

The result: when the provider redirects to the warning page, we redirect to our page, which displays the URL of the site and offers to open it through a web proxy. Trifle, but greatly simplifies the process of surfing.

UPD:
By the way, maybe someone will put this script to his non-local server, and give IP to the general public?

Source: https://habr.com/ru/post/249315/


All Articles