2019-11-05 15:30:08 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (!defined('RASPI_CONFIG')) {
|
2020-02-15 18:57:46 +01:00
|
|
|
define('RASPI_CONFIG', '/etc/raspap');
|
2019-11-05 15:30:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$defaults = [
|
2020-07-01 10:13:38 +02:00
|
|
|
'RASPI_BRAND_TEXT' => 'RaspAP',
|
2021-11-17 19:21:06 +01:00
|
|
|
'RASPI_VERSION' => '2.7.8',
|
2020-12-05 10:14:07 +01:00
|
|
|
'RASPI_CONFIG_NETWORK' => RASPI_CONFIG.'/networking/defaults.json',
|
2019-11-05 15:30:08 +01:00
|
|
|
'RASPI_ADMIN_DETAILS' => RASPI_CONFIG.'/raspap.auth',
|
2020-06-09 16:34:19 +02:00
|
|
|
'RASPI_WIFI_AP_INTERFACE' => 'wlan0',
|
2019-11-05 15:30:08 +01:00
|
|
|
'RASPI_CACHE_PATH' => sys_get_temp_dir() . '/raspap',
|
|
|
|
|
|
|
|
// Constants for configuration file paths.
|
|
|
|
// These are typical for default RPi installs. Modify if needed.
|
|
|
|
'RASPI_DNSMASQ_LEASES' => '/var/lib/misc/dnsmasq.leases',
|
2020-11-15 11:51:09 +01:00
|
|
|
'RASPI_DNSMASQ_PREFIX' => '/etc/dnsmasq.d/090_',
|
2020-03-27 15:32:27 +01:00
|
|
|
'RASPI_ADBLOCK_LISTPATH' => '/etc/raspap/adblock/',
|
2020-12-12 20:29:43 +01:00
|
|
|
'RASPI_ADBLOCK_CONFIG' => RASPI_DNSMASQ_PREFIX.'adblock.conf',
|
2019-11-05 15:30:08 +01:00
|
|
|
'RASPI_HOSTAPD_CONFIG' => '/etc/hostapd/hostapd.conf',
|
|
|
|
'RASPI_DHCPCD_CONFIG' => '/etc/dhcpcd.conf',
|
2021-11-17 19:20:03 +01:00
|
|
|
'RASPI_DHCPCD_LOG' => '/var/log/dnsmasq.log',
|
2019-11-05 15:30:08 +01:00
|
|
|
'RASPI_WPA_SUPPLICANT_CONFIG' => '/etc/wpa_supplicant/wpa_supplicant.conf',
|
|
|
|
'RASPI_HOSTAPD_CTRL_INTERFACE' => '/var/run/hostapd',
|
|
|
|
'RASPI_WPA_CTRL_INTERFACE' => '/var/run/wpa_supplicant',
|
2021-06-06 21:47:30 +02:00
|
|
|
'RASPI_OPENVPN_CLIENT_PATH' => '/etc/openvpn/client/',
|
2019-11-17 19:22:55 +01:00
|
|
|
'RASPI_OPENVPN_CLIENT_CONFIG' => '/etc/openvpn/client/client.conf',
|
|
|
|
'RASPI_OPENVPN_CLIENT_LOGIN' => '/etc/openvpn/client/login.conf',
|
2021-02-24 09:46:41 +01:00
|
|
|
'RASPI_WIREGUARD_PATH' => '/etc/wireguard/',
|
|
|
|
'RASPI_WIREGUARD_CONFIG' => RASPI_WIREGUARD_PATH.'wg0.conf',
|
2019-11-05 15:30:08 +01:00
|
|
|
'RASPI_TORPROXY_CONFIG' => '/etc/tor/torrc',
|
2019-11-10 23:09:16 +01:00
|
|
|
'RASPI_LIGHTTPD_CONFIG' => '/etc/lighttpd/lighttpd.conf',
|
2020-06-28 18:08:29 +02:00
|
|
|
'RASPI_ACCESS_CHECK_IP' => '1.1.1.1',
|
|
|
|
'RASPI_ACCESS_CHECK_DNS' => 'one.one.one.one',
|
2019-11-05 15:30:08 +01:00
|
|
|
|
2020-10-25 09:00:17 +01:00
|
|
|
// Constants for the 5GHz wireless regulatory domain
|
|
|
|
'RASPI_5GHZ_ISO_ALPHA2' => array('NL','US'),
|
|
|
|
'RASPI_5GHZ_MAX_CHANNEL' => 165,
|
|
|
|
|
2019-11-05 15:30:08 +01:00
|
|
|
// Optional services, set to true to enable.
|
|
|
|
'RASPI_WIFICLIENT_ENABLED' => true,
|
|
|
|
'RASPI_HOTSPOT_ENABLED' => true,
|
|
|
|
'RASPI_NETWORK_ENABLED' => true,
|
|
|
|
'RASPI_DHCP_ENABLED' => true,
|
2020-03-31 23:54:46 +02:00
|
|
|
'RASPI_ADBLOCK_ENABLED' => false,
|
2019-11-05 15:30:08 +01:00
|
|
|
'RASPI_OPENVPN_ENABLED' => false,
|
2020-04-20 12:05:15 +02:00
|
|
|
'RASPI_WIREGUARD_ENABLED' => false,
|
2019-11-05 15:30:08 +01:00
|
|
|
'RASPI_TORPROXY_ENABLED' => false,
|
|
|
|
'RASPI_CONFAUTH_ENABLED' => true,
|
|
|
|
'RASPI_CHANGETHEME_ENABLED' => true,
|
|
|
|
'RASPI_VNSTAT_ENABLED' => true,
|
2019-11-08 09:20:47 +01:00
|
|
|
'RASPI_SYSTEM_ENABLED' => true,
|
2019-11-05 15:30:08 +01:00
|
|
|
'RASPI_MONITOR_ENABLED' => false,
|
|
|
|
|
|
|
|
// Locale settings
|
|
|
|
'LOCALE_ROOT' => 'locale',
|
|
|
|
'LOCALE_DOMAIN' => 'messages'
|
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($defaults as $setting => $value) {
|
2020-02-15 18:57:46 +01:00
|
|
|
if (!defined($setting)) {
|
|
|
|
define($setting, $value);
|
|
|
|
}
|
2019-11-05 15:30:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
unset($defaults);
|