###########################################################
# InfoService Configuration
# Version IS.08.000
###########################################################

###########################################################
#
# HardwareListeners : Commaseparated list of interfaces, where this InfoService will listen on
#                     (interfaces which are bound on the local machine).
#                     The single elements have the format:
#                     IP:port or hostname:port
#
# VirtualListeners :  Commaseparated list of interfaces, which are announced by this infoservice
#                     (where others from outside can reach this infoservice).
#                     The single elements have the format:
#                     IP:port or hostname:port
#
# You need at least one HardwareListener .VirtualListeners are optional, as normally you will have the
# same values for HardwareListeners and VirtualListeners. Only if you use some kind of NAT,
# there can be a need for different HardwareListeners and VirtualListeners.
#
###########################################################

HardwareListeners  = 127.0.0.1:6543
#VirtualListeners = 127.0.0.1:6543


###########################################################
#
# Distributed InfoService properties:
#
# ownname          : Set the InfoService name, it's just a comfort function.
# neighbours       : Commaseparated list of interfaces of neighbour InfoServices. This list
#                    is used every time we don't know any InfoServices and have to send some
#                    information (especially for the announcement at startup). The format of
#                    the elements is the same as for Listeners.
# modePassive      : If false, this InfoService does not propagate any information, but only fetches  
#                    infos from other InfoServices and passively stores it. Default is false.
#
###########################################################

ownname = infoservice
neighbours=127.0.0.1:6544
#modePassive = false

###########################################################
#
# Options for testing and creating signatures:
#
# privateKeyFile                     : PKCS12 file with the private key for this infoservice. This
#                                      key is used for signing the our own infoservice HELO
#                                      messages. Start the infoservice with the parameter
#                                      --generatekey for creating one privkey.pfx + pubkey.cer.
#                                      You have to distribute the pubkey.cer file to all
#                                      infoservices, which should accept the HELO messages of our
#                                      infoservice or let it sign from a root instance which is
#                                      accepted from the other infoservices. We need
#                                      authentification of the infoservices, otherwise there would
#                                      be the possibility of a DoS attac in the infoservice
#                                      network. If this value is empty, the HELO messages of this
#                                      infoservice will not be signed. Unless signature
#                                      verification is disabled on other infoservices, they will
#                                      not accept unsigned messages.
# checkSignatures                    : If false, all messages will be accepted without checking
#                                      the signatures. This value should be set to false only for
#                                      debug reasons. The default value is true.
# trustedRootCertificateFiles        : Commaseparated list of X509 public key files, accepted for
#                                      verifiying appended certificates in mix
#                                      messages. The infoservice only distributes documents with
#                                      verified signatures (with exception of the own infoservice
#                                      entry, which is always distributed). The X509 certificates
#                                      can be stored in normal or BASE64 encoded files. This value
#                                      is only meaningful, if checkSignatures is not false.
# trustedMixCertificateFiles         : Commaseparated list of X509 public key files used for
#                                      direct signature verification of mix messages, if the
#                                      appended certificates cannot be verified against one of the
#                                      root certificates. There is no need to add certificates
#                                      here, if every mix uses a certificate which can be derived
#                                      from one of the root certificates specified above. This
#                                      value is only meaningful, if checkSignatures is not false.
# trustedInfoServiceRootCertificateFiles: Commaseparated list of X509 public key files, accepted for
#                                      verifiying appended certificates in infoservice
#                                      messages. The infoservice only distributes documents with
#                                      verified signatures (with exception of the own infoservice
#                                      entry, which is always distributed). The X509 certificates
#                                      can be stored in normal or BASE64 encoded files. This value
#                                      is only meaningful, if checkSignatures is not false.
# trustedInfoServiceCertificateFiles : Commaseparated list of X509 public key files used for
#                                      direct signature verification of infoservice messages, if
#                                      the appended certificates cannot be verified against one of
#                                      the root certificates. There is no need to add certificates
#                                      here, if every infoservice uses a certificate which can be
#                                      derived from one of the root certificates specified above.
#                                      This value is only meaningful, if checkSignatures is not
#                                      false.
# trustedUpdateCertificateFiles      : Commaseparated list of X509 public key files used for
#                                      direct signature verification of update messages for the
#                                      JAP client. Update messages are not verified against the
#                                      root certificates, so you have to specify the update
#                                      messages public key file here in order to accept update
#                                      messages. This value is only meaningful, if checkSignatures
#                                      is not false.
# checkMixSignatures                   should we check signatures of mixes ?
# checkInfoServiceSignatures           should we check signatures of infoservices ?
# checkUpdateSignatures                should we check signatures of update messages ?
###########################################################
privateKeyFile = private.pfx
checkSignatures = false
checkMixSignatures = false
checkInfoServiceSignatures = false
checkUpdateSignatures = false
trustedRootCertificateFiles =
trustedInfoServiceRootCertificateFiles =
trustedMixCertificateFiles =
trustedInfoServiceCertificateFiles =
trustedUpdateCertificateFiles =
trustedTermsCertificateFiles =
trustedPICertificateFiles =


###########################################################
#
# Logging options:
#
# See Log4j for more details
#
# log4j.rootCategory                  DEBUG, INFO, WARN, ERROR, FATAL
#
###########################################################

#log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=InfoService.log
log4j.appender.A1.MaxBackupIndex=5
log4j.appender.A1.MaxFileSize=2000000
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=[%d{ISO8601} - %p] %m%n
log4j.rootCategory=WARN,A1


###########################################################
#
# Advanced Logging options:
#
# messageDetailLevel : Sets the detail level of every message which is logged. The detail level can
#                      be 0, 1, 2 or 3.
#                      Level 0: Only a short message is logged.
#                      Level 1: Some more information (like the current class) is logged.
#                      Level 2: Log some more information, e.g. the current method
#                      Level 3: Full information including stack trace is logged.
#
###########################################################

messageDetailLevel = 3


###########################################################
#
# Some options for JAP update information stuff:
#
# rootOfUpdateInformation : 	Whether we are the "root" of the information about JAP updates.
#                               default: false
#                               The values can be "true" or "false". If this is enable then we are
#                               the "root" of the JAPUpdate information and read the update files
#                               every 10 minutes from disk and update the internal stored
#                               information. If it is disabled (the default), the infoservice waits
#                               until it receives the information from the web (every infoservice
#                               posts the current update information every 10 minutes to the
#                               neighbours) and stores it non-persistent.
# japReleaseFileName          : This value is only needed, if rootOfUpdateInformation is enabled.
#                               Path and filename to the Java WebStart configuration file for the
#                               release version of the JAP client software.
# japDevelopmentFileName      : This value is only needed, if rootOfUpdateInformation is enabled.
#                               Path and filename to the Java WebStart configuration file for the
#                               development version of the JAP client software.
# japMinVersionFileName       : This value is only needed, if rootOfUpdateInformation is enabled.
#                               Path and filename to the file with the information about the minimal
#                               required JAP version.
# japMinVersionFileNameOld    : This value is only needed, if rootOfUpdateInformation is enabled AND japUpdatePropability<1.
# (optional)                    Path and filename to the file with the information about the old minimal
#                               required JAP version. This version is told to the clients with propability 1-japUpdatePropability.
# japUpdatePropability        : This value is only needed, if rootOfUpdateInformation is enabled. It is the propability with which a new
# (optional)                    minimal version (as given by japMinVersionFileName) is told to the clients (which might force them to update).
#                               Otherwise the value given in the file japMinVersionFileNameOld is told to the clients.
#                               If japMinVersionFileNameOld is not set, japUpdatePropability=1.0
#                               Should be >0.0 and <=1.0.
#                               Default: 1.0
#
#
# updateInformationPrivateKey : This value is only needed, if rootOfUpdateInformation is enabled.
#                               It is the path and the filename of a PKCS12 private key file for
#                               signing the update information. If rootOfUpdateInformation is
#                               enabled but this value is blank, the update information will not
#                               be signed. Unless signature verification is disabled on other
#                               infoservices and the JAP clients, they will not accept unsigned
#                               information. It's also not possible to store signed update
#                               information in the files specified above because some parts of
#                               the updates structures are generated ony the fly within the
#                               infoservice everytime the update files are read from disc.
# jreVersionsFileName         : This value is optional, if rootOfUpdateInformation is enabled.
#                               Otherwise, it is not used at all. It containts the path to
#                               an XML file where the latest java versions are stored that are known
#                               ordered by vendor.
#
###########################################################

rootOfUpdateInformation = false
japReleaseFileName = japRelease.jnlp
japDevelopmentFileName = japDevelopment.jnlp
japMinVersionFileName = japMinVersion.xml
updateInformationPrivateKey = private.pfx
jreVersionsFileName = jreVersions.xml
messageFileName = messages.xml


###########################################################
#
# Maximal number of bytes read from the incoming stream of an HTTP POST command. Longer POST
# messages will be thrown away.
#
###########################################################

maxPOSTContentLength = 40000

###########################################################
#
# Maximal number of concurrent connections
#
###########################################################

maxNrOfConcurrentConnections = 250

###########################################################
#
# Some options for the write out of mixcascade status statistics.
#
# statusStatistics         : Whether the infoservice should make some statistics about the
#                            mixcascades. The data for the statistics are taken from the status
#                            messages of the mixcascades. The values can be "enabled" or
#                            "disabled".
# statusStatisticsInterval : This value is only needed, if statusStatistics is set to enabled.
#                            The period in minutes after that the statistics are reset and the
#                            values are written to the log files. The statistics are witten to the
#                            files after the system clock reaches a full period, so if you supply
#                            60 minutes, the log files are written every full hour. So the first
#                            period can be shorter than the supplied time.
# statusStatisticsLogDir   : This value is only needed, if statusStatistics is set to enabled.
#                            The directory where to write the log files. The name must end with a
#                            slash or backslash. Every mixcascade has an own logfile with the
#                            name "logStatusMIXCASCADEID.log", where MIXCASCADEID is replaced by
#                            the ID of the mixcascade. If there are characters in MIXCASCADEID,
#                            which are not a letter or a digit, they are replaced by "_".
#
###########################################################

statusStatistics = disabled
statusStatisticsInterval = 60
statusStatisticsLogDir = ./log/


###########################################################
#
# Only for compatibility with some steam-powered scripts written before world war II.
#
# proxyAddresses : Leave it empty, if you don't have any idea what this is for.
#
###########################################################

proxyAddresses =


###########################################################
#
# Options for fetching the tor nodes list. This list is used by the JAP clients with tor
# integration for connecting to the tor network.
#
# fetchTorNodesList         : Whether the infoservice shall fetch the current list of tor nodes
#                             from the tor directory servers. The value can be "enabled" or
#                             "disabled".
# fetchTorNodesListInterval : This value is only needed, if fetchTorNodesList is set to enabled.
#                             The period in seconds after that the tor nodes list is fetched
#                             again.
# torDirectoryServers       : This value is only needed, if fetchTorNodesList is set to enabled.
#                             A commaseparated list of URLs of tor directory servers, where this
#                             infoservice can fetch the tor nodes list from (we need original
#                             tor directory servers here, not JAP infoservices with the list).
#                             This setting is only for the initial request of the TOR server
#                             list. If we obtained the list once, it is parsed and we use the
#                             TOR directory servers from that list for the further requests.
#                             The raw format and the ZLIB compressed format of the TOR server list
#                             are supported. The raw format is available under the filename / and
#                             the ZLIB compressed format is available under the filename /dir.z
#                             (since TOR version 0.0.9) on a TOR directory server. So / or /dir.z
#                             should be the filename in every URL specified here. From the TOR
#                             nodes list obtained TOR directory servers, will only be asked under
#                             /dir.z.
#
###########################################################

fetchTorNodesList = disabled
fetchTorNodesListInterval = 600
torDirectoryServers = http://moria.seul.org:9031/tor/server/all.z

###########################################################
#
# Options for fetching the mixminion nodes list. This list is used by the JAP clients with mixminion
# integration for connecting to the mixminion network.
#
# fetchMixminionNodesList   : Whether the infoservice shall fetch the current list of mixminion nodes
#                             from the tor directory servers. The value can be "enabled" or
#                             "disabled".
# fetchMixminionNodesListInterval : This value is only needed, if fetchMixminionNodesList is set to enabled.
#                             The period in seconds after that the mixminion nodes list is fetched
#                             again.
# torDirectoryServers       : This value is only needed, if fetchMixminionNodesList is set to enabled.
#                             A commaseparated list of URLs of mixminion directory servers, where this
#                             infoservice can fetch the mixminion nodes list from (we need original
#                             mixminion directory servers here, not JAP infoservices with the list).
#                             This setting is only for the initial request of the mixminion server
#                             list. If we obtained the list once, it is parsed and we use the
#                             mixminion directory servers from that list for the further requests.
#
#
###########################################################

fetchMixminionNodesList = disabled
fetchMixminionNodesListInterval = 600
mixminionDirectoryServers = http://mixminion.net/directory/Directory.gz

###########################################################
#
# Here are some options for the JAP forwarder list. If this infoservice keeps a primary forwarder
# list, blockees can ask this infoservice for a forwarder entry. Also forwarders can do a request
# for putting them on that list. If this infoservice doesn't have such a list, requests from
# blockees are redirected to an infoservice with a forwarder list (if we know one) and requests
# from forwarders are rejected.
#
# primaryForwarderList : Whether this infoservice shall hold a primary forwarder list ("enabled")
#                        or not ("disabled").
#
###########################################################

primaryForwarderList = enabled

###########################################################
#
# The following are options realted to Dynamic Cascades.
# They mainly influence the aggrement protocol used and how Cascades are build,
# if a aggreement was successful
#
###########################################################
# The global timeout for the EMC protocol.
# Notice that emcGlobalTimeout has to be >= 1.5 * emcConsensusLogTimeout
#emcGlobalTimeout=100000

# The local log timeout for EMC. Notice that emcConsensusLogTimeout has to be
# greater than passivePhaseLength
#emcConsensusLogTimeout=65000

# Time between commitment and reveal phase
#agreementPhaseGap=25000

# Passive phase before the actual agreement. Needed to overcome clock drift (
#For EMC, this has to be greater than 60000)
#passivePhaseLength=60000

# Local round timeout for paxos. Notice that in the first round the timeout is
#passivePhaseLength + paxosRoundTimeout
#paxosRoundTimeout=30000

# Hour of day in which dynamic cascades should be built, e.g. 5 for 5 a.m.
#(For testing, this is the minutes modulus)
#hourOfAgreement=15

# Minimal lenght of dynamic cascades
#minCascadeLength=2

# Max length of dynamic cascades
#maxCascadeLength=3

# Algorithm to use for agreement
#agreementMethod=infoservice.agreement.paxos.integration.InfoServicePaxosAdapter
#agreementMethod=infoservice.agreement.multicast.InfoserviceEMCAdapter

# Strategy for building dynamic cascades
#cascadeBuildingStrategy=infoservice.dynamic.ComleteRandomStrategy

# The log level for the agreement file log
#logLevel=INFO

###########################################################
#
# Options regarding Cascade performance measurement. 
# Please do not set/change the safe defaults if you do not know how these settings work together.
#
# perf                      : [true|false] activate/decativate performance measurement; default is "true"
# perf.proxyHost            : The listen host of the local JonDo client interface which the InfoService uses to conenct to the MixCascades. 
#                             Default is "localhost".
# perf.proxyPort            : The listen host of the local JonDo client interface. Default is "4001".
# perf.dataSize             : [bytes] The size of data which is transfered on each single performance test for a Cascade. Default is 200000.
# perf.majorInterval        : [milliseconds] Wait at least this interval for starting a new test for all currently known Cascades. 
#                             The time for measuring all Cascades is part of the waiting time for the interval. If the InfoService,
#                             for example, took 60 seconds for measuring all Cascades, and the waiting time is 240000, then
#                             the InfoService pauses another 180 seconds before starting the next performance tests.
#                             Default is "240000".
# perf.maxWaitForSingleTest : [milliseconds] The time after which all tests of a Cascade within majorInterval are skipped. 
#                             This prevents very long tests of extremely slow Cascades. Default is 60000. 
# perf.requestsPerInterval  : [positive integer] Defines the number of performance requests to each Cascade that are launched when this
#                             Cascade is measured every majorInterval. Values > 1 are proposed so that propability gets
#                             higher to get at least one valid measurement per majorInterval. Default is "2"
# perf.directory            : [relative path] The directory, relative to the location of the InfoService.jar, where the account
#                             files for measuring paid Cascades are stored. Default is "accounts".
#                             Please create this account directory and copy  your account files to it.
# perf.passw                : [string] set the password for decrypting encrypted account files.
#                             We, however, recommend not to encrypt the account files used in the InfoService
# perf.blackList            : Comma-separated list of IP adresses or domain names of Cascades that are not allowed to
#                             be measured. Useful if the InfoService is in the same network as Entry/Exit Mixes, which
#                             might produce invalid results.
# perf.whiteList            : Comma-separated list of IP adresses or domain names of Cascades that should be measured
#                             even if the entry/exit address is the same as that of the InfoService. Otherwise, the 
#                             InfoService would automatically refuse measurement of this Cascade.
#
###########################################################

#perf = true
#perf.proxyHost = localhost
#perf.proxyPort = 4001
#perf.dataSize = 200000
#perf.majorInterval = 150000
#perf.maxWaitForSingleTest = 50000
#perf.requestsPerInterval = 1
#perf.maxConnectionErrorsPerRequest = 4
#perf.directory = accounts
#perf.passw =  
#perf.blackList =
#perf.whiteList =