diff options
author | lolcat <will@lolcat.ca> | 2023-11-07 08:04:56 -0500 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2023-11-07 08:04:56 -0500 |
commit | 785452873f0ee0a27fc157b482b7551560f0282d (patch) | |
tree | 4c70e240031ed3868425ca683c83ebfd378a9159 /data | |
parent | 64b090ee058953aed2246967332c7f0b6623cd8f (diff) |
fix typo
Diffstat (limited to 'data')
-rw-r--r-- | data/config.php | 103 | ||||
-rw-r--r-- | data/instances.php | 62 | ||||
-rw-r--r-- | data/proxies/.gitignore | 3 | ||||
-rw-r--r-- | data/proxies/onion.txt | 13 |
4 files changed, 119 insertions, 62 deletions
diff --git a/data/config.php b/data/config.php new file mode 100644 index 0000000..f2ca214 --- /dev/null +++ b/data/config.php @@ -0,0 +1,103 @@ +<?php +class config{ + // Welcome to the 4get configuration file + // When updating your instance, please make sure this file isn't missing + // any parameters. + + // 4get version. Please keep this updated + const VERSION = 5; + + // Will be shown pretty much everywhere. + const SERVER_NAME = "4get"; + + // Will be shown in <meta> tag on home page + const SERVER_SHORT_DESCRIPTION = "They live in our walls!"; + + // Will be shown in server list ping (null for no description) + const SERVER_LONG_DESCRIPTION = null; + + // Add your own themes in "static/themes". Set to "Dark" for default theme. + // Eg. To use "static/themes/Cream.css", specify "Cream". + const DEFAULT_THEME = "Dark"; + + // Enable the API? + const API_ENABLED = true; + + // Bot protection + // 4get.ca has been hit with 250k bot reqs every single day for months + // you probably want to enable this if your instance is public... + // 0 = disabled + // 1 = ask for image captcha (requires image dataset & imagick 6.9.11-60) + // @TODO: 2 = invite only (users needs a pass) + const BOT_PROTECTION = 0; + + // if BOT_PROTECTION is set to 1, specify the available datasets here + // images should be named from 1.png to X.png, and be 100x100 in size + // Eg. data/captcha/birds/1.png up to 2263.png + const CAPTCHA_DATASET = [ + // example: + // ["birds", 2263], + // ["fumo_plushies", 1006], + // ["minecraft", 848] + ]; + + // List of domains that point to your servers. Include your tor/i2p + // addresses here! Must be a valid URL. Won't affect links placed on + // the homepage. + const ALT_ADDRESSES = [ + //"https://4get.alt-tld", + //"http://4getwebfrq5zr4sxugk6htxvawqehxtdgjrbcn2oslllcol2vepa23yd.onion" + ]; + + // Known 4get instances. MUST use the https protocol if your instance uses + // it. Is used to generate a distributed list of instances. + // To appear in the list of an instance, contact the host and if everyone added + // eachother your serber should appear everywhere. + const INSTANCES = [ + "https://4get.ca", + "https://4get.zzls.xyz", + "https://4get.silly.computer", + "https://4g.opnxng.com", + "https://4get.konakona.moe" + ]; + + // Default user agent to use for scraper requests. Sometimes ignored to get specific webpages + // Changing this might break things. + const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0"; + + // Proxy pool assignments for each scraper + // false = Use server's raw IP + // string = will load a proxy list from data/proxies + // Eg. "onion" will load data/proxies/onion.txt + const PROXY_DDG = false; // duckduckgo + const PROXY_BRAVE = false; + const PROXY_FB = false; // facebook + const PROXY_GOOGLE = false; + const PROXY_MARGINALIA = false; + const PROXY_MOJEEK = false; + const PROXY_SC = false; // soundcloud + const PROXY_WIBY = false; + const PROXY_YT = false; // youtube + const PROXY_YEP = false; + const PROXY_PINTEREST = false; + const PROXY_FTM = false; // findthatmeme + const PROXY_IMGUR = false; + const PROXY_YANDEX_W = false; // yandex web + const PROXY_YANDEX_I = false; // yandex images + const PROXY_YANDEX_V = false; // yandex videos + + // + // Scraper-specific parameters + // + + // SOUNDCLOUD + // Get these parameters by making a search on soundcloud with network + // tab open, then filter URLs using "search?q=". (No need to login) + const SC_USER_ID = "143860-454480-469473-289775"; + const SC_CLIENT_TOKEN = "qwfvRfz8PCoa2NldZALK7hhZFIH24Wyx"; + + // MARGINALIA + // Get an API key by contacting the Marginalia.nu maintainer. The "public" key + // works but is almost always rate-limited. + const MARGINALIA_API_KEY = "public"; +} diff --git a/data/instances.php b/data/instances.php deleted file mode 100644 index d7c26e0..0000000 --- a/data/instances.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -// this file exists to separate instance data from the actual about page -// HTML, and to make it easier to add/modify instances cleanly. - -$instancelist = [ - [ - "name" => "lolcat's instance (master)", - "address" => [ - "uri" => "https://4get.ca/", - "displayname" => "4get.ca" - ], - "altaddresses" => [ - [ - // all these address blocks will be linked in parentheses - // e.g. 4get.ca (tor) (i2p) etc. - "uri" => "http://4getwebfrq5zr4sxugk6htxvawqehxtdgjrbcn2oslllcol2vepa23yd.onion", - "displayname" => "tor" - ] - ] - ], - [ - "name" => "zzls's Chilean instance", - "address" => [ - "uri" => "https://4get.zzls.xyz/", - "displayname" => "4get.zzls.xyz" - ], - "altaddresses" => [ - [ - "uri" => "http://4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion", - "displayname" => "tor" - ] - ] - ], - [ - "name" => "zzls's United States instance", - "address" => [ - "uri" => "https://4getus.zzls.xyz/", - "displayname" => "4getus.zzls.xyz" - ], - "altaddresses" => [ - [ - "uri" => "http://4getus.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion", - "displayname" => "tor" - ] - ] - ], - [ - "name" => "4get on a silly computer", - "address" => [ - "uri" => "https://4get.silly.computer", - "displayname" => "4get.silly.computer" - ], - "altaddresses" => [ - [ - "uri" => "https://4get.cynic.moe/", - "displayname" => "fallback domain" - ] - ] - ] -] -?> diff --git a/data/proxies/.gitignore b/data/proxies/.gitignore new file mode 100644 index 0000000..70fd2c3 --- /dev/null +++ b/data/proxies/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!onion.txt
\ No newline at end of file diff --git a/data/proxies/onion.txt b/data/proxies/onion.txt new file mode 100644 index 0000000..c9b03f0 --- /dev/null +++ b/data/proxies/onion.txt @@ -0,0 +1,13 @@ +# Specify proxies by following this format:
+# <type>:<address>:<port>:<username>:<password>
+#
+# Examples:
+# https:1.3.3.7:6969:abcd:efg
+# socks4:1.2.3.4:8080::
+# raw_ip::::
+#
+# Available types:
+# raw_ip, http, https, socks4, socks5, socks4a, socks5_hostname
+
+# Local tor proxy
+socks5:localhost:9050::
|