(array) srv_cfg; $bb_cfg['db'] = [ 'db' => [ // Don't change the settings here!!! Go to .env file env('DB_HOST', 'localhost'), env('DB_PORT', 3306), env('DB_DATABASE', 'torrentpier'), env('DB_USERNAME', 'root'), env('DB_PASSWORD'), 'utf8mb4', false ], ]; $bb_cfg['db_alias'] = [ 'log' => 'db', // BB_LOG 'search' => 'db', // BB_TOPIC_SEARCH 'sres' => 'db', // BB_BT_USER_SETTINGS, BB_SEARCH_RESULTS 'u_ses' => 'db', // BB_USER_SES, BB_USER_LASTVISIT 'dls' => 'db', // BB_BT_DLS_* 'ip' => 'db', // BB_POSTS_IP 'ut' => 'db', // BB_TOPICS_USER_POSTED 'pm' => 'db', // BB_PRIVMSGS, BB_PRIVMSGS_TEXT 'pt' => 'db', // BB_POSTS_TEXT ]; // Cache $bb_cfg['cache'] = [ 'db_dir' => realpath(BB_ROOT) . '/internal_data/cache/filecache/', 'prefix' => 'tp_', 'memcached' => [ 'host' => '127.0.0.1', 'port' => 11211, ], 'redis' => [ 'host' => '127.0.0.1', 'port' => 6379, 'pconnect' => !PHP_ZTS, // Redis pconnect supported only for non-thread safe compilations of PHP ], // Available cache types: filecache, memcached, sqlite, redis, apcu (filecache by default) 'engines' => [ 'bb_cache' => ['filecache'], 'bb_config' => ['filecache'], 'tr_cache' => ['filecache'], 'session_cache' => ['filecache'], 'bb_cap_sid' => ['filecache'], 'bb_login_err' => ['filecache'], 'bb_poll_data' => ['filecache'], 'bb_ip2countries' => ['filecache'], ], ]; // Datastore // Available datastore types: filecache, memcached, sqlite, redis, apcu (filecache by default) $bb_cfg['datastore_type'] = 'filecache'; // Server $bb_cfg['server_name'] = $domain_name = !empty($_SERVER['SERVER_NAME']) ? idn_to_utf8($_SERVER['SERVER_NAME']) : $reserved_name; $bb_cfg['server_port'] = !empty($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : $reserved_port; $bb_cfg['script_path'] = '/'; // The path where FORUM is located relative to the domain name // GZip $bb_cfg['gzip_compress'] = false; // Compress output // Tracker $bb_cfg['announce_interval'] = 1800; // Announce interval (default: 1800) $bb_cfg['scrape_interval'] = 300; // Scrape interval (default: 300) $bb_cfg['max_scrapes'] = 150; // Allowed number of info-hashes for simultaneous scraping, only not cached info-hashes will abide by these limits (default: 150) $bb_cfg['passkey_key'] = 'uk'; // Passkey key name in GET request $bb_cfg['ignore_reported_ip'] = false; // Ignore IP reported by client $bb_cfg['verify_reported_ip'] = true; // Verify IP reported by client against $_SERVER['HTTP_X_FORWARDED_FOR'] $bb_cfg['allow_internal_ip'] = false; // Allow internal IP (10.xx.. etc.) $bb_cfg['disallowed_ports'] = [ // https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/c64275f0b5dcb3c4c845d5204871adfe24f359d6/app/Http/Controllers/AnnounceController.php#L53 // Hyper Text Transfer Protocol (HTTP) - port used for web traffic 8080, 8081, // Kazaa - peer-to-peer file sharing, some known vulnerabilities, and at least one worm (Benjamin) targeting it. 1214, // IANA registered for Microsoft WBT Server, used for Windows Remote Desktop and Remote Assistance connections 3389, // eDonkey 2000 P2P file sharing service. http://www.edonkey2000.com/ 4662, // Gnutella (FrostWire, Limewire, Shareaza, etc.), BearShare file sharing app 6346, 6347, // Port used by p2p software, such as WinMX, Napster. 6699, ]; $bb_cfg['client_ban'] = [ 'enabled' => false, 'only_allow_mode' => false, // Clients to be blocked / allowed (in "only allow mode"), for example, peer id '-UT' will block all uTorrent clients, '-UT2' will block builds starting with 2 (default: false) // The second argument is being shown in the torrent client as a failure message // Handy client list: https://github.com/transmission/transmission/blob/f85c3b6f8db95d5363f6ec38eee603f146c6adb6/libtransmission/clients.cc#L504 'clients' => [ // 'client_id' => 'Ban reason (can be empty)' '-UT' => 'uTorrent — NOT ad-free and open-source', '-MG' => 'Mostly leeching client', '-ZO' => '', ] ]; // TorrentPier updater settings $bb_cfg['tp_updater_settings'] = [ 'enabled' => true, 'allow_pre_releases' => false ]; // TorrServer integration $bb_cfg['torr_server'] = [ // Read more: https://github.com/YouROK/TorrServer 'enabled' => false, 'url' => "http://$domain_name:8090", 'timeout' => 5, 'disable_for_guest' => true ]; // FreeIPAPI settings $bb_cfg['ip2country_settings'] = [ // Documentation: https://docs.freeipapi.com/ 'enabled' => true, 'endpoint' => 'https://freeipapi.com/api/json/', 'api_token' => '', // not required for basic usage ]; // FAQ url help link $bb_cfg['how_to_download_url_help'] = 'viewtopic.php?t=1'; // How to download? $bb_cfg['what_is_torrent_url_help'] = 'viewtopic.php?t=2'; // What is a torrent? $bb_cfg['ratio_url_help'] = 'viewtopic.php?t=3'; // Rating and limits $bb_cfg['search_help_url'] = 'viewtopic.php?t=4'; // Help doc about performing basic searches // Torrents $bb_cfg['bt_min_ratio_allow_dl_tor'] = 0.3; // 0 - disable $bb_cfg['bt_min_ratio_warning'] = 0.6; // 0 - disable $bb_cfg['show_dl_status_in_search'] = true; $bb_cfg['show_dl_status_in_forum'] = true; $bb_cfg['show_tor_info_in_dl_list'] = true; $bb_cfg['allow_dl_list_names_mode'] = true; // Null ratio $bb_cfg['ratio_null_enabled'] = true; $bb_cfg['ratio_to_null'] = $bb_cfg['bt_min_ratio_allow_dl_tor']; // 0.3 // Days to keep torrent registered $bb_cfg['seeder_last_seen_days_keep'] = 0; // Max time storing for the last seen peer status $bb_cfg['seeder_never_seen_days_keep'] = 0; // Max time for storing status - Never seen // DL-Status (days to keep user's dlstatus records) $bb_cfg['dl_will_days_keep'] = 360; $bb_cfg['dl_down_days_keep'] = 180; $bb_cfg['dl_complete_days_keep'] = 180; $bb_cfg['dl_cancel_days_keep'] = 30; // Tor-Stats $bb_cfg['torstat_days_keep'] = 60; // Days to keep user's per-torrent stats // Tor-Help $bb_cfg['torhelp_enabled'] = false; // Find dead torrents (without seeder) that user might help seeding // URL's $bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php" $bb_cfg['dl_url'] = 'dl.php?id='; # "http://{$domain_name}/dl.php?id=" $bb_cfg['login_url'] = 'login.php'; # "http://{$domain_name}/login.php" $bb_cfg['posting_url'] = 'posting.php'; # "http://{$domain_name}/posting.php" $bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php" // Language $bb_cfg['auto_language_detection'] = true; // Use browser language (auto-detect) as default language for guests $bb_cfg['lang'] = [ // Languages available for selecting 'af' => [ 'name' => 'Afrikaans', 'locale' => 'af_ZA.UTF-8', ], 'sq' => [ 'name' => 'Albanian', 'locale' => 'sq_AL.UTF-8', ], 'ar' => [ 'name' => 'Arabic', 'locale' => 'ar_SA.UTF-8', 'rtl' => true, ], 'hy' => [ 'name' => 'Armenian', 'locale' => 'hy_AM.UTF-8', ], 'az' => [ 'name' => 'Azerbaijani', 'locale' => 'az_AZ.UTF-8', ], 'be' => [ 'name' => 'Belarusian', 'locale' => 'be_BY.UTF-8', ], 'bs' => [ 'name' => 'Bosnian', 'locale' => 'bs_BA.UTF-8', ], 'bg' => [ 'name' => 'Bulgarian', 'locale' => 'bg_BG.UTF-8', ], 'ca' => [ 'name' => 'Catalan', 'locale' => 'ca_ES.UTF-8', ], 'zh' => [ 'name' => 'Chinese Simplified', 'locale' => 'zh_CN.UTF-8', ], 'hr' => [ 'name' => 'Croatian', 'locale' => 'hr_HR.UTF-8', ], 'cs' => [ 'name' => 'Czech', 'locale' => 'cs_CZ.UTF-8', ], 'da' => [ 'name' => 'Danish', 'locale' => 'da_DK.UTF-8', ], 'nl' => [ 'name' => 'Dutch', 'locale' => 'nl_NL.UTF-8', ], 'en' => [ 'name' => 'English', 'locale' => 'en_US.UTF-8', ], 'et' => [ 'name' => 'Estonian', 'locale' => 'et_EE.UTF-8', ], 'fi' => [ 'name' => 'Finnish', 'locale' => 'fi_FI.UTF-8', ], 'fr' => [ 'name' => 'French', 'locale' => 'fr_FR.UTF-8', ], 'ka' => [ 'name' => 'Georgian', 'locale' => 'ka_GE.UTF-8', ], 'de' => [ 'name' => 'German', 'locale' => 'de_DE.UTF-8', ], 'el' => [ 'name' => 'Greek', 'locale' => 'el_GR.UTF-8', ], 'he' => [ 'name' => 'Hebrew', 'locale' => 'he_IL.UTF-8', 'rtl' => true, ], 'hi' => [ 'name' => 'Hindi', 'locale' => 'hi_IN.UTF-8', ], 'hu' => [ 'name' => 'Hungarian', 'locale' => 'hu_HU.UTF-8', ], 'id' => [ 'name' => 'Indonesian', 'locale' => 'id_ID.UTF-8', ], 'it' => [ 'name' => 'Italian', 'locale' => 'it_IT.UTF-8', ], 'ja' => [ 'name' => 'Japanese', 'locale' => 'ja_JP.UTF-8', ], 'kk' => [ 'name' => 'Kazakh', 'locale' => 'kk_KZ.UTF-8', ], 'ko' => [ 'name' => 'Korean', 'locale' => 'ko_KR.UTF-8', ], 'lv' => [ 'name' => 'Latvian', 'locale' => 'lv_LV.UTF-8', ], 'lt' => [ 'name' => 'Lithuanian', 'locale' => 'lt_LT.UTF-8', ], 'no' => [ 'name' => 'Norwegian', 'locale' => 'nn_NO.UTF-8', ], 'pl' => [ 'name' => 'Polish', 'locale' => 'pl_PL.UTF-8', ], 'pt' => [ 'name' => 'Portuguese', 'locale' => 'pt_PT.UTF-8', ], 'ro' => [ 'name' => 'Romanian', 'locale' => 'ro_RO.UTF-8', ], 'ru' => [ 'name' => 'Russian', 'locale' => 'ru_RU.UTF-8', ], 'sr' => [ 'name' => 'Serbian', 'locale' => 'sr_CS.UTF-8', ], 'sk' => [ 'name' => 'Slovak', 'locale' => 'sk_SK.UTF-8', ], 'sl' => [ 'name' => 'Slovenian', 'locale' => 'sl_SI.UTF-8', ], 'es' => [ 'name' => 'Spanish', 'locale' => 'es_ES.UTF-8', ], 'sv' => [ 'name' => 'Swedish', 'locale' => 'sv_SE.UTF-8', ], 'tg' => [ 'name' => 'Tajik', 'locale' => 'tg_TJ.UTF-8', ], 'th' => [ 'name' => 'Thai', 'locale' => 'th_TH.UTF-8', ], 'tr' => [ 'name' => 'Turkish', 'locale' => 'tr_TR.UTF-8', ], 'uk' => [ 'name' => 'Ukrainian', 'locale' => 'uk_UA.UTF-8', ], 'uz' => [ 'name' => 'Uzbek', 'locale' => 'uz_UZ.UTF-8', ], 'vi' => [ 'name' => 'Vietnamese', 'locale' => 'vi_VN.UTF-8', ], ]; // Templates $bb_cfg['templates'] = [ // Available templates for selecting 'default' => 'Default', ]; $bb_cfg['tpl_name'] = 'default'; // Default template $bb_cfg['stylesheet'] = 'main.css'; $bb_cfg['show_sidebar1_on_every_page'] = false; // Show left sidebar in every page $bb_cfg['show_sidebar2_on_every_page'] = false; // Show right sidebar in every page // Cookie $bb_cfg['cookie_domain'] = in_array($domain_name, [$_SERVER['SERVER_ADDR'], 'localhost'], true) ? '' : ".$domain_name"; $bb_cfg['cookie_secure'] = \TorrentPier\Helpers\IsHelper::isHTTPS(); $bb_cfg['cookie_prefix'] = 'bb_'; // 'bb_' $bb_cfg['cookie_same_site'] = 'Lax'; // Lax, None, Strict | https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite // Sessions $bb_cfg['session_update_intrv'] = 180; // sec $bb_cfg['user_session_duration'] = 1800; // sec $bb_cfg['admin_session_duration'] = 6 * 3600; // sec $bb_cfg['user_session_gc_ttl'] = 1800; // number of seconds that a staled session entry may remain in sessions table $bb_cfg['session_cache_gc_ttl'] = 1200; // sec $bb_cfg['max_last_visit_days'] = 14; // days $bb_cfg['last_visit_update_intrv'] = 3600; // sec // Registration $bb_cfg['invalid_logins'] = 5; // Max incorrect password submits before showing captcha $bb_cfg['new_user_reg_disabled'] = false; // Disable registration of new users $bb_cfg['unique_ip'] = false; // Disallow registration from multiple IP addresses $bb_cfg['new_user_reg_restricted'] = false; // Disallow registration in below hours $bb_cfg['new_user_reg_interval'] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]; // Available hours $bb_cfg['reg_email_activation'] = true; // Demand to activate profile by email confirmation $bb_cfg['invites_system'] = [ 'enabled' => false, 'codes' => [ // Syntax: 'invite_code' => 'validity_period' // The 'validity_period' value is based on strtotime() function: https://www.php.net/manual/en/function.strtotime.php // You can also create a permanent invite, set 'permanent' value for 'validity_period' // Invite link example: site_url/profile.php?mode=register&invite=new_year2023 'new_year2023' => '2022-12-31 00:00:01', '340c4bb6ea2d284c13e085b60b990a8a' => '12 April 1961', 'tp_birthday' => '2005-04-04', 'endless' => 'permanent' ] ]; $bb_cfg['password_symbols'] = [ // What symbols should be required in the password 'nums' => true, 'spec_symbols' => false, 'letters' => [ 'uppercase' => false, 'lowercase' => true ] ]; $bb_cfg['password_hash_options'] = [ // https://www.php.net/manual/ru/password.constants.php 'algo' => PASSWORD_BCRYPT, 'options' => ['cost' => 12] ]; // Email $bb_cfg['emailer'] = [ 'enabled' => true, 'sendmail_command' => '/usr/sbin/sendmail -bs', 'smtp' => [ 'enabled' => false, // send email via external SMTP server 'host' => 'localhost', // SMTP server host 'port' => 25, // SMTP server port 'username' => '', // SMTP username (if server requires it) 'password' => '', // SMTP password (if server requires it) 'ssl_type' => '', // SMTP ssl type (ssl or tls) ], ]; $bb_cfg['extended_email_validation'] = true; // DNS & RFC checks for entered email addresses $bb_cfg['board_email'] = "noreply@$domain_name"; // admin email address $bb_cfg['board_email_form'] = false; // can users send email to each other via board $bb_cfg['board_email_sig'] = ''; // this text will be attached to all emails the board sends $bb_cfg['board_email_sitename'] = $domain_name; // sitename used in all emails header $bb_cfg['topic_notify_enabled'] = true; // Send emails to users if subscribed to the topic $bb_cfg['pm_notify_enabled'] = true; // Send emails to users if there's a new message in inbox $bb_cfg['group_send_email'] = true; // Send emails to users if user was invited/added to a group $bb_cfg['email_change_disabled'] = false; // Allow changing emails for users $bb_cfg['show_email_visibility_settings'] = true; // Allow changing privacy status of profile for users (e.g. last time seen) $bb_cfg['bounce_email'] = "bounce@$domain_name"; // bounce email address $bb_cfg['tech_admin_email'] = "admin@$domain_name"; // email for sending error reports $bb_cfg['abuse_email'] = "abuse@$domain_name"; // abuse email (e.g. DMCA) $bb_cfg['adv_email'] = "adv@$domain_name"; // advertisement email // Error reporting $bb_cfg['whoops'] = [ 'error_message' => 'Sorry, something went wrong. Drink coffee and come back after some time... ☕️', 'blacklist' => [ '_COOKIE' => array_keys($_COOKIE), '_SERVER' => array_keys($_SERVER), '_ENV' => array_keys($_ENV), ] ]; $bb_cfg['bugsnag'] = [ 'enabled' => true, 'api_key' => '33b3ed0102946bab71341f9edc125e21', // Don't change this if you want to help us find bugs ]; $bb_cfg['telegram_sender'] = [ // How to get chat_id? https://api.telegram.org/bot{YOUR_TOKEN}/getUpdates 'enabled' => false, 'token' => '', // Bot token 'chat_id' => '', // Bot chat_id 'timeout' => 10 // Timeout for responses ]; // Special users $bb_cfg['dbg_users'] = [ // Syntax: 'user_id' => 'username' 2 => 'admin', ]; $bb_cfg['unlimited_users'] = [ // Syntax: 'user_id' => 'username' 2 => 'admin', ]; $bb_cfg['super_admins'] = [ // Syntax: 'user_id' => 'username' 2 => 'admin', ]; // Subforums $bb_cfg['sf_on_first_page_only'] = true; // Show subforums only on the first page of the forum // Forums $bb_cfg['allowed_topics_per_page'] = [50, 100, 150, 200, 250, 300]; // Allowed number of topics per page // Topics $bb_cfg['show_post_bbcode_button'] = [ // Show "Code" button in topic to display BBCode of topic 'enabled' => true, 'only_for_first_post' => true, ]; $bb_cfg['show_quick_reply'] = true; // Show quick reply forim $bb_cfg['show_rank_text'] = false; // Show user rank name in topics $bb_cfg['show_rank_image'] = true; // Show user rank image in topics $bb_cfg['show_poster_joined'] = true; // Show user's registration date in topics $bb_cfg['show_poster_posts'] = true; // Show user's post count in topics $bb_cfg['show_poster_from'] = true; // Show user's country in topics $bb_cfg['show_bot_nick'] = true; // Show bot's nickname $bb_cfg['text_buttons'] = false; // replace EDIT, QUOTE... images with text links $bb_cfg['post_date_format'] = 'd-M-Y H:i'; // Date format for topics $bb_cfg['ext_link_new_win'] = true; // open external links in new window $bb_cfg['topic_moved_days_keep'] = 7; // remove topic moved links after xx days (or FALSE to disable) $bb_cfg['allowed_posts_per_page'] = [15, 30, 50, 100]; $bb_cfg['user_signature_start'] = '