config.php.example 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?php
  2. return (object) array(
  3. // e.g.: fr -> https://google.fr/
  4. "google_domain" => "com",
  5. // Results will be in this language
  6. "language" => "",
  7. "number_of_results" => 10,
  8. // The default theme css to use
  9. // use `ls --ignore={styles,auto}.css static/css | cut -d. -f1` to list valid themes
  10. "default_theme" => "dark",
  11. // You can use any Invidious instance here
  12. "invidious_instance_for_video_results" => "https://invidious.snopyta.org",
  13. "disable_bittorrent_search" => false,
  14. "bittorrent_trackers" => "&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce",
  15. "disable_hidden_service_search" => false,
  16. // Fallback to another librex instance if google search fails
  17. // This may greatly increase the time it takes to get a result, if a direct search is not possible
  18. "instance_fallback" => true,
  19. // how long in minutes to put google/other instances on cooldown if they aren't responding
  20. "request_cooldown" => 25,
  21. // how long in minutes to store results for in the cache
  22. "cache_time" => 20,
  23. // Disable requests to /api.php - HIGHLY recommended to keep this at false, this is what allows LibreY to still show results when Google/DuckDuckGo blocks the requests.
  24. "disable_api" => false,
  25. // whether to show where the result is from on the results page
  26. "show_result_source" => true,
  27. /*
  28. Preset privacy friendly frontends for users, these can be overwritten by users in the settings
  29. e.g.: Preset the invidious instance URL: "instance_url" => "https://yewtu.be",
  30. */
  31. "frontends" => array(
  32. "invidious" => array(
  33. "instance_url" => "",
  34. "project_url" => "https://docs.invidious.io/instances/",
  35. "original_name" => "YouTube",
  36. "original_url" => "youtube.com"
  37. ),
  38. "rimgo" => array(
  39. "instance_url" => "",
  40. "project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances",
  41. "original_name" => "Imgur",
  42. "original_url" => "imgur.com"
  43. ),
  44. "scribe" => array(
  45. "instance_url" => "",
  46. "project_url" => "https://git.sr.ht/~edwardloveall/scribe/tree/main/docs/instances.md",
  47. "original_name" => "Medium",
  48. "original_url" => "medium.com"
  49. ),
  50. "gothub" => array(
  51. "instance_url" => "",
  52. "project_url" => "https://codeberg.org/gothub/gothub#instances",
  53. "original_name" => "GitHub",
  54. "original_url" => "github.com"
  55. ),
  56. "nitter" => array(
  57. "instance_url" => "",
  58. "project_url" => "https://github.com/zedeus/nitter/wiki/Instances",
  59. "original_name" => "Twitter",
  60. "original_url" => "twitter.com"
  61. ),
  62. "redlib" => array(
  63. "instance_url" => "",
  64. "project_url" => "https://github.com/redlib-org/redlib-instances/blob/main/instances.md",
  65. "original_name" => "Reddit",
  66. "original_url" => "reddit.com"
  67. ),
  68. "proxitok" => array(
  69. "instance_url" => "",
  70. "project_url" => "https://github.com/pablouser1/ProxiTok/wiki/Public-instances",
  71. "original_name" => "TikTok",
  72. "original_url" => "tiktok.com"
  73. ),
  74. "wikiless" => array(
  75. "instance_url" => "",
  76. "project_url" => "https://github.com/Metastem/wikiless#instances",
  77. "original_name" => "Wikipedia",
  78. "original_url" => "wikipedia.org"
  79. ),
  80. "quetre" => array(
  81. "instance_url" => "",
  82. "project_url" => "https://github.com/zyachel/quetre#instances",
  83. "original_name" => "Quora",
  84. "original_url" => "quora.com"
  85. ),
  86. "libremdb" => array(
  87. "instance_url" => "",
  88. "project_url" => "https://github.com/zyachel/libremdb#instances",
  89. "original_name" => "IMDb",
  90. "original_url" => "imdb.com"
  91. ),
  92. "breezewiki" => array(
  93. "instance_url" => "",
  94. "project_url" => "https://docs.breezewiki.com/Links.html",
  95. "original_name" => "Fandom",
  96. "original_url" => "fandom.com"
  97. ),
  98. "anonymousoverflow" => array(
  99. "instance_url" => "",
  100. "project_url" => "https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances",
  101. "original_name" => "StackOverflow",
  102. "original_url" => "stackoverflow.com"
  103. ),
  104. "suds" => array(
  105. "instance_url" => "",
  106. "project_url" => "https://git.vern.cc/cobra/Suds/src/branch/main/instances.json",
  107. "original_name" => "Snopes",
  108. "original_url" => "snopes.com"
  109. ),
  110. "biblioreads" => array(
  111. "instance_url" => "",
  112. "project_url" => "https://github.com/nesaku/BiblioReads#instances",
  113. "original_name" => "Goodreads",
  114. "original_url" => "goodreads.com"
  115. )
  116. ),
  117. "preferred_engines" => array(
  118. /* search engine to use to search, auto will automatically balance between all scrapers, which is recommended. */
  119. "text" => "auto"
  120. // "text" => "google"
  121. // "text" => "duckduckgo"
  122. ),
  123. /*
  124. To send requests through a proxy uncomment CURLOPT_PROXY and CURLOPT_PROXYTYPE:
  125. CURLOPT_PROXYTYPE options:
  126. CURLPROXY_HTTP
  127. CURLPROXY_SOCKS4
  128. CURLPROXY_SOCKS4A
  129. CURLPROXY_SOCKS5
  130. CURLPROXY_SOCKS5_HOSTNAME
  131. !!! ONLY CHANGE THE OTHER OPTIONS IF YOU KNOW WHAT YOU ARE DOING !!!
  132. */
  133. "curl_settings" => array(
  134. // CURLOPT_PROXY => "ip:port",
  135. // CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
  136. CURLOPT_RETURNTRANSFER => true,
  137. CURLOPT_ENCODING => "",
  138. CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:116.0) Gecko/20100101 Firefox/116.0", // For a normal Windows 10 PC running Firefox x64
  139. CURLOPT_IPRESOLVE => CURL_IPRESOLVE_WHATEVER,
  140. CURLOPT_CUSTOMREQUEST => "GET",
  141. CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
  142. CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
  143. CURLOPT_MAXREDIRS => 5,
  144. CURLOPT_TIMEOUT => 3,
  145. CURLOPT_VERBOSE => false,
  146. CURLOPT_FOLLOWLOCATION => true
  147. )
  148. );
  149. ?>