config.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <?php
  2. class config{
  3. // Welcome to the 4get configuration file
  4. // When updating your instance, please make sure this file isn't missing
  5. // any parameters.
  6. // 4get version. Please keep this updated
  7. const VERSION = 8;
  8. // Will be shown pretty much everywhere.
  9. const SERVER_NAME = "4get";
  10. // Will be shown in <meta> tag on home page
  11. const SERVER_SHORT_DESCRIPTION = "4get is a proxy search engine that doesn't suck.";
  12. // Will be shown in server list ping (null for no description)
  13. const SERVER_LONG_DESCRIPTION = null;
  14. // Add your own themes in "static/themes". Set to "Dark" for default theme.
  15. // Eg. To use "static/themes/Cream.css", specify "Cream".
  16. const DEFAULT_THEME = "Dark";
  17. // Enable the API?
  18. const API_ENABLED = true;
  19. //
  20. // BOT PROTECTION
  21. //
  22. // 0 = disabled, 1 = ask for image captcha, @TODO: 2 = invite only (users needs a pass)
  23. // VERY useful against a targetted attack
  24. const BOT_PROTECTION = 0;
  25. // if BOT_PROTECTION is set to 1, specify the available datasets here
  26. // images should be named from 1.png to X.png, and be 100x100 in size
  27. // Eg. data/captcha/birds/1.png up to 2263.png
  28. const CAPTCHA_DATASET = [
  29. // example:
  30. //["birds", 2263],
  31. //["fumo_plushies", 1006],
  32. //["minecraft", 848]
  33. ];
  34. // If this regex expression matches on the user agent, it blocks the request
  35. // Not useful at all against a targetted attack
  36. const HEADER_REGEX = '/bot|wget|curl|python-requests|scrapy|go-http-client|ruby|yahoo|spider|qwant/i';
  37. // Block clients who present any of the following headers in their request (SPECIFY IN !!lowercase!!)
  38. // Eg: ["x-forwarded-for", "x-via", "forwarded-for", "via"];
  39. // Useful for blocking *some* proxies used for botting
  40. const FILTERED_HEADER_KEYS = [
  41. //"x-forwarded-for",
  42. //"x-cluster-client-ip",
  43. //"x-client-ip",
  44. //"x-real-ip",
  45. //"client-ip",
  46. //"real-ip",
  47. //"forwarded-for",
  48. //"forwarded-for-ip",
  49. //"forwarded",
  50. //"proxy-connection",
  51. //"remote-addr",
  52. //"via"
  53. ];
  54. // Block SSL ciphers used by CLI tools used for botting
  55. // Basically a primitive version of Cloudflare's browser integrity check
  56. // ** If curl can still access the site (with spoofed headers), please make sure you use the new apache2 config **
  57. // https://git.lolcat.ca/lolcat/4get/docs/apache2.md
  58. const DISALLOWED_SSL = [
  59. // "TLS_AES_256_GCM_SHA384" // used by WGET and CURL
  60. ];
  61. // Maximal number of searches per captcha key/pass issued. Counter gets
  62. // reset on every APCU cache clear (should happen once a day).
  63. // Only useful when BOT_PROTECTION is NOT set to 0
  64. const MAX_SEARCHES = 100;
  65. // List of domains that point to your servers. Include your tor/i2p
  66. // addresses here! Must be a valid URL. Won't affect links placed on
  67. // the homepage.
  68. const ALT_ADDRESSES = [
  69. //"https://4get.alt-tld",
  70. //"http://4getwebfrq5zr4sxugk6htxvawqehxtdgjrbcn2oslllcol2vepa23yd.onion"
  71. ];
  72. // Known 4get instances. MUST use the https protocol if your instance uses
  73. // it. Is used to generate a distributed list of instances.
  74. // To appear in the list of an instance, contact the host and if everyone added
  75. // eachother your serber should appear everywhere.
  76. const INSTANCES = [
  77. "https://4get.ca",
  78. "https://4get.zzls.xyz",
  79. "https://4getus.zzls.xyz",
  80. "https://4get.silly.computer",
  81. "https://4get.konakona.moe",
  82. "https://4get.lvkaszus.pl",
  83. "https://4g.ggtyler.dev",
  84. "https://4get.perennialte.ch",
  85. "https://4get.sijh.net",
  86. "https://4get.hbubli.cc",
  87. "https://4get.plunked.party",
  88. "https://4get.seitan-ayoub.lol",
  89. "https://4get.etenie.pl",
  90. "https://4get.lunar.icu",
  91. "https://4get.dcs0.hu",
  92. "https://4get.kizuki.lol",
  93. "https://4get.psily.garden",
  94. "https://search.milivojevic.in.rs",
  95. "https://4get.snine.nl",
  96. "https://4get.datura.network",
  97. "https://4get.neco.lol",
  98. "https://4get.lol",
  99. "https://4get.ch",
  100. "https://4get.edmateo.site",
  101. "https://4get.sudovanilla.org",
  102. "https://search.mint.lgbt"
  103. ];
  104. // Default user agent to use for scraper requests. Sometimes ignored to get specific webpages
  105. // Changing this might break things.
  106. const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0";
  107. // Proxy pool assignments for each scraper
  108. // false = Use server's raw IP
  109. // string = will load a proxy list from data/proxies
  110. // Eg. "onion" will load data/proxies/onion.txt
  111. const PROXY_DDG = false; // duckduckgo
  112. const PROXY_BRAVE = false;
  113. const PROXY_FB = false; // facebook
  114. const PROXY_GOOGLE = false;
  115. const PROXY_GOOGLE_CSE = false;
  116. const PROXY_STARTPAGE = false;
  117. const PROXY_QWANT = false;
  118. const PROXY_GHOSTERY = false;
  119. const PROXY_MARGINALIA = false;
  120. const PROXY_MOJEEK = false;
  121. const PROXY_SC = false; // soundcloud
  122. const PROXY_SPOTIFY = false;
  123. const PROXY_SOLOFIELD = false;
  124. const PROXY_WIBY = false;
  125. const PROXY_CURLIE = false;
  126. const PROXY_YT = false; // youtube
  127. const PROXY_YEP = false;
  128. const PROXY_PINTEREST = false;
  129. const PROXY_SEZNAM = false;
  130. const PROXY_NAVER = false;
  131. const PROXY_GREPPR = false;
  132. const PROXY_CROWDVIEW = false;
  133. const PROXY_MWMBL = false;
  134. const PROXY_FTM = false; // findthatmeme
  135. const PROXY_IMGUR = false;
  136. const PROXY_YANDEX_W = false; // yandex web
  137. const PROXY_YANDEX_I = false; // yandex images
  138. const PROXY_YANDEX_V = false; // yandex videos
  139. //
  140. // Scraper-specific parameters
  141. //
  142. // GOOGLE CSE
  143. const GOOGLE_CX_ENDPOINT = "d4e68b99b876541f0";
  144. // MARGINALIA
  145. // Use "null" to default out to HTML scraping OR specify a string to
  146. // use the API (Eg: "public"). API has less filters.
  147. const MARGINALIA_API_KEY = null;
  148. }