本文整理汇总了PHP中squidbee::SaveCertificate方法的典型用法代码示例。如果您正苦于以下问题:PHP squidbee::SaveCertificate方法的具体用法?PHP squidbee::SaveCertificate怎么用?PHP squidbee::SaveCertificate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类squidbee
的用法示例。
在下文中一共展示了squidbee::SaveCertificate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: apache_config
//.........这里部分代码省略.........
if ($HotSpotForceDDOSDisable == 1) {
$Params["DOSEnable"] = 0;
}
if ($Params["DOSEnable"] == 1) {
//$ddos[]="<IfModule mod_evasive20.c>";
$ddos[] = "\tDOSHashTableSize {$Params["DOSHashTableSize"]}";
$ddos[] = "\tDOSPageCount {$Params["DOSPageCount"]}";
$ddos[] = "\tDOSSiteCount {$Params["DOSSiteCount"]}";
$ddos[] = "\tDOSPageInterval {$Params["DOSPageInterval"]}";
$ddos[] = "\tDOSSiteInterval {$Params["DOSSiteInterval"]}";
$ddos[] = "\tDOSBlockingPeriod {$Params["DOSBlockingPeriod"]}";
$ddos[] = "\tDOSLogDir \"/var/log/artica-wifidog\"";
$ddos[] = "\tDOSSystemCommand \"/bin/echo `date '+%F %T'` HOTSPOT %s >> /var/log/artica-wifidog/dos_evasive_attacks.log\"";
$ddos_config = @implode("\n", $ddos);
//$ddos[]="</IfModule>";
}
$f[] = "<VirtualHost {$NameVirtualHost}:{$ArticaSplashHotSpotPort}>";
$f[] = "\tServerName {$NameVirtualHost}";
$f[] = "\tDocumentRoot /usr/share/artica-postfix";
$f[] = "{$ddos_config}";
$f[] = "\tErrorDocument 400 /hotspot.html";
$f[] = "\tErrorDocument 401 /hotspot.html";
$f[] = "\tErrorDocument 403 /hotspot.html";
$f[] = "\tErrorDocument 404 /hotspot.html";
$f[] = "\tErrorDocument 500 /hotspot.html";
$f[] = "\tFallbackResource /hotspot.html";
$f[] = "</VirtualHost>";
$f[] = "<VirtualHost {$NameVirtualHost}:{$ArticaSplashHotSpotPortSSL}>";
$f[] = "\tServerName {$NameVirtualHost}";
$f[] = "\tDocumentRoot /usr/share/artica-postfix";
$f[] = "\tSSLEngine on";
$squid = new squidbee();
$ArticaSplashHotSpotCertificate = $sock->GET_INFO("ArticaSplashHotSpotCertificate");
$data = $squid->SaveCertificate($ArticaSplashHotSpotCertificate, false, true, false);
if ($ArticaSplashHotSpotCertificate != null) {
$apache = new apache_certificate($ArticaSplashHotSpotCertificate);
$f[] = $apache->build();
} else {
if (preg_match("#ssl_certificate\\s+(.+?);\\s+ssl_certificate_key\\s+(.+?);#is", $data, $re)) {
$cert = $re[1];
$key = $re[2];
$f[] = "\tSSLCertificateFile \"{$cert}\"";
$f[] = "\tSSLCertificateKeyFile \"{$key}\"";
}
}
$f[] = "\tSSLVerifyClient none";
$f[] = "\tServerSignature Off";
$f[] = "{$ddos_config}";
$f[] = "\tErrorDocument 400 /hotspot.html";
$f[] = "\tErrorDocument 401 /hotspot.html";
$f[] = "\tErrorDocument 403 /hotspot.html";
$f[] = "\tErrorDocument 404 /hotspot.html";
$f[] = "\tErrorDocument 500 /hotspot.html";
$f[] = "\tFallbackResource /hotspot.html";
$f[] = "</VirtualHost>";
$f[] = "AccessFileName .htaccess";
$f[] = "<Files ~ \"^\\.ht\">";
$f[] = "\tOrder allow,deny";
$f[] = "\tDeny from all";
$f[] = "\tSatisfy all";
$f[] = "</Files>";
$f[] = "DefaultType text/plain";
$f[] = "HostnameLookups Off";
$f[] = "User\t\t\t\t {$APACHE_SRC_ACCOUNT}";
$f[] = "Group\t\t\t\t {$APACHE_SRC_GROUP}";
$f[] = "Timeout 300";
示例2: build_default_asArtica
function build_default_asArtica()
{
$nginx = new nginx();
$unix = new unix();
$squidR = new squidbee();
$f[] = "server {";
$f[] = "\tlisten 80;";
$f[] = "\tserver_name " . $unix->hostname_g() . ";";
$f[] = "\tindex logon.php;";
$f[] = "\tlocation /nginx_status {";
$f[] = "\tstub_status on;";
$f[] = "\terror_log /var/log/nginx/default.error.log warn;";
$f[] = "\taccess_log /var/log/nginx/default.access.log;";
$f[] = "\tallow all;";
$f[] = "\t}";
$f[] = "\tlocation / {";
$f[] = "\t\troot\t/usr/share/artica-postfix;";
$f[] = "\t}";
$f[] = $nginx->php_fpm("logon.php", "/usr/share/artica-postfix", 1);
$f[] = "}";
$f[] = "server {";
$f[] = "\tlisten 443;";
$f[] = "\tindex logon.php;";
$f[] = "\tkeepalive_timeout 70;";
$f[] = "\terror_log /var/log/nginx/default.error.log warn;";
$f[] = "\taccess_log /var/log/nginx/default.access.log;";
$f[] = "\tssl on;";
$f[] = "\t" . $squidR->SaveCertificate($unix->hostname_g(), false, true);
$f[] = "\tssl_session_timeout 5m;";
$f[] = "\tssl_protocols SSLv3 TLSv1;";
$f[] = "\tssl_ciphers HIGH:!aNULL:!MD5;";
$f[] = "\tssl_prefer_server_ciphers on;";
$f[] = "\tserver_name " . $unix->hostname_g() . ";";
$f[] = "\tlocation / {";
$f[] = "\t\troot\t/usr/share/artica-postfix;";
$f[] = "\t}";
$f[] = $nginx->php_fpm("logon.php", "/usr/share/artica-postfix", 1);
$f[] = "}";
@file_put_contents("/etc/nginx/conf.d/default.conf", @implode("\n", $f));
if ($GLOBALS["RELOAD"]) {
reload(true);
}
}
示例3: dirname
$GLOBALS["debug"] = true;
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
ini_set('error_prepend_string', null);
ini_set('error_append_string', null);
}
if (preg_match("#--output#", implode(" ", $argv))) {
$GLOBALS["OUTPUT"] = true;
}
if (preg_match("#schedule-id=([0-9]+)#", implode(" ", $argv), $re)) {
$GLOBALS["SCHEDULE_ID"] = $re[1];
}
if (preg_match("#--force#", implode(" ", $argv), $re)) {
$GLOBALS["FORCE"] = true;
}
if (preg_match("#--reconfigure#", implode(" ", $argv), $re)) {
$GLOBALS["RECONFIGURE"] = true;
}
$GLOBALS["AS_ROOT"] = true;
include_once dirname(__FILE__) . '/ressources/class.ldap.inc';
include_once dirname(__FILE__) . '/ressources/class.nginx.inc';
include_once dirname(__FILE__) . '/ressources/class.freeweb.inc';
include_once dirname(__FILE__) . '/framework/class.unix.inc';
include_once dirname(__FILE__) . '/ressources/class.squid.reverse.inc';
include_once dirname(__FILE__) . '/framework/frame.class.inc';
include_once dirname(__FILE__) . '/framework/class.settings.inc';
include_once dirname(__FILE__) . '/ressources/class.resolv.conf.inc';
$certificate = $argv[1];
$squid = new squidbee();
$squid->SaveCertificate($certificate, false, true);
示例4: apache_config
//.........这里部分代码省略.........
$f[] = "AcceptMutex flock";
$f[] = "DocumentRoot /usr/share/artica-postfix";
$f[] = "DirectoryIndex squidcache.php";
$f[] = "NameVirtualHost {$ipaddr}:{$HyperCacheHTTPListenPort}";
$f[] = $mirrors_aliases_conf;
if ($HyperCacheHTTPListenPortSSLEnabled == 1) {
$f[] = "SSLRandomSeed startup file:/dev/urandom 256";
$f[] = "SSLRandomSeed connect builtin";
$f[] = "SSLSessionCache shmcb:/var/run/squid/HyperCacheWebSSL(512000)";
$f[] = "SSLSessionCacheTimeout 300";
$f[] = "SSLSessionCacheTimeout 300";
$f[] = "NameVirtualHost {$ipaddr}:{$HyperCacheHTTPListenPortSSL}";
$f[] = "Listen {$ipaddr}:{$HyperCacheHTTPListenPortSSL}";
}
$f[] = "Listen {$ipaddr}:{$HyperCacheHTTPListenPort}";
$f[] = "<VirtualHost {$ipaddr}:{$HyperCacheHTTPListenPort}>";
$f[] = "\tServerName {$ipaddr}";
$f[] = "\tLoglevel debug";
$f[] = "\tLoglevel debug";
$f[] = "\tErrorLog /var/log/squid/HyperCache-error.log";
$f[] = "\tLogFormat \"%h %l %u %t \\\"%r\\\" %<s %b\" common";
$f[] = "\tCustomLog /var/log/squid/HyperCache-access.log common";
$f[] = "\tErrorDocument 400 /squidcache.php";
$f[] = "\tErrorDocument 401 /squidcache.php";
$f[] = "\tErrorDocument 403 /squidcache.php";
$f[] = "\tErrorDocument 404 /squidcache.php";
$f[] = "\tErrorDocument 500 /squidcache.php";
//$f[]="\tFallbackResource /squidcache.php";
$f[] = $mirrors_aliases_conf;
$f[] = $mirrors_conf;
$f[] = "</VirtualHost>";
if ($HyperCacheHTTPListenPortSSLEnabled == 1) {
$squid = new squidbee();
$data = $squid->SaveCertificate($ArticaSplashHotSpotCertificate, false, true, false);
if (preg_match("#ssl_certificate\\s+(.+?);\\s+ssl_certificate_key\\s+(.+?);#is", $data, $re)) {
$cert = $re[1];
$key = $re[2];
}
$f[] = "<VirtualHost {$ipaddr}:{$HyperCacheHTTPListenPortSSL}>";
$f[] = "\tFallbackResource /squidcache.php";
$f[] = "\tServerName {$ipaddr}";
$f[] = "\tDocumentRoot /usr/share/artica-postfix";
$f[] = "\tSSLEngine on";
$f[] = "\tSSLCertificateFile \"{$cert}\"";
$f[] = "\tSSLCertificateKeyFile \"{$key}\"";
$f[] = "\tSSLVerifyClient none";
$f[] = "\tServerSignature Off";
$f[] = $mirrors_conf;
$f[] = "</VirtualHost>";
}
$f[] = "<IfModule mpm_prefork_module>";
$f[] = "</IfModule>";
$f[] = "<IfModule mpm_worker_module>";
$f[] = "\tMinSpareThreads 25";
$f[] = "\tMaxSpareThreads 75 ";
$f[] = "\tThreadLimit 64";
$f[] = "\tThreadsPerChild 25";
$f[] = "</IfModule>";
$f[] = "<IfModule mpm_event_module>";
$f[] = "\tMinSpareThreads 25";
$f[] = "\tMaxSpareThreads 75 ";
$f[] = "\tThreadLimit 64";
$f[] = "\tThreadsPerChild 25";
$f[] = "</IfModule>";
$f[] = "AccessFileName .htaccess";
$f[] = "<Files ~ \"^\\.ht\">";
示例5: build
//.........这里部分代码省略.........
//$t[]="HS_STATIP_MASK={$ChilliConf["HS_STATIP_MASK"]}";
$t[] = "# DNS Servers";
$t[] = "HS_DNS1={$ChilliConf["HS_UAMLISTEN"]}";
$t[] = "HS_DNS2={$ChilliConf["HS_UAMLISTEN"]}";
DefaultSplash($ChilliConf);
if (!isset($ChilliConf["SQUID_HTTP_PORT"])) {
$ChilliConf["SQUID_HTTP_PORT"] = rand(45000, 65400);
$save = true;
}
if (!is_numeric($ChilliConf["SQUID_HTTP_PORT"])) {
$ChilliConf["SQUID_HTTP_PORT"] = rand(45000, 65400);
$save = true;
}
if (!isset($ChilliConf["SQUID_HTTPS_PORT"])) {
$ChilliConf["SQUID_HTTPS_PORT"] = rand(45000, 65400);
$save = true;
}
if (!is_numeric($ChilliConf["SQUID_HTTPS_PORT"])) {
$ChilliConf["SQUID_HTTPS_PORT"] = rand(45000, 65400);
$save = true;
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Building DNSMasq settings\n";
}
dnsmasq_config();
if ($ChilliConf["EnableSSLRedirection"] == 1) {
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} SSL redirection is Active\n";
}
$t[] = "HS_UAMUISSL=on";
$t[] = "HS_REDIRSSL=on";
include_once dirname(__FILE__) . "/ressources/class.squid.inc";
$squid = new squidbee();
$t[] = $squid->SaveCertificate($ChilliConf["certificate_center"], false, false, true);
} else {
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} SSL redirection is inactive\n";
}
}
$ChilliConf["uamallowed"][$ChilliConf["HS_UAMFREEWEB"]] = true;
$ChilliConf["uamallowed"]["127.0.0.1"] = true;
$ChilliConf["uamallowed"][$ChilliConf["HS_WANIF_IP"]] = true;
$ip = new IP();
if ($ip->isIPAddress($ChilliConf["HS_DNS1"])) {
$ChilliConf["uamallowed"][$ChilliConf["HS_DNS1"]] = true;
}
if ($ip->isIPAddress($ChilliConf["HS_DNS2"])) {
$ChilliConf["uamallowed"][$ChilliConf["HS_DNS2"]] = true;
}
if ($ChilliConf["AD_SERVER"] != null) {
$ChilliConf["uamallowed"][$ChilliConf["AD_SERVER"]] = true;
}
while (list($num, $ligne) = each($ChilliConf["uamallowed"])) {
if (trim($num) == null) {
continue;
}
if (is_numeric($num)) {
continue;
}
$HS_UAMALLOW[] = $num;
}
if ($save) {
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Saving new configuration file...\n";
}
$NewArray = base64_encode(serialize($ChilliConf));
示例6: build
function build()
{
$sock = new sockets();
$unix = new unix();
$ini = new Bs_IniHandler();
$IPADDRSSL = array();
$IPADDRSSL2 = array();
$ArticaSquidParameters = $sock->GET_INFO('ArticaSquidParameters');
$visible_hostname = $ini->_params["NETWORK"]["visible_hostname"];
if ($visible_hostname == null) {
$visible_hostname = $unix->hostname_g();
}
$SquidBinIpaddr = $sock->GET_INFO("SquidBinIpaddr");
$AllowAllNetworksInSquid = $sock->GET_INFO("AllowAllNetworksInSquid");
if (!is_numeric($AllowAllNetworksInSquid)) {
$AllowAllNetworksInSquid = 1;
}
$ini->loadString($ArticaSquidParameters);
NETWORK_ALL_INTERFACES();
$LISTEN_PORT = intval($ini->_params["NETWORK"]["LISTEN_PORT"]);
$ICP_PORT = intval(trim($ini->_params["NETWORK"]["ICP_PORT"]));
$certificate_center = $ini->_params["NETWORK"]["certificate_center"];
$SSL_BUMP = intval($ini->_params["NETWORK"]["SSL_BUMP"]);
$LogsWarninStop = intval($sock->GET_INFO("LogsWarninStop"));
$ssl = false;
if ($ICP_PORT == 0) {
$ICP_PORT = 3130;
}
if ($LISTEN_PORT == 0) {
$LISTEN_PORT = 3128;
}
$squid = new squidbee();
$q = new mysql_squid_builder();
$IPADDRS = array();
if ($SquidBinIpaddr != null) {
if (!isset($GLOBALS["NETWORK_ALL_INTERFACES"][$SquidBinIpaddr])) {
$SquidBinIpaddr = null;
} else {
$IPADDRS[$SquidBinIpaddr] = $LISTEN_PORT;
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} Listens {$SquidBinIpaddr}\n";
}
}
}
if ($SSL_BUMP == 1) {
$ssl = true;
$ssl_port = $squid->get_ssl_port();
}
if ($SquidBinIpaddr == null) {
reset($GLOBALS["NETWORK_ALL_INTERFACES"]);
while (list($ipaddr, $val) = each($GLOBALS["NETWORK_ALL_INTERFACES"])) {
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} Listens {$ipaddr}:{$LISTEN_PORT}\n";
}
$IPADDRS[$ipaddr] = $LISTEN_PORT;
$IPADDRSSL[$ipaddr] = $ssl_port;
}
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} visible hostname........: {$visible_hostname}\n";
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} AllowAllNetworksInSquid.: {$AllowAllNetworksInSquid}\n";
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} ICP Port................: {$ICP_PORT}\n";
}
if ($ssl) {
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} SSL Intercept...........: Yes - {$ssl_port}\n";
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} Certificate.............: {$certificate_center}\n";
}
$MAINSSL = $squid->SaveCertificate($certificate_center, false, false, false, true);
$f[] = $MAINSSL[0];
$certificate = $MAINSSL[1]["certificate"];
$key = $MAINSSL[1]["key"];
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} Certificate.............: {$certificate}\n";
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} Key.....................: {$key}\n";
}
}
$sql = "SELECT * FROM proxy_ports WHERE enabled=1 and transparent=1";
$results = $q->QUERY_SQL($sql);
$f[] = "# --------- proxy_ports enabled=1 and transparent=1 -> " . mysql_num_rows($results) . " ports";
while ($ligne = mysql_fetch_assoc($results)) {
$ipaddr = $ligne["ipaddr"];
$xport = $ligne["port"];
$transparent_text = null;
if (!isset($GLOBALS["NETWORK_ALL_INTERFACES"][$ipaddr])) {
$f[] = "# --------- table proxy_ports {$ipaddr}:{$xport} -> Hardware Error [" . __LINE__ . "]\n";
$f[] = "# --------- http {$ipaddr} -> Hardware Error [" . __LINE__ . "]\n";
continue;
}
if ($ssl) {
$IPADDRSSL[$ipaddr] = $ssl_port;
}
//.........这里部分代码省略.........
示例7: build
function build()
{
$sock = new sockets();
$unix = new unix();
$ini = new Bs_IniHandler();
$IPADDRSSL = array();
$IPADDRSSL2 = array();
$ArticaSquidParameters = $sock->GET_INFO('ArticaSquidParameters');
$visible_hostname = $ini->_params["NETWORK"]["visible_hostname"];
if ($visible_hostname == null) {
$visible_hostname = $unix->hostname_g();
}
if (strpos($visible_hostname, ".") > 0) {
$visible_hostnameTR = explode(".", $visible_hostname);
$visible_hostnameTR[0] = $visible_hostnameTR[0] . "-nat";
$visible_hostname = @implode(".", $visible_hostnameTR);
} else {
$visible_hostname = "nat-{$visible_hostname}";
}
$SquidBinIpaddr = $sock->GET_INFO("SquidBinIpaddr");
$AllowAllNetworksInSquid = $sock->GET_INFO("AllowAllNetworksInSquid");
if (!is_numeric($AllowAllNetworksInSquid)) {
$AllowAllNetworksInSquid = 1;
}
$ini->loadString($ArticaSquidParameters);
NETWORK_ALL_INTERFACES();
$LISTEN_PORT = intval($ini->_params["NETWORK"]["LISTEN_PORT"]);
$ICP_PORT = intval(trim($ini->_params["NETWORK"]["ICP_PORT"]));
$certificate_center = $ini->_params["NETWORK"]["certificate_center"];
$SSL_BUMP = intval($ini->_params["NETWORK"]["SSL_BUMP"]);
$LogsWarninStop = intval($sock->GET_INFO("LogsWarninStop"));
$ssl = false;
if ($ICP_PORT == 0) {
$ICP_PORT = 3130;
}
if ($LISTEN_PORT == 0) {
$LISTEN_PORT = 3128;
}
$squid = new squidbee();
$q = new mysql_squid_builder();
$IPADDRS = array();
$ParentSquid27Port = intval($sock->GET_INFO("ParentSquid27Port"));
if ($ParentSquid27Port == 0) {
$ParentSquid27Port = 13298;
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [CONF]: {$GLOBALS["SERVICE_NAME"]} visible hostname........: {$visible_hostname}\n";
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [CONF]: {$GLOBALS["SERVICE_NAME"]} AllowAllNetworksInSquid.: {$AllowAllNetworksInSquid}\n";
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [CONF]: {$GLOBALS["SERVICE_NAME"]} ICP Port................: {$ICP_PORT}\n";
}
$sql = "SELECT * FROM proxy_ports WHERE enabled=1 and is_nat=1";
$results = $q->QUERY_SQL($sql);
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [CONF]: {$GLOBALS["SERVICE_NAME"]} " . mysql_num_rows($results) . " ports\n";
}
$f[] = "# --------- proxy_ports enabled=1 and is_nat=1 -> " . mysql_num_rows($results) . " ports";
$MAINSSL = array();
while ($ligne = mysql_fetch_assoc($results)) {
$ipaddr = $ligne["ipaddr"];
$xport = $ligne["port"];
$ssl = intval($ligne["UseSSL"]);
$eth = $ligne["nic"];
$transparent_text = null;
$ipaddr = "0.0.0.0";
$transparent = " transparent";
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} {$eth} {$ipaddr}:{$xport}\n";
}
if ($eth != null) {
$ipaddr = $GLOBALS["NETWORK_ALL_NICS"][$eth]["IPADDR"];
if ($ipaddr == null) {
$conf[] = "# --------- table proxy_ports {$eth} {$ipaddr}:{$xport} -> Hardware Error [" . __LINE__ . "]\n";
$conf[] = "# --------- http {$ipaddr} -> Hardware Error -> 0.0.0.0 [" . __LINE__ . "]\n";
$ipaddr = "0.0.0.0";
}
}
$f[] = "# --------- Port {$xport} listen on {$eth} ({$ipaddr}) UseSSL={$ssl}";
if ($ssl == 1) {
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} {$ipaddr}:{$xport}: SSL Intercept...........: Yes - {$ssl_port}\n";
}
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["SERVICE_NAME"]} {$ipaddr}:{$xport}: Certificate.............: {$ligne["sslcertificate"]}\n";
}
$MAINSSL = $squid->SaveCertificate($ligne["sslcertificate"], false, false, false, true);
$f[] = $MAINSSL[0];
$key = $MAINSSL[1]["key"];
$certificate = $MAINSSL[1]["certificate"];
$f[] = "https_port {$ipaddr}:{$xport} transparent cert={$certificate} key={$key}";
continue;
}
$f[] = "http_port {$ipaddr}:{$xport}{$transparent}";
}
if ($AllowAllNetworksInSquid == 1) {
$f[] = "acl localnet src all";
}
//.........这里部分代码省略.........