kdbx update & support for www
This commit is contained in:
parent
51b3cb4fc9
commit
966d2a1468
Binary file not shown.
|
@ -16,6 +16,8 @@
|
|||
127.0.0.1 twitter.com
|
||||
127.0.0.1 google.cz
|
||||
127.0.0.1 www.google.cz
|
||||
127.0.0.1 youtu.be
|
||||
127.0.0.1 www.youtu.be
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 ip6-localhost ip6-loopback
|
||||
|
|
|
@ -28,10 +28,18 @@ $nitter_instances = [
|
|||
'https://nitter.snopyta.org',
|
||||
];
|
||||
|
||||
$host_parts = explode('.', $host);
|
||||
|
||||
$host = ($host_parts[0] === 'www') ? $host_parts[1] . '.' . $host_parts[2] : $host_parts[0] . '.' . $host_parts[1];
|
||||
|
||||
switch ($host) {
|
||||
case 'youtube.com':
|
||||
redirect($invidious_instances[random_int(0, count($invidious_instances) - 1)], $_SERVER['REQUEST_URI']);
|
||||
break;
|
||||
case 'youtu.be':
|
||||
$request_uri = '/watch?v=' . substr($_SERVER['REQUEST_URI'], 1);
|
||||
redirect($invidious_instances[random_int(0, count($invidious_instances) - 1)], $request_uri);
|
||||
break;
|
||||
case 'pastebin.com':
|
||||
redirect($privatebin_instances[random_int(0, count($privatebin_instances) - 1)]);
|
||||
break;
|
||||
|
@ -56,3 +64,4 @@ switch ($host) {
|
|||
}
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ sudo ifconfig wlp3s0 up
|
|||
#Connect to wireguard server
|
||||
sudo wg quick up contabo
|
||||
#Clear output
|
||||
clear
|
||||
echo Connect to the internet and press any key, system will be updated afterwards.
|
||||
#Wait for input
|
||||
read dummy
|
||||
|
|
Loading…
Reference in New Issue