renge/sbruder.xyz: Add censorship infrastructure

I don’t want to do this, but I might have to. Hetzner’s ToS are very
vague in what content they don’t allow, so I think I might have to
comply with the Russian censorship authority.
nazuna
Simon Bruder 2023-04-29 09:41:00 +02:00
parent bdbcbd2a0b
commit 4880116919
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
5 changed files with 154 additions and 0 deletions

View File

@ -0,0 +1,59 @@
# I dont do this, because I want to.
# I think I might have to do this because of § 8.2 of Hetzners ToS.
{ config, lib, ... }:
let
serviceBlocks = {
nitter = [
{ path = "/ks1v/status/1439866313476689924"; report = "2023-04-21-Hetzner-C591581F-ROSKOMNADZOR.txt"; }
];
iv = [
{ video = "NR57D2UVqm4"; report = "2023-04-28-Hetzner-C633C02D-ROSKOMNADZOR.txt"; }
];
libreddit = [
];
};
in
{
services.nginx.virtualHosts = lib.mapAttrs'
(domain: blocks: lib.nameValuePair "${domain}.sbruder.xyz" {
locations = lib.listToAttrs
(map
(block:
let
# workaround for nginx dropping parent headers
# see https://github.com/yandex/gixy/blob/master/docs/en/plugins/addheaderredefinition.md
parentHeaders = lib.concatStringsSep "\n" (lib.filter
(lib.hasPrefix "add_header ")
(lib.splitString "\n" config.services.nginx.commonHttpConfig));
transparency_url = "https://sbruder.xyz/transparency/${block.report}";
return_statement = ''
${parentHeaders}
add_header Link "<${transparency_url}>; rel=blocked-by" always;
add_header Content-Type text/html always;
return 451 '<html><head><title>451 Unavailable For Legal Reasons</title></head><body><center><h1>451 Unavailable For Legal Reasons</h1><p><a href="${transparency_url}">Transparency</a></p></center><hr><center>nginx</center></body></html>';
'';
path =
if block ? "path"
then block.path
else
(if block ? "video"
then "/" # not pretty, but I dont know how to do this differently
else throw "invalid block");
location_block =
if block ? "video"
then {
extraConfig = ''
if ($arg_v = ${block.video}) {
${return_statement}
}
'';
}
else { extraConfig = return_statement; };
in
lib.nameValuePair
path
location_block)
blocks);
})
serviceBlocks;
}

View File

@ -1,6 +1,10 @@
{ pkgs, ... }:
{
imports = [
./blocks.nix
];
services.nginx.virtualHosts."sbruder.xyz" = {
forceSSL = true;
enableACME = true;
@ -35,6 +39,13 @@
locations = {
"/imprint/".alias = "${pkgs.sbruder.imprint}/";
"/transparency/" = {
alias = "${./transparency}/";
extraConfig = ''
autoindex on;
charset utf-8;
'';
};
};
};
}

View File

@ -54,6 +54,14 @@ You can export or delete that data by using its built-in data control feature.
In the case of an error, details of the problematic request might be stored on the server
and used strictly for debugging and fixing the error.
## Transparency
For transparency reasons,
you can find all take down requests [here](/transparency/).
I was not sure if the reported content could be seen as violating Hetzners ToS,
and therefore complied, even though I dont want to support the authority asking for removal.
#### Fine Print
<small>

View File

@ -0,0 +1,38 @@
Направляется уведомление о внесении в «Единый реестр доменных имен, указателей страниц сайтов в сети «Интернет» и сетевых адресов, позволяющих идентифицировать сайты в сети «Интернет», содержащие информацию, распространение которой в Российской Федерации запрещено» следующего(их) указателя (указателей) страницы (страниц) сайта в сети «Интернет»: https://nitter.sbruder.xyz/ks1v/status/1439866313476689924 .
В случае непринятия провайдером хостинга и (или) владельцем сайта мер по удалению запрещенной информации и (или) ограничению доступа к сайту в сети «Интернет», будет принято решение о включении в единый реестр сетевого адреса, позволяющего идентифицировать сайт в сети «Интернет», содержащий информацию, распространение которой в Российской Федерации запрещено, а доступ к нему будет ограничен.
Сведения о включении доменных имен, указателей страниц сайтов сети «Интернет» и сетевых адресов доступны круглосуточно в сети «Интернет» по адресу http://eais.rkn.gov.ru .
С уважением,
ФЕДЕРАЛЬНАЯ СЛУЖБА ПО НАДЗОРУ В СФЕРЕ СВЯЗИ, ИНФОРМАЦИОННЫХ ТЕХНОЛОГИЙ И МАССОВЫХ КОММУНИКАЦИЙ.
-----------------------------------------------------------
Запущено официальное мобильное приложение РОСКОМНАДЗОРА.
Посредством мобильного приложения возможно:
1. Подать жалобу в «Единый реестр запрещенной информации» на обнаруженный в сети «Интернет» запрещенный контент;
2. Проверить ограничение доступа к интернет-ресурсам;
3. Получить оповещение о внесении в «Единый реестр запрещенной информации» интернет-ресурса в случае, если Вы являетесь его владельцем или провайдером хостинга.
Мобильное приложение можно скачать по следующим ссылкам:
https://apps.apple.com/ru/app/ркн/id1511970611
https://play.google.com/store/apps/details?id=org.rkn.ermp
It is notice of making an entry into the "Unified register of domain names, Internet web-site page links and network addresses enabling to identify the Internet web-sites containing the information prohibited for public distribution in the Russian Federation” the Internet web-site page (s) link (s): https://nitter.sbruder.xyz/ks1v/status/1439866313476689924 .
In case the hosting provider and (or) the Internet web-site owner fail to take these measures, the network address enabling to identify Internet web-sites containing the information prohibited for distribution in the Russian Federation will be decided to be entered into the Register and access will be limited.
The information about entering the domain names, Internet web-site page links and network addresses into the Register shall be available on a 24-hour basis at the following Internet address: http://eais.rkn.gov.ru/en/ .
Federal Service for Supervision in the Sphere of Telecom, Information Technologies and Mass Communications (ROSKOMNADZOR).
-----------------------------------------------------------
The official mobile application of ROSKOMNADZOR has been launched.
Through the mobile application, it is possible to:
1. Submit a complaint to the "Unified Register of Prohibited Information" about the prohibited content revealed on the Internet;
2. Check the restriction of access to Internet resources;
3. Get a notification on inclusion of an Internet resource into the" Unified Register of Prohibited Information " if you are its owner or hosting provider.
The mobile app can be downloaded at the following links:
https://apps.apple.com/ru/app/ркн/id1511970611
https://play.google.com/store/apps/details?id=org.rkn.ermp

View File

@ -0,0 +1,38 @@
Направляется уведомление о внесении в «Единый реестр доменных имен, указателей страниц сайтов в сети «Интернет» и сетевых адресов, позволяющих идентифицировать сайты в сети «Интернет», содержащие информацию, распространение которой в Российской Федерации запрещено» следующего(их) указателя (указателей) страницы (страниц) сайта в сети «Интернет»: https://iv.sbruder.xyz/watch?v=NR57D2UVqm4 .
В случае непринятия провайдером хостинга и (или) владельцем сайта мер по удалению запрещенной информации и (или) ограничению доступа к сайту в сети «Интернет», будет принято решение о включении в единый реестр сетевого адреса, позволяющего идентифицировать сайт в сети «Интернет», содержащий информацию, распространение которой в Российской Федерации запрещено, а доступ к нему будет ограничен.
Сведения о включении доменных имен, указателей страниц сайтов сети «Интернет» и сетевых адресов доступны круглосуточно в сети «Интернет» по адресу http://eais.rkn.gov.ru .
С уважением,
ФЕДЕРАЛЬНАЯ СЛУЖБА ПО НАДЗОРУ В СФЕРЕ СВЯЗИ, ИНФОРМАЦИОННЫХ ТЕХНОЛОГИЙ И МАССОВЫХ КОММУНИКАЦИЙ.
-----------------------------------------------------------
Запущено официальное мобильное приложение РОСКОМНАДЗОРА.
Посредством мобильного приложения возможно:
1. Подать жалобу в «Единый реестр запрещенной информации» на обнаруженный в сети «Интернет» запрещенный контент;
2. Проверить ограничение доступа к интернет-ресурсам;
3. Получить оповещение о внесении в «Единый реестр запрещенной информации» интернет-ресурса в случае, если Вы являетесь его владельцем или провайдером хостинга.
Мобильное приложение можно скачать по следующим ссылкам:
https://apps.apple.com/ru/app/ркн/id1511970611
https://play.google.com/store/apps/details?id=org.rkn.ermp
It is notice of making an entry into the "Unified register of domain names, Internet web-site page links and network addresses enabling to identify the Internet web-sites containing the information prohibited for public distribution in the Russian Federation” the Internet web-site page (s) link (s): https://iv.sbruder.xyz/watch?v=NR57D2UVqm4 .
In case the hosting provider and (or) the Internet web-site owner fail to take these measures, the network address enabling to identify Internet web-sites containing the information prohibited for distribution in the Russian Federation will be decided to be entered into the Register and access will be limited.
The information about entering the domain names, Internet web-site page links and network addresses into the Register shall be available on a 24-hour basis at the following Internet address: http://eais.rkn.gov.ru/en/ .
Federal Service for Supervision in the Sphere of Telecom, Information Technologies and Mass Communications (ROSKOMNADZOR).
-----------------------------------------------------------
The official mobile application of ROSKOMNADZOR has been launched.
Through the mobile application, it is possible to:
1. Submit a complaint to the "Unified Register of Prohibited Information" about the prohibited content revealed on the Internet;
2. Check the restriction of access to Internet resources;
3. Get a notification on inclusion of an Internet resource into the" Unified Register of Prohibited Information " if you are its owner or hosting provider.
The mobile app can be downloaded at the following links:
https://apps.apple.com/ru/app/ркн/id1511970611
https://play.google.com/store/apps/details?id=org.rkn.ermp