835c6c | 2001-06-17 | Martin Nilsson | |
|
f41b98 | 2009-05-07 | Martin Stjernholm | |
|
0917d3 | 2013-03-04 | Anders Johansson | |
|
e35de2 | 2000-03-10 | Martin Nilsson | |
|
835c6c | 2001-06-17 | Martin Nilsson | |
|
55a866 | 2000-11-20 | Per Hedbor | | #define DEFVAR mixed...:object
#define BDEFVAR mixed...:object
|
24c6c1 | 2000-02-20 | Martin Nilsson | |
|
55a866 | 2000-11-20 | Per Hedbor | | #define IN_ROXEN
|
690adf | 1999-08-30 | Per Hedbor | | #include <module.h>
inherit "read_config";
|
3bb11d | 2000-07-09 | Per Hedbor | | inherit "basic_defvar";
|
7d2baf | 2000-02-02 | Martin Stjernholm | | #include <version.h>
|
23414a | 2000-07-21 | Andreas Lange | |
#define LOCALE(X,Y) _DEF_LOCALE("roxen_config",X,Y)
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
3bb11d | 2000-07-09 | Per Hedbor | | mixed save()
{
store( "Variables", variables, 0, 0 );
}
|
690adf | 1999-08-30 | Per Hedbor | |
|
f4b625 | 1999-09-02 | Per Hedbor | |
|
8552d9 | 2001-01-13 | Martin Nilsson | | private int(0..1) cache_disabled_p() { return !query("cache"); }
private int(0..1) ident_disabled_p() { return [int(0..1)]query("default_ident"); }
|
d4a3f5 | 2014-05-12 | Henrik Grubbström (Grubba) | | #if constant(syslog)
|
3b6d0e | 2009-04-23 | Jonas Wallden | | private int(0..1) syslog_disabled() { return query("LogA")!="syslog"; }
#endif
|
690adf | 1999-08-30 | Per Hedbor | |
|
fc4039 | 2008-08-15 | Martin Stjernholm | | protected void cdt_changed (Variable.Variable v);
|
0be325 | 2008-09-25 | Martin Stjernholm | | void slow_req_count_changed();
void slow_req_timeout_changed();
|
f931d7 | 2008-09-29 | Martin Stjernholm | | void slow_be_timeout_changed();
|
0778da | 2006-10-27 | Martin Stjernholm | |
|
6897c9 | 2001-06-27 | Honza Petrous | | #ifdef SNMP_AGENT
private int(0..1) snmp_disabled() { return !query("snmp_agent"); }
|
6f669a | 2001-08-14 | Honza Petrous | | private string snmp_get_cif_domain() {
return("");
}
|
6897c9 | 2001-06-27 | Honza Petrous | | #endif
|
934b3f | 2000-02-04 | Per Hedbor | |
|
434bac | 2000-07-14 | Andreas Lange | |
|
934b3f | 2000-02-04 | Per Hedbor | |
|
3e3bab | 2001-01-19 | Per Hedbor | | void set_up_hilfe_variables( Protocol o )
|
e056e9 | 2000-10-19 | Per Hedbor | | {
|
de4b59 | 2001-01-21 | Martin Nilsson | | function(DEFVAR) defvar = o->defvar;
|
e056e9 | 2000-10-19 | Per Hedbor | |
defvar( "require_auth", 1,
|
55a866 | 2000-11-20 | Per Hedbor | | LOCALE(309,"Require user with the 'hilfe' permission"), TYPE_FLAG,
LOCALE(310,"If yes, require a user with the hilfe permission "
|
e056e9 | 2000-10-19 | Per Hedbor | | "set, otherwise, any configuration interface user will "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "be allowed, even one with only the view settings permission." ) );
|
e056e9 | 2000-10-19 | Per Hedbor | | }
|
934b3f | 2000-02-04 | Per Hedbor | |
|
ee13d0 | 2008-02-05 | Henrik Grubbström (Grubba) | | #if 0
void set_up_snmp_variables( Protocol o )
{
function(DEFVAR) defvar = o->defvar;
defvar("snmp_community", ({"public:ro"}), "Community string",
TYPE_STRING_LIST,
"One community name per line. Default permissions are 'read-only'. "
"'Read-write' permissions can be specified by appending :rw to the "
"community name (for example mypub:rw).");
defvar("snmp_global_traphosts", ({}),"Trap destinations",
TYPE_STRING_LIST,
"The SNMP traphost URL for sending common traps (like coldstart).");
defvar("snmp_syscontact","","System MIB: Contact",
TYPE_STRING,
"The textual identification of the contact person for this managed "
"node, together with information on how to contact this person.");
defvar("snmp_sysname","","System MIB: Name",
TYPE_STRING,
"An administratively-assigned name for this managed node. By "
"convention, this is the node's fully-qualified domain name.");
defvar("snmp_syslocation","","System MIB: Location",
TYPE_STRING,
"The physical location of this node (e.g., `telephone closet, 3rd "
"floor').");
defvar("snmp_sysservices",72,"System MIB: Services",
TYPE_INT,
"A value which indicates the set of services that this entity "
"primarily offers.");
#if 0
defvar("site_id", 0,
|
82c020 | 2009-03-17 | Jonas Wallden | | LOCALE(1012, "SNMP sub-MIB"), TYPE_INT,
LOCALE(1013, "MIB suffix to 1.3.6.1.4.1.8614.1.1.2 "
|
ee13d0 | 2008-02-05 | Henrik Grubbström (Grubba) | | "identifying this site."));
#endif /* 0 */
}
#endif /* 0 */
|
934b3f | 2000-02-04 | Per Hedbor | |
|
3e3bab | 2001-01-19 | Per Hedbor | | void set_up_ftp_variables( Protocol o )
|
934b3f | 2000-02-04 | Per Hedbor | | {
|
de4b59 | 2001-01-21 | Martin Nilsson | | function(DEFVAR) defvar = o->defvar;
|
934b3f | 2000-02-04 | Per Hedbor | |
defvar( "FTPWelcome",
" +------------------------------------------------\n"
" +-- Welcome to the Roxen FTP server ---\n"
" +------------------------------------------------\n",
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(60, "Welcome text"), TYPE_TEXT,
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | LOCALE(61, "The text shown to the user on connect.") );
|
934b3f | 2000-02-04 | Per Hedbor | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar( "ftp_user_session_limit", 0, LOCALE(62, "User session limit"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(63, "The maximum number of times a user can connect at once."
|
f498ed | 2000-07-11 | Martin Nilsson | | " 0 means unlimited.") );
|
934b3f | 2000-02-04 | Per Hedbor | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar( "named_ftp", 1, LOCALE(64, "Allow named ftp"), TYPE_FLAG,
|
9b17bb | 2003-11-26 | Henrik Grubbström (Grubba) | | LOCALE(65, "If yes, non-anonymous users can connect. "
"Note that for password authentication to be performed "
"you will need to have the \"Authentication: Password\" "
"module in your site.") );
|
934b3f | 2000-02-04 | Per Hedbor | |
|
434bac | 2000-07-14 | Andreas Lange | | defvar( "guest_ftp", 1,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(66, "Allow login with incorrect password/user"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(67, "If yes, users can connect with the wrong password "
|
434bac | 2000-07-14 | Andreas Lange | | "and/or username. This is useful since things like .htaccess "
"files can later on authenticate the user."));
|
934b3f | 2000-02-04 | Per Hedbor | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar( "anonymous_ftp", 1, LOCALE(68, "Allow anonymous ftp"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | LOCALE(69, "If yes, anonymous users are allowed to connect.") );
|
934b3f | 2000-02-04 | Per Hedbor | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar( "shells", "", LOCALE(70, "Shell database"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FILE,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(71, "If this string is set to anything but the empty string, "
|
f4420e | 2002-01-11 | Henrik Grubbström (Grubba) | | "it should specify a file containing a list of valid shells. "
"Users with shells that are not in this list will not "
|
f498ed | 2000-07-11 | Martin Nilsson | | "be allowed to log in.") );
|
965a6d | 2001-04-14 | Henrik Grubbström (Grubba) | |
|
89d1d8 | 2001-05-16 | Martin Nilsson | | defvar( "passive_port_min", 0, LOCALE(257, "Passive port minimum"),
|
965a6d | 2001-04-14 | Henrik Grubbström (Grubba) | | TYPE_INT,
|
89d1d8 | 2001-05-16 | Martin Nilsson | | LOCALE(320, "Minimum port number to use in the PASV/EPSV response."));
|
965a6d | 2001-04-14 | Henrik Grubbström (Grubba) | |
|
89d1d8 | 2001-05-16 | Martin Nilsson | | defvar( "passive_port_max", 65535, LOCALE(321, "Passive port maximum"),
|
965a6d | 2001-04-14 | Henrik Grubbström (Grubba) | | TYPE_INT,
|
89d1d8 | 2001-05-16 | Martin Nilsson | | LOCALE(322, "Maximum port number to use in the PASV/EPSV response."));
|
e3d2ec | 2005-04-25 | Henrik Grubbström (Grubba) | |
|
88c3c4 | 2020-10-20 | Henrik Grubbström (Grubba) | | defvar( "passive_public_address", "", LOCALE(0, "Passive public address"),
TYPE_STRING,
LOCALE(0, "<p>IP address to report in <b>PASV</b> reply.</p>\n"
"<p>If the server is behind a network address translation "
"(NAT) layer, it may not be possible for clients to connect "
"to the local IP for the port. In that case, set the public "
"IP or host name here.</p>\n"
"<p>If left empty the local IP for the client connection "
"will be used.</p>\n"
"<p>Note: Only relevant for IPv4 as IPv6 "
"uses <b>EPSV</b>.</p>\n"));
|
359cc0 | 2005-09-30 | Anders Johansson | | defvar( "rfc2428_support", 1, LOCALE(518, "Support EPRT/EPSV"),
|
e3d2ec | 2005-04-25 | Henrik Grubbström (Grubba) | | TYPE_FLAG,
|
359cc0 | 2005-09-30 | Anders Johansson | | LOCALE(528, "Enable support for the EPRT and EPSV commands (RFC2428)."
|
e3d2ec | 2005-04-25 | Henrik Grubbström (Grubba) | | "Some firewalls don't handle these commands properly, "
"so depending on your network configuration you may need "
"to disable them. "));
|
29eaa1 | 2014-08-08 | Henrik Grubbström (Grubba) | |
|
15b8a4 | 2014-08-11 | Henrik Grubbström (Grubba) | | defvar( "require_starttls",
Variable.IntChoice
(0, ([
-1: "Disabled",
0: "Optional",
1: "Required",
]), 0,
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1078, "AUTH TLS"),
LOCALE(1079, "Whether to require the AUTH TLS command (RFC4217) "
|
15b8a4 | 2014-08-11 | Henrik Grubbström (Grubba) | | "before login.")));
|
934b3f | 2000-02-04 | Per Hedbor | | }
|
bc0dec | 2001-08-05 | Martin Nilsson | | void set_up_http_variables( Protocol o )
|
934b3f | 2000-02-04 | Per Hedbor | | {
|
de4b59 | 2001-01-21 | Martin Nilsson | | function(DEFVAR) defvar = o->defvar;
|
472b15 | 2000-02-08 | Per Hedbor | |
|
3ea9f3 | 2001-01-29 | Per Hedbor | | function do_set_cookie(Protocol o)
{
return lambda() {
return o->query("set_cookie") == 0;
};
};
|
90c12c | 2019-04-03 | Henrik Grubbström (Grubba) | | defvar("request_data_max", 0,
LOCALE(0, "Request data size limit"), TYPE_INT,
|
402131 | 2019-04-05 | Henrik Grubbström (Grubba) | | LOCALE(0, "<p>The maximum amount of data in kilobytes that a "
|
90c12c | 2019-04-03 | Henrik Grubbström (Grubba) | | "request may contain before being rejected.</p>\n"
"<p>Set to <tt>0</tt> (zero) to disable.</p>"))
->set_range(0, Variable.no_limit);
|
d21e38 | 2001-06-01 | Jonas Wallden | | defvar( "minimum_bitrate", 0, LOCALE(205, "Minimum allowed bitrate" ),
|
9c1900 | 2001-02-27 | Per Hedbor | | TYPE_INT,
|
b7bf51 | 2001-08-20 | Per Hedbor | | LOCALE(215, "The minimum allowed bitrate, in bits/second. If the "
|
9c1900 | 2001-02-27 | Per Hedbor | | "client is slower than this set bitrate, it will be "
"disconnected (after a timeout). Setting this higher than "
|
b7bf51 | 2001-08-20 | Per Hedbor | | "14000 is not recommended if you have modem users."));
|
9c1900 | 2001-02-27 | Per Hedbor | |
|
fff9e5 | 2002-04-24 | Martin Stjernholm | | defvar("show_internals", 0, LOCALE(72, "Show internal errors"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(73, "Show 'Internal server error' messages to the user. "
|
f498ed | 2000-07-11 | Martin Nilsson | | "This is very useful if you are debugging your own modules "
"or writing Pike scripts."));
|
472b15 | 2000-02-08 | Per Hedbor | |
|
dddb61 | 2001-09-29 | Martin Nilsson | | defvar("set_cookie", 0, LOCALE(74, "Logging: Set unique browser id cookies"),
|
bc0dec | 2001-08-05 | Martin Nilsson | | TYPE_FLAG,
|
4ed099 | 2003-01-15 | Henrik Grubbström (Grubba) | | LOCALE(75, "If set to Yes, all clients that accept cookies will get "
|
dddb61 | 2001-09-29 | Martin Nilsson | | "a unique 'user-id-cookie', which can then be used in the log "
"and in scripts to track individual users."));
|
472b15 | 2000-02-08 | Per Hedbor | |
|
bc0dec | 2001-08-05 | Martin Nilsson | | defvar("set_cookie_only_once", 1,
LOCALE(76, "Logging: Set ID cookies only once"),
TYPE_FLAG,
|
dddb61 | 2001-09-29 | Martin Nilsson | | LOCALE(77, "If set to Yes, Roxen will attempt to set unique browser "
|
bc0dec | 2001-08-05 | Martin Nilsson | | "ID cookies only upon receiving the first request (and "
"again after some minutes). Thus, if the user doesn't allow "
"the cookie to be set, she won't be bothered with "
"multiple requests."),0, do_set_cookie( o ));
|
472b15 | 2000-02-08 | Per Hedbor | | }
|
100300 | 2015-07-14 | Henrik Grubbström (Grubba) | | protected int hide_if_empty(RequestID id, Variable.Variable var)
{
|
1407d0 | 2017-10-30 | Henrik Grubbström (Grubba) | | return !sizeof(var->query());
|
100300 | 2015-07-14 | Henrik Grubbström (Grubba) | | }
|
8a679c | 2018-10-11 | Henrik Grubbström (Grubba) | | protected void update_ssl_suite_filter_default(Variable.Variable var)
{
int val = var->query();
if (!val || (val & 16)) {
|
d66aaf | 2018-10-11 | Henrik Grubbström (Grubba) | | if (val && !(val & 4)) {
|
6c4e67 | 2018-10-11 | Henrik Grubbström (Grubba) | | var->set_warning(LOCALE(1155, "Warning: RSA-encryption enabled."));
|
d66aaf | 2018-10-11 | Henrik Grubbström (Grubba) | | }
|
8a679c | 2018-10-11 | Henrik Grubbström (Grubba) | | return;
}
val |= 16;
if (!val & 4) {
val |= 4;
}
var->low_set(val);
}
|
3e3bab | 2001-01-19 | Per Hedbor | | void set_up_ssl_variables( Protocol o )
|
472b15 | 2000-02-08 | Per Hedbor | | {
|
de4b59 | 2001-01-21 | Martin Nilsson | | function(DEFVAR) defvar = o->defvar;
|
472b15 | 2000-02-08 | Per Hedbor | |
|
e09f99 | 2020-04-29 | Henrik Grubbström (Grubba) | | defvar( "ssl_certs", o->CertificateKeyChoiceVariable
|
1407d0 | 2017-10-30 | Henrik Grubbström (Grubba) | | (VAR_NO_DEFAULT,
|
ddad05 | 2017-12-20 | Karl Gustav Sterneberg | | LOCALE(1125, "SSL/TLS Certificate(s)"),
LOCALE(1126, "<p>The TLS certificate(s) to use.</p>\n"
|
2ad442 | 2017-11-07 | Henrik Grubbström (Grubba) | | "<p>Certificate and key files matching the "
"<b>Global Variables/Settings/Certificate and "
|
a05b31 | 2017-11-09 | Henrik Grubbström (Grubba) | | "Private Key Globs</b> setting "
|
2ad442 | 2017-11-07 | Henrik Grubbström (Grubba) | | "are automatically imported and valid "
"combinations are listed above.</p>\n"
"<p>At least one certificate must be selected.</p>\n"
"<p>The Server Name Indication (SNI) extension sent by the "
"TLS client will be used to choose a specific certificate "
"for the connection from the set selected here.</p>\n"
)));
|
1407d0 | 2017-10-30 | Henrik Grubbström (Grubba) | |
#if 1
|
e09f99 | 2020-04-29 | Henrik Grubbström (Grubba) | |
defvar("ssl_keys", Variable.IntChoice(({}), ({}), VAR_INVISIBLE,
"SSL/TLS Keypair identifiers", ""));
|
1407d0 | 2017-10-30 | Henrik Grubbström (Grubba) | |
|
85fbbc | 2004-08-19 | Henrik Grubbström (Grubba) | | defvar( "ssl_cert_file",
o->CertificateListVariable
|
ff8625 | 2017-11-07 | Henrik Grubbström (Grubba) | | ( ({ "demo_certificate.pem" }), VAR_INVISIBLE,
|
100300 | 2015-07-14 | Henrik Grubbström (Grubba) | | LOCALE(86, "SSL certificate file(s)"),
LOCALE(87, "<p>The SSL certificate file(s) to use.</p>\n"
"<p>This is a list of certificates, "
"intermediate and root certificates, and "
"corresponding private key files in any order.</p>\n"
"<p>If a path is relative, it will first be "
|
85fbbc | 2004-08-19 | Henrik Grubbström (Grubba) | | "searched for relative to %s, "
|
ff8625 | 2017-11-07 | Henrik Grubbström (Grubba) | | "and if not found there relative to %s.</p>\n")));
|
85fbbc | 2004-08-19 | Henrik Grubbström (Grubba) | |
defvar( "ssl_key_file",
o->KeyFileVariable
|
ff8625 | 2017-11-07 | Henrik Grubbström (Grubba) | | ( "", VAR_INVISIBLE, LOCALE(88, "SSL key file"),
|
85fbbc | 2004-08-19 | Henrik Grubbström (Grubba) | | LOCALE(89, "The SSL key file to use. If the path is "
"relative, it will first be searched for "
"relative to %s, and if not found there "
"relative to %s. "
"You do not have to specify a key "
"file, leave this field empty to use the "
|
100300 | 2015-07-14 | Henrik Grubbström (Grubba) | | "certificate file only. "
"This field is obsolete, since the same setting "
|
ff8625 | 2017-11-07 | Henrik Grubbström (Grubba) | | "can be done in <b>SSL certificate file(s)</b>.")));
|
1407d0 | 2017-10-30 | Henrik Grubbström (Grubba) | | #endif
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | |
|
0c22bf | 2015-12-14 | Henrik Grubbström (Grubba) | | #if constant(SSL.Constants.CIPHER_aead)
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | |
|
db79e3 | 2015-12-14 | Henrik Grubbström (Grubba) | |
|
7d76c8 | 2014-05-13 | Henrik Grubbström (Grubba) | |
|
f07085 | 2015-12-15 | Henrik Grubbström (Grubba) | |
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | |
|
755fec | 2015-04-09 | Henrik Grubbström (Grubba) | |
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | defvar("ssl_key_bits",
Variable.Int(112, 0,
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1080, "Cipher suite minimum effective key strength"),
LOCALE(1081,
|
21133f | 2015-12-15 | Henrik Grubbström (Grubba) | | "<p>The minimum number of effective bits to "
"secure connections.</p>\n"
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "<p>Common ciphers (subject to availability) "
|
f07085 | 2015-12-15 | Henrik Grubbström (Grubba) | | "in order of effective key bits as of "
"December 2015:\n"
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "<dl>\n"
|
755fec | 2015-04-09 | Henrik Grubbström (Grubba) | | "<dt>24</dt>\n"
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "<dd>Export RC4 (aka RC4-40)</dd>\n"
|
755fec | 2015-04-09 | Henrik Grubbström (Grubba) | | "<dt>32</dt>\n"
"<dd>Export DES (aka DES-40)</dd>\n"
"<dt>38</dt>\n"
"<dd>RC4</dd>\n"
"<dt>40</dt>\n"
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "<dd>DES</dd>\n"
"<dt>112</dt>\n"
"<dd>3-DES (Note that this cipher is the "
"minimum required cipher in many versions "
"of TLS)</dd>\n"
"<dt>128</dt>\n"
"<dd>AES-128</dd>\n"
"<dd>Camellia-128</dd>\n"
"<dt>256</dt>\n"
"<dd>AES-256</dd>\n"
"<dd>Camellia-256</dd>\n"
|
755fec | 2015-04-09 | Henrik Grubbström (Grubba) | | "<dd>ChaCha20</dd>\n"
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "</dl>\n"
|
6f1c14 | 2015-07-14 | Henrik Grubbström (Grubba) | | "</p>\n"
"<p>Cipher strengths lower than 112 bits are "
"<b>NOT</b> recommended, and there are RFCs that "
"prohibit the use of all those suites.</p>\n")))->
set_range(0, Variable.no_limit);
|
db79e3 | 2015-12-14 | Henrik Grubbström (Grubba) | | #endif
#if constant(SSL.ServerConnection)
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | |
|
f07085 | 2015-12-15 | Henrik Grubbström (Grubba) | | defvar( "ssl_password",
|
0c843c | 2017-11-13 | Henrik Grubbström (Grubba) | | Variable.String("", VAR_INVISIBLE,
LOCALE(1082, "SSL decryption password"),
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1083, "Optional password to decrypt the "
|
f07085 | 2015-12-15 | Henrik Grubbström (Grubba) | | "SSL key file(s).")));
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | |
defvar("ssl_suite_filter",
Variable.IntChoice(0,
([
|
8a679c | 2018-10-11 | Henrik Grubbström (Grubba) | | 0: "Roxen default policy",
16: "Allow RSA-encryption",
20: "Ephemeral key exchanges only",
24: "Suite B (allow RSA-encryption)",
28: "Suite B (ephemeral only)",
30: "Suite B (transitional)",
31: "Suite B (strict)",
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | ]),
0,
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1084, "Additional suite filtering"),
LOCALE(1085, "<p>Selects an additional cipher suite "
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "policy.</p>"
"<p>The supported filter modes are:\n"
"<dl>\n"
|
8a679c | 2018-10-11 | Henrik Grubbström (Grubba) | | "<dt>Roxen default policy</dt>\n"
"<dd>Use the Roxen default cipher suite "
"selection policy. This is currently the "
"same as <b>Ephemeral key exchanges "
"only</b>, but may differ in other "
"versions of Roxen.</dd>\n"
"<dt>Allow RSA-encryption</dt>\n"
"<dd>Allow old cipher suites that use RSA-"
"encryption for the key-exchange. "
"These suites are vulnerable to the "
"<a href='https://robotattack.org/'>"
"ROBOT</a> vulnerability, and should "
"usually <b>NOT</b> be allowed.</dd>\n"
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "<dt>Ephemeral key exchanges only</dt>\n"
"<dd>Only allow cipher suites that use a "
"key exchange with ephemeral keys (aka "
"\"Perfect Forward Security\"). Ie "
"either ECDHE or DHE.</dd>\n"
|
8a679c | 2018-10-11 | Henrik Grubbström (Grubba) | | "<dt>Suite B (allow RSA-encryption)</dt>\n"
"<dd>Same as <b>Allow RSA-encryption</b>, "
"but prefer the suites specified in "
"<b>Suite B</b>. Should usually <b>NOT</b> "
"be used.</dd>\n"
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "<dt>Suite B (ephemeral only)</dt>\n"
"<dd>Same as <b>Ephemeral key exchanges "
"only</b>, but prefer the suites specified "
"in <b>Suite B</b>.</dd>\n"
"<dt>Suite B (transitional)</dt>\n"
"<dd>Support only the suites specified by "
"RFCs 5430 and 6460.</dd>\n"
"<dt>Suite B (strict)</dt>\n"
"<dd>Support only the suites specified by "
"RFC 6460.</dt>\n"
"</dl>\n"
"</p>\n"
"<p>Note: Full Suite B operation is not "
"supported in all configurations.</p>\n"
"<p>Note: For full Suite B compliance a "
"suitable certificate must also be "
|
8a679c | 2018-10-11 | Henrik Grubbström (Grubba) | | "used.</p>")))->
set_changed_callback(update_ssl_suite_filter_default);
|
28c236 | 2014-10-22 | Henrik Grubbström (Grubba) | | #endif /* SSL.ServerConnection */
#if constant(SSL.Constants.PROTOCOL_TLS_MAX)
|
0ec172 | 2015-11-13 | Henrik Grubbström (Grubba) | | mapping(SSL.Constants.ProtocolVersion: string) ssl_versions = ([
SSL.Constants.PROTOCOL_SSL_3_0: "SSL 3.0",
SSL.Constants.PROTOCOL_TLS_1_0: "TLS 1.0 (aka SSL 3.1)",
]);
#if constant(SSL.Constants.PROTOCOL_TLS_1_1)
for (SSL.Constants.ProtocolVersion v = SSL.Constants.PROTOCOL_TLS_1_1;
v <= SSL.Constants.PROTOCOL_TLS_MAX; v++) {
ssl_versions[v] = sprintf("TLS 1.%d", v - SSL.Constants.PROTOCOL_TLS_1_0);
}
|
28c236 | 2014-10-22 | Henrik Grubbström (Grubba) | | #endif
|
0ec172 | 2015-11-13 | Henrik Grubbström (Grubba) | | defvar("ssl_min_version",
Variable.IntChoice(SSL.Constants.PROTOCOL_TLS_1_0, ssl_versions, 0,
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1086, "Minimum supported version of SSL/TLS"),
LOCALE(1087, "<p>Reject clients that want to use a "
|
08b596 | 2014-05-12 | Henrik Grubbström (Grubba) | | "version of SSL/TLS lower than the selected "
|
6f1c14 | 2015-07-14 | Henrik Grubbström (Grubba) | | "version.</p>\n"
"<p>Note: SSL 3.0 has been deprecated "
"in RFC 7568.</p>\n")));
|
28c236 | 2014-10-22 | Henrik Grubbström (Grubba) | | #endif /* SSL.Constants.PROTOCOL_TLS_MAX */
|
934b3f | 2000-02-04 | Per Hedbor | | }
|
f4b625 | 1999-09-02 | Per Hedbor | |
string get_domain(int|void l)
{
|
6bff13 | 2012-05-10 | Henrik Grubbström (Grubba) | | string s = "nowhere";
string t;
|
f4b625 | 1999-09-02 | Per Hedbor | |
|
c5e096 | 1999-10-04 | Per Hedbor | |
|
f4b625 | 1999-09-02 | Per Hedbor | |
|
c5e096 | 1999-10-04 | Per Hedbor | | t = Stdio.read_bytes("/etc/resolv.conf");
|
6bff13 | 2012-05-10 | Henrik Grubbström (Grubba) | | if (!t) return s;
if (!sscanf(t, "domain %s\n", s) && !sscanf(t, "search %s%*[ \t\n]", s)) {
return s;
|
f4b625 | 1999-09-02 | Per Hedbor | | }
|
6bff13 | 2012-05-10 | Henrik Grubbström (Grubba) | |
if (has_prefix(s, ".")) s = s[1..];
if (has_suffix(s, ".")) s = s[..sizeof(s)-2];
if (!sizeof(s)) return "unknown";
|
f4b625 | 1999-09-02 | Per Hedbor | | return s;
}
|
a59d25 | 2000-07-04 | Per Hedbor | | class PortOptions
{
inherit Variable.Variable;
constant type = "PortOptions";
|
3e3bab | 2001-01-19 | Per Hedbor | | int check_visibility(RequestID id, int a, int b, int c, int d) { return 0; }
void set_from_form(RequestID id ) { return; }
|
a59d25 | 2000-07-04 | Per Hedbor | | void create()
{
::create( ([]), 0, 0, 0 );
}
};
|
40889a | 2000-09-19 | Per Hedbor | | array(string) old_module_dirs;
void zap_all_module_caches( Variable.Variable v )
{
if( !equal( v->query(), old_module_dirs ) )
{
report_notice( "Module path changed - clearing all module caches\n" );
catch(this_object()->clear_all_modules_cache());
catch(map( this_object()->module_cache->list(),
this_object()->module_cache->delete ));
catch
{
string f = dirname( master()->make_ofilename( "tmp" ) );
foreach( glob("*.o",get_dir( f )), string ofile )
catch(rm( ofile ));
};
old_module_dirs = v->query();
}
}
|
cdb407 | 2021-04-07 | Henrik Grubbström (Grubba) | |
string module_identifier()
{
return "Global_Variables";
}
|
3bb11d | 2000-07-09 | Per Hedbor | | void define_global_variables( )
|
690adf | 1999-08-30 | Per Hedbor | | {
|
0be325 | 2008-09-25 | Martin Stjernholm | | Variable.Variable v;
|
7573ab | 2008-02-06 | Fredrik Noring | | defvar("myisamchk",
Variable.Language("Fast check and repair",
({ "Disable check",
"Fast check and repair",
"Normal check and repair",
"Medium check and repair",
"Extended check and repair" }),
|
82c020 | 2009-03-17 | Jonas Wallden | | 0, LOCALE(1014, "MySQL table check"),
LOCALE(1015, "Check MySQL tables on server start, "
|
7573ab | 2008-02-06 | Fredrik Noring | | "and automatically repair if necessary. "
"<b>Fast</b> checks only tables that haven't "
"been closed properly. "
"<b>Normal</b> checks for general errors. "
"<b>Medium</b> catches 99.99 % of all "
"errors. Should be good enough for most "
"cases. "
"<b>Extended</b> checks the tables VERY "
"throughly. Only use this in extreme cases "
"as myisamchk should normally be able to "
"find out if the table is OK even without "
"this switch.")))
->set_changed_callback(lambda(Variable.Variable s)
{
|
487d10 | 2008-02-07 | Fredrik Noring | | string options = "";
|
7573ab | 2008-02-06 | Fredrik Noring | | switch(query("myisamchk"))
{
case "Disable check":
break;
case "Fast check and repair":
|
487d10 | 2008-02-07 | Fredrik Noring | | options += "--force --fast --silent\n"
|
7573ab | 2008-02-06 | Fredrik Noring | | "--myisam-recover=QUICK,FORCE\n";
break;
case "Normal check and repair":
|
487d10 | 2008-02-07 | Fredrik Noring | | options += "--force --check\n"
|
7573ab | 2008-02-06 | Fredrik Noring | | "--myisam-recover=DEFAULT,FORCE\n";
break;
case "Medium check and repair":
|
487d10 | 2008-02-07 | Fredrik Noring | | options += "--force --medium-check\n"
|
7573ab | 2008-02-06 | Fredrik Noring | | "--myisam-recover=DEFAULT,FORCE\n";
break;
case "Extended check and repair":
|
487d10 | 2008-02-07 | Fredrik Noring | | options += "--force --extend-check\n"
|
7573ab | 2008-02-06 | Fredrik Noring | | "--myisam-recover=DEFAULT,FORCE\n";
break;
default:
error("Unknown myisamchk level %O\n",
query("myisamchk"));
return;
}
Stdio.write_file(combine_path(roxenloader.query_configuration_dir(), "_mysql_table_check"), options);
});
|
a59d25 | 2000-07-04 | Per Hedbor | | defvar("port_options", PortOptions());
defvar("RestoreConnLogFull", 0,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(90, "Logging: Log entire file length in restored connections"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(91, "If this toggle is enabled log entries for restored connections "
|
690adf | 1999-08-30 | Per Hedbor | | "will log the amount of sent data plus the restoration location. "
"Ie if a user has downloaded 100 bytes of a file already, and makes "
"a Range request fetching the remaining 900 bytes, the log entry "
"will log it as if the entire 1000 bytes were downloaded. "
"<p>This is useful if you want to know if downloads were successful "
"(the user has the complete file downloaded). The drawback is that "
"bandwidth statistics on the log file will be incorrect. The "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "statistics in Roxen will still be correct.</p>"));
|
e6f83d | 2000-03-06 | Peter Bortas | |
|
8d04b2 | 2000-09-19 | Per Hedbor | | defvar("default_font", "roxen builtin", LOCALE(92, "Default font"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FONT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(93, "The default font to use when modules request a font."));
|
690adf | 1999-08-30 | Per Hedbor | |
|
ee13d0 | 2008-02-05 | Henrik Grubbström (Grubba) | | defvar("font_dirs", roxenloader.default_roxen_font_path,
LOCALE(94, "Font directories"), TYPE_DIR_LIST,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(95, "This is where the fonts are located."));
|
690adf | 1999-08-30 | Per Hedbor | |
|
a1fee3 | 2002-08-16 | Mattias Andersson | | defvar("font_oversampling", 1, LOCALE(521, "Font oversampling"),
|
b012c2 | 2002-08-16 | Mattias Andersson | | TYPE_FLAG,
|
a1fee3 | 2002-08-16 | Mattias Andersson | | LOCALE(522, "If set to Yes, fonts will be oversampled resulting "
|
b012c2 | 2002-08-16 | Mattias Andersson | | "in higher quality but more fuzz. This will require clearing "
"of various graphics caches like the Graphic text and "
"GButton caches to take full effect."));
|
b5fe39 | 2005-12-21 | Fredrik Noring | | defvar("logdirprefix", getenv("LOGDIR") || "../logs/",
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(96, "Logging: Log directory prefix"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_STRING|VAR_MORE,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(97, "This is the default file path that will be prepended "
|
434bac | 2000-07-14 | Andreas Lange | | "to the log file path in all the default modules and the "
|
1dd64a | 2000-09-19 | Mattias Wingstedt | | "site."));
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar("cache", 0, LOCALE(98, "Cache: Proxy Disk Cache Enabled"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(99, "If set to Yes, caching will be enabled."));
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
b9a702 | 2000-07-15 | Andreas Lange | | defvar("garb_min_garb", 1,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(100, "Cache: Proxy Disk Cache Clean size"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(101, "Minimum number of Megabytes removed when a garbage collect is done."),
|
690adf | 1999-08-30 | Per Hedbor | | 0, cache_disabled_p);
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
b9a702 | 2000-07-15 | Andreas Lange | | defvar("cache_minimum_left", 5,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(102, "Cache: Proxy Disk Cache Minimum available free space and inodes (in %)"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(103, "If less than this amount of disk space or inodes (in %) "
|
434bac | 2000-07-14 | Andreas Lange | | "is left, the cache will remove a few files. This check may "
"work half-hearted if the diskcache is spread over several "
"filesystems."),
|
f498ed | 2000-07-11 | Martin Nilsson | | 0,
|
690adf | 1999-08-30 | Per Hedbor | | #if constant(filesystem_stat)
|
f498ed | 2000-07-11 | Martin Nilsson | | cache_disabled_p
|
690adf | 1999-08-30 | Per Hedbor | | #else
|
f498ed | 2000-07-11 | Martin Nilsson | | 1
|
690adf | 1999-08-30 | Per Hedbor | | #endif /* filesystem_stat */
|
f498ed | 2000-07-11 | Martin Nilsson | | );
|
23414a | 2000-07-21 | Andreas Lange | | defvar("cache_size", 25, LOCALE(104, "Cache: Proxy Disk Cache Size"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(105, "How many MB may the cache grow to before a garbage "
|
434bac | 2000-07-14 | Andreas Lange | | "collect is done?"),
0, cache_disabled_p);
|
b9a702 | 2000-07-15 | Andreas Lange | | defvar("cache_max_num_files", 0,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(106, "Cache: Proxy Disk Cache Maximum number of files"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(107, "How many cache files (inodes) may be on disk before "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "a garbage collect is done? May be left at zero to disable "
|
434bac | 2000-07-14 | Andreas Lange | | "this check."),
0, cache_disabled_p);
|
b9a702 | 2000-07-15 | Andreas Lange | | defvar("bytes_per_second", 50,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(108, "Cache: Proxy Disk Cache bytes per second"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(109, "How file size should be treated during garbage collect. "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "Each X bytes count as a second, so that larger files will "
|
434bac | 2000-07-14 | Andreas Lange | | "be removed first."),
|
690adf | 1999-08-30 | Per Hedbor | | 0, cache_disabled_p);
|
a59d25 | 2000-07-04 | Per Hedbor | | defvar("cachedir", "/tmp/roxen_cache/",
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(110, "Cache: Proxy Disk Cache Base Cache Dir"),
|
690adf | 1999-08-30 | Per Hedbor | | TYPE_DIR,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(111, "This is the base directory where cached files will "
|
434bac | 2000-07-14 | Andreas Lange | | "reside. To avoid mishaps, 'roxen_cache/' is always "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "appended to this variable."),
|
434bac | 2000-07-14 | Andreas Lange | | 0, cache_disabled_p);
|
690adf | 1999-08-30 | Per Hedbor | |
|
a59d25 | 2000-07-04 | Per Hedbor | | defvar("hash_num_dirs", 500,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(112, "Cache: Proxy Disk Cache Number of hash directories"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT|VAR_MORE,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(113, "This is the number of directories to hash the contents "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "of the disk cache into. Changing this value currently "
|
434bac | 2000-07-14 | Andreas Lange | | "invalidates the whole cache, since the cache cannot find "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "the old files. In the future, the cache will be "
|
434bac | 2000-07-14 | Andreas Lange | | "recalculated when this value is changed."),
0, cache_disabled_p);
|
b9a702 | 2000-07-15 | Andreas Lange | | defvar("cache_keep_without_content_length", 1,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(114, "Cache: Proxy Disk Cache Keep without Content-Length"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(115, "Keep files without Content-Length header information "
|
434bac | 2000-07-14 | Andreas Lange | | "in the cache?"),
0, cache_disabled_p);
|
b9a702 | 2000-07-15 | Andreas Lange | | defvar("cache_check_last_modified", 0,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(116, "Cache: Proxy Disk Cache Refreshes on Last-Modified"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(117, "If set, refreshes files without Expire header "
|
434bac | 2000-07-14 | Andreas Lange | | "information when they have reached double the age they had "
"when they got cached. This may be useful for some regularly "
"updated docs as online newspapers."),
0, cache_disabled_p);
|
b9a702 | 2000-07-15 | Andreas Lange | | defvar("cache_last_resort", 0,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(118, "Cache: Proxy Disk Cache Last resort (in days)"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(119, "How many days shall files without Expires and without "
|
434bac | 2000-07-14 | Andreas Lange | | "Last-Modified header information be kept?"),
0, cache_disabled_p);
|
690adf | 1999-08-30 | Per Hedbor | |
|
a59d25 | 2000-07-04 | Per Hedbor | | defvar("cache_gc_logfile", "",
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(120, "Cache: Proxy Disk Cache Garbage collector logfile"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FILE,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(121, "Information about garbage collector runs, removed and "
|
434bac | 2000-07-14 | Andreas Lange | | "refreshed files, cache and disk status goes here."),
0, cache_disabled_p);
|
690adf | 1999-08-30 | Per Hedbor | |
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
434bac | 2000-07-14 | Andreas Lange | | defvar("default_ident", 1,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(124, "Identify, Use default identification string"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG|VAR_MORE,
|
8148ed | 2000-09-13 | Andreas Lange | | LOCALE(125, "Setting this variable to No will display the "
"\"Identify as\" node where you can state what Roxen "
|
434bac | 2000-07-14 | Andreas Lange | | "should call itself when talking to clients.<br />"
|
8148ed | 2000-09-13 | Andreas Lange | | "It is possible to disable this so that you can enter an "
"identification-string that does not include the actual "
"version of Roxen, as recommended by the HTTP/1.0 and "
"HTTP/1.1 RFCs:"
"<p><blockquote><i>"
"Note: Revealing the specific software version of the server "
"may allow the server machine to become more vulnerable to "
"attacks against software that is known to contain security "
"holes. Server implementors are encouraged to make this field "
"a configurable option."
"</i></blockquote></p>"));
|
434bac | 2000-07-14 | Andreas Lange | | defvar("ident", replace(real_version," ","·"),
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(126, "Identify, Identify as"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_STRING ,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(127, "Enter the name that Roxen should use when talking to clients. "),
|
434bac | 2000-07-14 | Andreas Lange | | 0, ident_disabled_p);
|
635111 | 2007-06-12 | Erik Dahl | | defvar("config_header_string", "",
|
fe07f5 | 2008-01-10 | Jonas Wallden | | LOCALE(532, "Show this string in header"),
|
635111 | 2007-06-12 | Erik Dahl | | TYPE_STRING ,
|
fe07f5 | 2008-01-10 | Jonas Wallden | | LOCALE(533, "Enter a identifier that will be displayed in the head of "
|
635111 | 2007-06-12 | Erik Dahl | | " config interface. This makes it easier to distinguish "
"between different site configurations. "),
0);
|
23414a | 2000-07-21 | Andreas Lange | | defvar("User", "", LOCALE(128, "Change uid and gid to"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_STRING,
|
b39ccb | 2001-08-24 | Martin Stjernholm | | LOCALE(129, #"\
When Roxen is run as root, to be able to open port 80 for listening,
change to this user-id and group-id when the port has been opened. If
you specify a symbolic username, the default group of that user will
be used. The syntax is user[:group].
<p>A server restart is necessary for a change of this variable to take
effect. Note that it also can lead to file permission errors if the
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | Roxen process no longer can read files it previously has written.
The start script attempts to fix this for the standard file locations.</p>"));
|
434bac | 2000-07-14 | Andreas Lange | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar("permanent_uid", 0, LOCALE(130, "Change uid and gid permanently"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
8148ed | 2000-09-13 | Andreas Lange | | LOCALE(131, "If this variable is set, Roxen will set it's uid and gid "
"permanently. This disables the 'exec script as user' features "
"for CGI, and also 'access files as user' in the filesystems, but "
|
f498ed | 2000-07-11 | Martin Nilsson | | "it gives better security."));
|
690adf | 1999-08-30 | Per Hedbor | |
|
e26fa6 | 2013-11-26 | Anders Johansson | | defvar("ModuleDirs", ({ "$LOCALDIR/modules/", "modules/" }),
LOCALE(132, "Module directories"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_DIR_LIST,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(133, "This is a list of directories where Roxen should look "
|
434bac | 2000-07-14 | Andreas Lange | | "for modules. Can be relative paths, from the "
|
23414a | 2000-07-21 | Andreas Lange | | "directory you started Roxen. "
|
434bac | 2000-07-14 | Andreas Lange | | "The directories are searched in order for modules."));
|
690adf | 1999-08-30 | Per Hedbor | |
|
3434d1 | 2021-11-29 | Henrik Grubbström (Grubba) | | defvar("CertGlobs", ({
"*.pem", "certs/*.pem",
"*.cer", "certs/*.cer",
"*.key", "certs/*.key",
}),
|
ddad05 | 2017-12-20 | Karl Gustav Sterneberg | | LOCALE(1127, "Certificate and Private Key Globs"),
|
2d95bf | 2017-11-01 | Henrik Grubbström (Grubba) | | TYPE_STRING_LIST,
|
ddad05 | 2017-12-20 | Karl Gustav Sterneberg | | LOCALE(1128, "<p>This is a list of globs for which corresponding files "
|
2d95bf | 2017-11-01 | Henrik Grubbström (Grubba) | | "will automatically be imported into the certificate "
"database on server start.</p>\n"
"<p>It may be left empty, in which case any certificates "
|
a99520 | 2017-11-07 | Anders Johansson | | "to use will need to be added by hand.</p>\n"))
->set_changed_callback(lambda() {
roxenp()->background_run(0, roxenp()->scan_certs);
});
|
2d95bf | 2017-11-01 | Henrik Grubbström (Grubba) | |
|
ab6f29 | 2000-11-18 | Martin Nilsson | | defvar("Supports",
Variable.Text( "#include <etc/supports>\n",
VAR_MORE, LOCALE(134, "Client supports regexps"),
LOCALE(135, "What do the different clients support?\n<br />"
"The default information is normally fetched from the file "
"server/etc/supports in your Roxen directory.") ) )
-> add_changed_callback( lambda(Variable.Text s) {
roxenp()->initiate_supports();
cache.cache_expire("supports");
} );
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar("audit", 0, LOCALE(136, "Logging: Audit trail"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(137, "If Audit trail is set to Yes, all changes of uid will be "
|
434bac | 2000-07-14 | Andreas Lange | | "logged in the Event log."));
|
690adf | 1999-08-30 | Per Hedbor | |
|
d4a3f5 | 2014-05-12 | Henrik Grubbström (Grubba) | | #if constant(syslog)
|
1dd64a | 2000-09-19 | Mattias Wingstedt | | defvar("LogA", "file", LOCALE(138, "Logging: Debug log method"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_STRING_LIST|VAR_MORE,
|
1dd64a | 2000-09-19 | Mattias Wingstedt | | LOCALE(139, "What method to use for the debug log, default is file, "
"but "
|
690adf | 1999-08-30 | Per Hedbor | | "syslog is also available. When using file, the output is really"
" sent to stdout and stderr, but this is handled by the "
|
f498ed | 2000-07-11 | Martin Nilsson | | "start script."),
|
434bac | 2000-07-14 | Andreas Lange | | ({ "file", "syslog" }));
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar("LogSP", 1, LOCALE(140, "Logging: Log PID"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(141, "If set, the PID will be included in the syslog."), 0,
|
434bac | 2000-07-14 | Andreas Lange | | syslog_disabled);
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar("LogCO", 0, LOCALE(142, "Logging: Log to system console"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(143, "If set and syslog is used, the error/debug message "
|
434bac | 2000-07-14 | Andreas Lange | | "will be printed to the system console as well as to the "
"system log."),
|
690adf | 1999-08-30 | Per Hedbor | | 0, syslog_disabled);
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
23414a | 2000-07-21 | Andreas Lange | | defvar("LogST", "Daemon", LOCALE(144, "Logging: Syslog type"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_STRING_LIST,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(145, "When using SYSLOG, which log type should be used."),
|
434bac | 2000-07-14 | Andreas Lange | | ({ "Daemon", "Local 0", "Local 1", "Local 2", "Local 3",
"Local 4", "Local 5", "Local 6", "Local 7", "User" }),
syslog_disabled);
|
23414a | 2000-07-21 | Andreas Lange | | defvar("LogWH", "Errors", LOCALE(146, "Logging: Log what to syslog"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_STRING_LIST,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(147, "When syslog is used, how much should be sent to it?<br /><hr />"
|
434bac | 2000-07-14 | Andreas Lange | | "Fatal: Only messages about fatal errors<br />"
"Errors: Only error or fatal messages<br />"
"Warning: Warning messages as well<br />"
"Debug: Debug messager as well<br />"
"All: Everything<br />"),
({ "Fatal", "Errors", "Warnings", "Debug", "All" }),
syslog_disabled);
|
23414a | 2000-07-21 | Andreas Lange | | defvar("LogNA", "Roxen", LOCALE(148, "Logging: Log as"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_STRING,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(149, "When syslog is used, this will be the identification "
|
434bac | 2000-07-14 | Andreas Lange | | "of the Roxen daemon. The entered value will be appended to "
"all logs."),
0, syslog_disabled);
|
d4a3f5 | 2014-05-12 | Henrik Grubbström (Grubba) | | #endif // constant(syslog)
|
690adf | 1999-08-30 | Per Hedbor | |
|
0be325 | 2008-09-25 | Martin Stjernholm | | v = Variable.Flag (0, 0,
LOCALE(534, "Logging: Dump threads by file polling"),
LOCALE(535, #"\
|
0778da | 2006-10-27 | Martin Stjernholm | | <p>This option can be used to produce dumps of all the threads in the
debug log in situations where the Administration Interface doesn't
respond.</p>
<p>It works by checking for a file called \"<i><config
name></i>.dump_threads\" in the same directory as the debug log.
<i><config name></i> is the name of the server configuration,
i.e. the same as the base name of the debug log files (typically
\"default\"). If this file exists, a thread dump is generated and the
file is deleted. If a file on the form \"<i><config
name></i>.dump_threads.<i><n></i>\", where <i><n></i>
is an integer, exists then <i>n</i> thread dumps are generated in one
minute intervals.</p>
<p>Note that this method normally isn't necessary in unix-like
environments; there you can just send a SIGQUIT signal to the pike
process to get a thread dump.</p>
<p>Enabling this creates a dedicated thread.</p>"));
v->set_changed_callback (cdt_changed);
defvar ("dump_threads_by_file", v);
|
0be325 | 2008-09-25 | Martin Stjernholm | | definvisvar ("slow_req_bt_permanent", 0, TYPE_FLAG)->
set_changed_callback (
|
b1b4e4 | 2008-09-22 | Martin Stjernholm | | lambda (Variable.Variable v) {
|
0be325 | 2008-09-25 | Martin Stjernholm | | if (v->query())
set ("slow_req_bt_count", -1);
else if (query ("slow_req_bt_count") < 0)
set ("slow_req_bt_count", 0);
});
v = Variable.TmpInt (
0, 0,
|
82c020 | 2009-03-17 | Jonas Wallden | | LOCALE(1016, "Logging: Dump threads for slow requests"),
LOCALE(1017, #"\
|
0be325 | 2008-09-25 | Martin Stjernholm | | <p>This enables a monitor that dumps all the threads in the debug log
|
f931d7 | 2008-09-29 | Martin Stjernholm | | whenever any request, background job or the backend thread has been
running for more than a set number of seconds, which is configured
with the \"Slow request timeout\" and \"Slow backend timeout\"
settings.</p>
|
0be325 | 2008-09-25 | Martin Stjernholm | |
<p>This setting is a counter: A positive number stops the monitor
after that many thread dumps have been made, -1 enables the monitor
permanently, and zero disables it. Positive numbers aren't persistent,
so will be reset to zero whenever the server is restarted.</p>
<p><b>Warning:</b> If you set the timeout too low, combined with a
high or no limit, then the debug log can fill up very quickly and the
server become very slow due to the amount of logging. If that happens
and it gets difficult to change back the value then you can force the
monitor to be disabled from the start by adding the define
\"NO_SLOW_REQ_BT\" (i.e. add \"-DNO_SLOW_REQ_BT\" to the start script
or in the DEFINES environment variable).</p>
<p>Enabling this creates a dedicated thread.</p>"));
defvar ("slow_req_bt_count", v);
v->set_range (-1, Variable.no_limit);
v->set_changed_callback (
lambda (Variable.Variable v) {
int count = v->query();
set ("slow_req_bt_permanent", count < 0);
|
b1b4e4 | 2008-09-22 | Martin Stjernholm | | #ifndef NO_SLOW_REQ_BT
|
0be325 | 2008-09-25 | Martin Stjernholm | | slow_req_count_changed();
|
b1b4e4 | 2008-09-22 | Martin Stjernholm | | #else
|
82c020 | 2009-03-17 | Jonas Wallden | | v->set_warning (LOCALE(1018, "Feature disabled by NO_SLOW_REQ_BT define."));
|
0be325 | 2008-09-25 | Martin Stjernholm | | #endif
});
v = defvar ("slow_req_bt_timeout", 10.0,
|
82c020 | 2009-03-17 | Jonas Wallden | | LOCALE(1019, "Logging: Slow request timeout"),
|
0be325 | 2008-09-25 | Martin Stjernholm | | TYPE_FLOAT,
|
82c020 | 2009-03-17 | Jonas Wallden | | LOCALE(1020, #"\
|
f931d7 | 2008-09-29 | Martin Stjernholm | | <p>The timeout in seconds for requests or background jobs to trig a
thread dump. Zero disables monitoring of those. See the \"Dump threads
for slow requests\" setting for details.</p>"));
v->set_range (0.0, Variable.no_limit);
|
0be325 | 2008-09-25 | Martin Stjernholm | | v->set_precision (3);
#ifndef NO_SLOW_REQ_BT
v->set_changed_callback (lambda (Variable.Variable v) {
slow_req_timeout_changed();
});
|
b1b4e4 | 2008-09-22 | Martin Stjernholm | | #endif
|
f931d7 | 2008-09-29 | Martin Stjernholm | | v = defvar ("slow_be_bt_timeout", 0.05,
|
82c020 | 2009-03-17 | Jonas Wallden | | LOCALE(1021, "Logging: Slow backend timeout"),
|
f931d7 | 2008-09-29 | Martin Stjernholm | | TYPE_FLOAT,
|
82c020 | 2009-03-17 | Jonas Wallden | | LOCALE(1022, #"\
|
f931d7 | 2008-09-29 | Martin Stjernholm | | <p>The timeout in seconds for the backend thread to trig a thread
dump. Zero disables monitoring of it. See the \"Dump threads for slow
requests\" setting for details.</p>
<p>The backend thread is a special thread that manages most I/O and
directs the incoming requests to the handler threads. It should never
be occupied for a significant amount of time since that would make the
server essentially unresponsive. Therefore this timeout should be
small.</p>
<p>Note that a good value for this is very dependent on hardware. The
default setting here is conservative and probably should be lowered to
be of real use.</p>"));
v->set_range (0.0, Variable.no_limit);
v->set_precision (3);
#ifndef NO_SLOW_REQ_BT
v->set_changed_callback (lambda (Variable.Variable v) {
slow_be_timeout_changed();
});
#endif
|
690adf | 1999-08-30 | Per Hedbor | | #ifdef THREADS
|
79a621 | 2007-08-06 | Fredrik Noring | | defvar("numthreads", 15, LOCALE(150, "Number of threads to run"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(151, "The number of simultaneous threads Roxen will use.\n"
|
690adf | 1999-08-30 | Per Hedbor | | "<p>Please note that even if this is one, Roxen will still "
"be able to serve multiple requests, using a select loop based "
"system.\n"
"<i>This is quite useful if you have more than one CPU in "
|
b98c02 | 2001-07-31 | Per Hedbor | | "your machine, or if you have a lot of slow NFS accesses.</i></p>"
"<p>Do not increase this over 20 unless you have a "
"very good reason to do so.</p>"));
|
ab6f29 | 2000-11-18 | Martin Nilsson | | #endif // THREADS
|
690adf | 1999-08-30 | Per Hedbor | |
|
5627f1 | 2000-04-13 | Per Hedbor | | #ifndef __NT__
|
9e4c8b | 2015-12-04 | Henrik Grubbström (Grubba) | | defvar("abs_engage", 0, LOCALE(154, "Auto Maintenance: Enable Anti-Block-System"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_FLAG|VAR_MORE,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(155, "If set, the anti-block-system will be enabled. "
|
f498ed | 2000-07-11 | Martin Nilsson | | "This will restart the server after a configurable number of minutes if it "
"locks up. If you are running in a single threaded environment heavy "
"calculations will also halt the server. In multi-threaded mode bugs such as "
"eternal loops will not cause the server to reboot, since only one thread is "
"blocked. In general there is no harm in having this option enabled. "));
|
d873a6 | 2001-08-22 | Per Hedbor | |
|
9e4c8b | 2015-12-04 | Henrik Grubbström (Grubba) | | defvar("abs_timeout", 5, LOCALE(156, "Auto Maintenance: ABS Timeout"),
|
434bac | 2000-07-14 | Andreas Lange | | TYPE_INT_LIST|VAR_MORE,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(157, "If the server is unable to accept connection for this many "
|
f498ed | 2000-07-11 | Martin Nilsson | | "minutes, it will be restarted. You need to find a balance: "
"if set too low, the server will be restarted even if it's doing "
"legal things (like generating many images), if set too high you might "
"get a long downtime if the server for some reason locks up."),
|
86e901 | 2006-12-14 | Marcus Wellhardh | | ({1,2,3,4,5,10,15,30,60}),
|
8552d9 | 2001-01-13 | Martin Nilsson | | lambda() {return !query("abs_engage");});
|
7ba600 | 2020-10-09 | Henrik Grubbström (Grubba) | |
defvar("abs_vmemlimit", 0,
LOCALE(0, "Auto Maintenance: ABS Memory limit (VMEM)"),
TYPE_INT,
LOCALE(0, "Automatically restart the Roxen process if its "
"virtual memory usage grows past this limit in megabytes. "
"Set to 0 to disable."),
|
af40af | 2020-10-09 | Henrik Grubbström (Grubba) | | UNDEFINED,
|
7ba600 | 2020-10-09 | Henrik Grubbström (Grubba) | | lambda() { return !query("abs_engage");});
defvar("abs_rmemlimit", 0,
LOCALE(0, "Auto Maintenance: ABS Memory limit (RSS)"),
TYPE_INT,
LOCALE(0, "Automatically restart the Roxen process if its active "
"(aka resident) memory usage grows past this limit in "
"megabytes. Set to 0 to disable."),
|
af40af | 2020-10-09 | Henrik Grubbström (Grubba) | | UNDEFINED,
|
7ba600 | 2020-10-09 | Henrik Grubbström (Grubba) | | lambda() { return !query("abs_engage");});
|
58e3a1 | 2020-12-18 | Henrik Grubbström (Grubba) | |
defvar("abs_email", "", LOCALE(0, "Auto Maintenance: ABS Email Adress"),
TYPE_STRING,
LOCALE(0, "<p>Send ABS reports to this email adress.</p>\n"
"<p>Leaving it empty disables sending of emails.</p>\n"),
UNDEFINED,
lambda() { return !query("abs_engage");});
defvar("abs_sender", "", LOCALE(0, "Auto Maintenance: ABS Sender Adress"),
TYPE_STRING,
LOCALE(0, "<p>Send ABS reports from this email adress.</p>\n"
"<p>Leaving it empty causes the to adress to be used "
"in the <b>From</b> header, and the empty string to "
"be used in the <b>MAIL FROM</b> SMTP-command.</p>\n"),
UNDEFINED,
lambda() {
return !query("abs_engage") ||
|
4174a8 | 2020-12-19 | Jonas Walldén | | !has_value(query("abs_email"), "@");
|
58e3a1 | 2020-12-18 | Henrik Grubbström (Grubba) | | });
|
ab6f29 | 2000-11-18 | Martin Nilsson | | #endif // __NT__
|
690adf | 1999-08-30 | Per Hedbor | |
|
b50edf | 2015-12-04 | Henrik Grubbström (Grubba) | | defvar("auto_fetch_rxps", 0,
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1088, "Auto Maintenance: Enable Automatic Patch import"),
|
b50edf | 2015-12-04 | Henrik Grubbström (Grubba) | | TYPE_FLAG,
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1089, "Automatically fetch and import patches to the server "
|
b50edf | 2015-12-04 | Henrik Grubbström (Grubba) | | "from www.roxen.com."));
|
dac569 | 2000-09-19 | Andreas Lange | | defvar("locale",
Variable.Language("Standard", ({ "Standard" }) +
Locale.list_languages("roxen_config"),
0, LOCALE(158, "Default language"),
LOCALE(159, "Locale, used to localize all "
"messages in Roxen. Standard means using "
"the default locale, which varies "
|
71b9aa | 2007-05-03 | Martin Stjernholm | | "according to the values of "
"the 'LC_MESSAGES' and 'LANG' environment "
"variables.")))
|
dac569 | 2000-09-19 | Andreas Lange | | ->set_changed_callback( lambda(Variable.Variable s) {
|
8552d9 | 2001-01-13 | Martin Nilsson | | roxenp()->set_default_locale(query("locale"));
|
dac569 | 2000-09-19 | Andreas Lange | | roxenp()->set_locale();
} );
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
4e3207 | 2009-01-09 | Stephen R. van den Berg | | string secret=Crypto.MD5.hash(""+time(1)+random(100000));
|
38b81e | 2001-01-06 | Martin Nilsson | | secret = MIME.encode_base64(secret,1);
|
f21825 | 2001-01-14 | Per Hedbor | | defvar("server_salt", secret[..sizeof(secret)-3], LOCALE(8, "Server secret"),
|
b98c02 | 2001-07-31 | Per Hedbor | | TYPE_STRING|VAR_MORE|VAR_NO_DEFAULT,
|
f21825 | 2001-01-14 | Per Hedbor | | LOCALE(9, "The server secret is a string used in some "
|
38b81e | 2001-01-06 | Martin Nilsson | | "cryptographic functions, such as calculating "
"unique, non-guessable session id's. Change this "
"value into something that is hard to guess, unless "
"you are satisfied with what your computers random "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "generator has produced.") );
|
38b81e | 2001-01-06 | Martin Nilsson | |
|
4e3207 | 2009-01-09 | Stephen R. van den Berg | | secret = Crypto.MD5.hash(""+time(1)+random(100000)+"x"+gethrtime());
|
387fa6 | 2001-03-05 | Per Hedbor | |
|
b98c02 | 2001-07-31 | Per Hedbor | | definvisvar("argcache_secret","",TYPE_STRING|VAR_NO_DEFAULT);
|
4d92a6 | 2001-03-16 | Per Hedbor | | set( "argcache_secret", secret );
|
f498ed | 2000-07-11 | Martin Nilsson | | defvar("suicide_engage", 0,
|
9e4c8b | 2015-12-04 | Henrik Grubbström (Grubba) | | LOCALE(160, "Auto Maintenance: Enable Automatic Restart"),
|
f498ed | 2000-07-11 | Martin Nilsson | | TYPE_FLAG|VAR_MORE,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(161, "If set, Roxen will automatically restart after a "
|
434bac | 2000-07-14 | Andreas Lange | | "configurable number of days. Since Roxen uses a monolith, "
"non-forking server model the process tends to grow in size "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "over time. This is mainly due to heap fragmentation but "
"may also sometimes be because of memory leaks.")
|
690adf | 1999-08-30 | Per Hedbor | | );
|
f498ed | 2000-07-11 | Martin Nilsson | |
|
d873a6 | 2001-08-22 | Per Hedbor | | definvisvar( "last_suicide", 0, TYPE_INT );
defvar("suicide_schedule",
Variable.Schedule( ({ 2, 1, 1, 0, 4 }), 0,
|
9e4c8b | 2015-12-04 | Henrik Grubbström (Grubba) | | LOCALE(387,"Auto Maintenance: Restart Schedule"),
|
9fa11d | 2001-08-24 | Martin Nilsson | | LOCALE(388, "Automatically restart the "
|
d873a6 | 2001-08-22 | Per Hedbor | | "server according to this schedule.") ) )
->set_invisibility_check_callback (
lambda(RequestID id, Variable.Variable f)
{return !query("suicide_engage");}
);
|
690adf | 1999-08-30 | Per Hedbor | |
|
b50edf | 2015-12-04 | Henrik Grubbström (Grubba) | | defvar("patch_on_restart", 0,
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1090, "Auto Maintenance: Restart and apply patches"),
|
b50edf | 2015-12-04 | Henrik Grubbström (Grubba) | | TYPE_FLAG,
|
0c7a1e | 2016-09-27 | Anders Johansson | | LOCALE(1091, "Apply any pending imported patches when the server is "
|
b50edf | 2015-12-04 | Henrik Grubbström (Grubba) | | "automatically restarted."))
->set_invisibility_check_callback (
lambda(RequestID id, Variable.Variable f)
{return !query("suicide_engage");});
|
135318 | 2009-11-12 | Martin Stjernholm | | defvar ("mem_cache_gc_2", 5 * 60,
|
405caf | 2009-12-05 | Jonas Wallden | | LOCALE(1045, "Cache: Memory cache GC interval"),
|
135318 | 2009-11-12 | Martin Stjernholm | | TYPE_INT,
|
405caf | 2009-12-05 | Jonas Wallden | | LOCALE(1046, #"\
|
135318 | 2009-11-12 | Martin Stjernholm | | <p>Interval in seconds between RAM cache garbage collector runs. This
GC removes entries from the RAM caches that have timed out or are
stale for other reasons, thereby making more room for new entries. The
configured cache size limits are enforced when entries are added, so
this GC is not required to keep the cache sizes down.</p>
<p>Running this GC too seldom causes some RAM caches to contain many
invalid cache entries, which could push out valid cache entries.
Running it too often causes unnecessary server load.</p>"))
->set_range (1, Variable.no_limit);
definvisvar ("mem_cache_gc", 300, TYPE_INT);
|
38c218 | 2009-11-30 | Martin Stjernholm | | v = defvar ("mem_cache_size", 100,
|
405caf | 2009-12-05 | Jonas Wallden | | LOCALE(1043, "Cache: Memory cache size"),
|
1f6e16 | 2009-11-18 | Martin Stjernholm | | TYPE_INT,
|
405caf | 2009-12-05 | Jonas Wallden | | LOCALE(1044, #"\
|
921aa2 | 2009-11-25 | Jonas Wallden | | <p>Maximum size in MByte for all RAM caches taken together. This limit
|
1f6e16 | 2009-11-18 | Martin Stjernholm | | covers the caches visible in the <a
|
f5a209 | 2018-09-04 | Jonas Walldén | | href='/actions/?action=cachestatus.pike&class=status&_roxen_wizard_id=&form._roxen_wizard_id;'>Cache status</a> page.</p>
|
1f6e16 | 2009-11-18 | Martin Stjernholm | |
<p>Note that there are many more things in the Roxen WebServer that
take space, including some caches that are not handled by the common
RAM cache. Also, there is various indirect memory overhead that is not
directly accounted for by the size calculations. All these taken
together means that the figure configured here cannot be mapped
straightly to the size of the Roxen process as reported by the OS. The
optimal setting here is the one that in general keeps the Roxen
process at a size that avoids swapping and leaves enough memory for
buffers and other processes that need to run at the same time (e.g.
the Roxen instance of the MySQL server).</p>"));
v->set_range (1, Variable.no_limit);
v->set_changed_callback (
lambda (Variable.Int v) {
cache.set_total_size_limit (v->query() * 1024 * 1024);
});
|
e08221 | 2001-08-28 | Per Hedbor | | defvar("replicate", 0,
|
3b3eac | 2001-09-03 | Martin Nilsson | | LOCALE(163, "Enable replication system" ),
|
e08221 | 2001-08-28 | Per Hedbor | | TYPE_FLAG,
|
3b3eac | 2001-09-03 | Martin Nilsson | | LOCALE(337,"If enabled, Roxen will enable various replication systems "
|
e08221 | 2001-08-28 | Per Hedbor | | "needed to set up multiple frontend systems. You will need "
|
4cb0c6 | 2007-11-29 | Martin Stjernholm | | "a database named 'replicate' that resides in a shared mysql "
|
e08221 | 2001-08-28 | Per Hedbor | | "server for this to work. Also, all servers has to have this "
"flag set. Roxen must be restarted before changes to this "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "variable takes effect." ) );
|
e08221 | 2001-08-28 | Per Hedbor | |
|
a59d25 | 2000-07-04 | Per Hedbor | | defvar("config_file_comments", 0,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(172, "Commented config files"),
|
f498ed | 2000-07-11 | Martin Nilsson | | TYPE_FLAG,
|
23414a | 2000-07-21 | Andreas Lange | | LOCALE(173, "Save the variable documentation strings as comments "
|
434bac | 2000-07-14 | Andreas Lange | | "in the configuration files. Only useful if you read or "
"edit the config files directly."));
|
d37d5a | 2000-12-08 | Martin Nilsson | |
|
2dfc63 | 2019-09-16 | Karl Gustav Sterneberg | | defvar("image_cache_max_entry_size",
Variable.Int(128, 0,
LOCALE(0, "Image Cache Max Entry Size (MB)"),
LOCALE(0, "Max size in MB per entry in the image cache.")
)).set_range(16, 2048);
|
332ad9 | 2007-03-02 | Henrik Grubbström (Grubba) | | #ifdef SMTP_RELAY
defvar("mail_spooldir", "../var/spool/mqueue/",
"SMTP: Mail queue directory", TYPE_DIR,
"Directory where the mail spool queue is stored.");
defvar("mail_maxhops", 10, "SMTP: Maximum number of hops", TYPE_INT,
"Maximum number of MTA hops (used to avoid loops).<br>\n"
"Zero means no limit.");
defvar("mail_bounce_size_limit", 262144,
"SMTP: Maximum bounce size", TYPE_INT,
"<p>Maximum size (bytes) of the embedded message in "
"generated bounces.</p>"
"<p>Set to zero for no limit.</p>"
"<p>Set to -1 to disable bounces.</p>");
string hostname = gethostname();
array(string) hostinfo = gethostbyname(hostname);
if (hostinfo && sizeof(hostinfo)) {
hostname = hostinfo[0];
}
|
6897c9 | 2001-06-27 | Honza Petrous | |
|
332ad9 | 2007-03-02 | Henrik Grubbström (Grubba) | | defvar("mail_hostname", hostname,
"SMTP: Mailserver host name", TYPE_STRING,
"This is the hostname used by the server in the SMTP "
"handshake (EHLO & HELO).");
defvar("mail_postmaster",
"Postmaster <postmaster@" + hostname + ">",
"SMTP: Postmaster address", TYPE_STRING,
"Email address of the postmaster.");
defvar("mail_mailerdaemon",
"Mail Delivery Subsystem <MAILER-DAEMON@" + hostname + ">",
"SMTP: Mailer daemon address", TYPE_STRING,
"Email address of the mailer daemon.");
#endif /* SMTP_RELAY */
|
6897c9 | 2001-06-27 | Honza Petrous | |
#ifdef SNMP_AGENT
defvar("snmp_agent", 0, LOCALE(999, "SNMP: Enable SNMP agent"),
TYPE_FLAG|VAR_MORE,
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "If set, the Roxen SNMP agent will be anabled."
|
6897c9 | 2001-06-27 | Honza Petrous | | );
defvar("snmp_community", ({"public:ro"}), "SNMP: Community string",
TYPE_STRING_LIST,
"One community name per line. Default permissions are 'read-only'. "
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "'Read-write' permissions can be specified by appending :rw to the "
"community name (for example mypub:rw).",
|
6897c9 | 2001-06-27 | Honza Petrous | | 0, snmp_disabled);
|
6f669a | 2001-08-14 | Honza Petrous | | defvar("snmp_hostport", snmp_get_cif_domain(), "SNMP: IP address and port",
|
6897c9 | 2001-06-27 | Honza Petrous | | TYPE_STRING,
|
edab55 | 2002-01-11 | Henrik Grubbström (Grubba) | | "Agent listening IP adress and port. Format: [[host]:port] "
"If host isn't set then the IP address of the config interface "
"will be used.",
|
6897c9 | 2001-06-27 | Honza Petrous | | 0, snmp_disabled);
|
77efe6 | 2001-09-11 | Honza Petrous | |
defvar("snmp_global_traphosts", ({}),"SNMP: Trap destinations",
TYPE_STRING_LIST,
"The SNMP traphost URL for sending common traps (like coldstart).",
|
6897c9 | 2001-06-27 | Honza Petrous | | 0, snmp_disabled);
|
77efe6 | 2001-09-11 | Honza Petrous | |
|
6897c9 | 2001-06-27 | Honza Petrous | | defvar("snmp_syscontact","","SNMP: System MIB - Contact",
TYPE_STRING,
"The textual identification of the contact person for this managed "
"node, together with information on how to contact this person.",
0, snmp_disabled);
defvar("snmp_sysname","","SNMP: System MIB - Name",
TYPE_STRING,
"An administratively-assigned name for this managed node. By "
"convention, this is the node's fully-qualified domain name.",
0, snmp_disabled);
defvar("snmp_syslocation","","SNMP: System MIB - Location",
TYPE_STRING,
"The physical location of this node (e.g., `telephone closet, 3rd "
"floor').",
0, snmp_disabled);
defvar("snmp_sysservices",72,"SNMP: System MIB - Services",
TYPE_INT,
"A value which indicates the set of services that this entity "
"primarily offers.",
0, snmp_disabled);
#endif // SNMP_AGENT
|
6f669a | 2001-08-14 | Honza Petrous | | defvar("global_position",
Variable.Variable(0, VAR_INVISIBLE));
|
0040c7 | 2022-09-13 | Henrik Grubbström (Grubba) | | defvar("fsgc_starttime",
Variable.Schedule(({ 2, 2, 1, 0, 3, 0 }), 0,
"FSGC: Start time",
"<p>Time after which the Filesystem "
"Garbage Collector subsystem may run.</p>\n"
"<p>Disable this to disable the FSGC.</p>\n"
"<p>Note that other values for this setting "
"are only relevant if a <b>Stop time</b> is "
"configured, and that that setting differs from "
"this setting.</p>", (< 0, 2>)));
defvar("fsgc_stoptime",
Variable.Schedule(({ 0, 2, 1, 0, 5, 0 }), 0,
"FSGC: Stop time",
"<p>Time after which the Filesystem "
"Garbage Collector subsystem may not run.</p>\n"
"<p>Disable this or set it to the same value as "
"<b>Start time</b> to enable running the FSGC "
"at any time of the day.</p>", (< 0, 2>)));
|
3b11a9 | 2011-04-28 | Tobias Liin | | #ifdef ENABLE_OUTGOING_PROXY
defvar("use_proxy", 0,
|
6a3227 | 2011-12-21 | Jonas Wallden | | LOCALE(1052, "Proxy: Use proxy (experimental)"), TYPE_FLAG,
LOCALE(1053, "Use proxy for outgoing requests. E.g. when browsing "
|
3b11a9 | 2011-04-28 | Tobias Liin | | "external web sites through the Linkbrowser or when Insert "
"cached-href fetches data from an external location."));
defvar("proxy_url", "",
|
6a3227 | 2011-12-21 | Jonas Wallden | | LOCALE(1054, "Proxy: Proxy URL"), TYPE_STRING,
LOCALE(1055, "The URL of the proxy to use for outgoing requests."));
|
3b11a9 | 2011-04-28 | Tobias Liin | |
defvar("proxy_username", "",
|
6a3227 | 2011-12-21 | Jonas Wallden | | LOCALE(1056, "Proxy: Proxy username"), TYPE_STRING,
LOCALE(1057, "Username for proxy authorization."));
|
3b11a9 | 2011-04-28 | Tobias Liin | |
defvar("proxy_password", "",
|
6a3227 | 2011-12-21 | Jonas Wallden | | LOCALE(1058, "Proxy: Proxy password"), TYPE_STRING,
LOCALE(1059, "Password for proxy authorization."));
|
3b11a9 | 2011-04-28 | Tobias Liin | | #endif
|
690adf | 1999-08-30 | Per Hedbor | | }
|
f4b625 | 1999-09-02 | Per Hedbor | |
|
3bb11d | 2000-07-09 | Per Hedbor | | void restore_global_variables()
{
|
4d92a6 | 2001-03-16 | Per Hedbor | | mapping m = retrieve("Variables", 0);
|
3bb11d | 2000-07-09 | Per Hedbor | | setvars(retrieve("Variables", 0));
|
4d92a6 | 2001-03-16 | Per Hedbor | | if( !m->argcache_secret ) save();
|
40889a | 2000-09-19 | Per Hedbor | | old_module_dirs = query( "ModuleDirs" );
getvar( "ModuleDirs" )->add_changed_callback( zap_all_module_caches );
|
3bb11d | 2000-07-09 | Per Hedbor | | }
|
fc4039 | 2008-08-15 | Martin Stjernholm | | protected mapping(string:mixed) __vars = ([ ]);
|
f4b625 | 1999-09-02 | Per Hedbor | |
|
c5e096 | 1999-10-04 | Per Hedbor | |
|
f4b625 | 1999-09-02 | Per Hedbor | | mixed set_var(string var, mixed to)
{
return __vars[var] = to;
}
mixed query_var(string var)
{
return __vars[var];
}
|