Isitblockedinrussia.com
This service parses github.com/zapret-info and displays info about blocked sites in Russia
Install / Use
/learn @denull/Isitblockedinrussia.comREADME
isitblockedinrussia.com
This is the source code of isitblockedinrussia.com — a service for checking if a domain or an IP address is currently blocked in Russia. Feel free to reuse it.
Usage
Information about blocked resources is downloaded from https://github.com/zapret-info/z-i and stored to MySQL database locally.
Install MySQL and create following tables:
CREATE TABLE `blocked` (
`ip` varchar(18) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`ip_first` int(10) unsigned DEFAULT NULL,
`ip_last` int(10) unsigned DEFAULT NULL,
`length` int(11) DEFAULT NULL,
`decision_date` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`decision_org` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`decision_num` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`domain` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`url` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
KEY `ip_first` (`ip_first`),
KEY `ip_last` (`ip_last`),
KEY `domain` (`domain`(191)),
KEY `url` (`url`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `checks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`query` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`url` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`domain` varchar(1024) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`ips` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_blocked` int(11) DEFAULT NULL,
`blocks` varchar(4096) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`checked_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Now create directory config and place a file named mysql.php in it:
<?php
$db_host = 'localhost';
$db_user = 'username';
$db_pass = 'password';
$db_name = 'database';
To download the registry of blocked sites (and store them to 'blocked' table), use lib/update.php. You can add it as a cron job, for example (normally it should take about 1 minute). As of April 25, 2018 the table will contain about ~280k rows afterwards.
The web interface is webroot/index.php. If you wish to check if a site is blocked from your code, you can include lib/check.php and call checkHost($query).
Related Skills
node-connect
352.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
