# Filetea configuration file
# ---------------------------------
# The syntax of this file complies with the GLib key-value file
# parser.  Basically, a set of key-value pairs are grouped into named
# groups. See http://developer.gnome.org/glib/2.29/glib-Key-value-file-parser.html#glib-Key-value-file-parser.description
# for more information.

# The [node] group is where global configuration is stored.
# It MUST always be present in a valid configuration file.
[node]

# The 'id' property is a short string that identifies the node. It
# allows a node to rely a download request to other node, hence
# enabling multiple Filetea servers to work together. The 'id' is
# embedded in all urls generated by a node for a shared file.
# The 'id' property is REQUIRED.
id=1a0

# The 'standalone' property tells Filetea whether to run its own Web
# server (true) or use an external server for serving static HTML
# content (false). Currently, only standalone mode is supported, so
# this is ignored by now.
# Default value is 'true'.
#standalone=true

# Maximum global input bandwidth for the node, in kilobytes.
# Float values are accepted.
# Default is 0 (unlimited).
max-bandwidth-in=0.0

# Maximum global output bandwidth for the node, in kilobytes.
# Float values are accepted.
# Default is 0 (unlimited).
max-bandwidth-out=0.0

# The 'source-id-start-depth' property specifies the initial depth of the hashes
# created for shared files. It is a number between 10 and 19. Short
# depths can increment the chance of collision (in which case the node automatically
# increments the depth) and could damage anonimity (an attacker could brute force to
# find shared files); while large depths result in longer urls. Default value is 19.
source-id-start-depth=19

# The 'user' and 'group' properties specify the user/group that will
# own the process after 'root' drops privileges.
# The 'group' property is not currently implemented.
#user=nobody
#group=nogroup

# 'pid-file' property sets the absolute filename where daemon's
# PID is written. Comment it or leave it blank to disable.
#pid-file=/var/run/filetea.pid

# 'jquery-dir' specifies the absolute path to the directory where the
# jquery javascript file resides. The directory must contain a file
# named 'jquery.min.js'.
# Default value is '/usr/share/javascript/jquery/'.
#jquery-dir=/usr/share/javascript/jquery/

# The [http] group stores HTTP-specific configurations.
[http]

# 'enabled' property activates/deactivates plain HTTP service.
# Default value is 'true'.
enabled=true

# 'port' property specifies the HTTP port on which to listen.
# Default is 8080.
port=8080

# 'force-https' tells FileTea whether to redirect all non-HTTPS
# traffic to the HTTPS service instead. If this property is set to
# 'true', the HTTPS service should be enabled in the [https] section.
# Default value is 'false'.
force-https=false

# 'external-base-url' is the actual URL that will be used
# to access this node from outside (e.g, when there is a reverse proxy
# sitting in the middle). Omit or leave blank if the node is directly
# accessible.
#external-base-url=

# The [https] group stores HTTPS-specific configurations.
[https]

# 'enabled' property activates/deactivates HTTPS service.
# Default value is 'false'.
enabled=false

# 'port' property specifies the HTTPS port on which to listen.
# Default is 4430.
#port=4430

# 'cert' and 'key' properties respectively specify the X.509
# certificate and private key filenames to be used for the SSL/TLS
# handshake.
#cert=/etc/ssl/certs/ssl-cert-snakeoil.pem
#key=/etc/ssl/private/ssl-cert-snakeoil.key

# 'dh-depth' specifies the bit depth of the Diffie-Hellman parameters
# to use in SSL/TLS. The parameters will be created randomly upon
# daemon startup.
# A value of '0' disables it.
#dh-depth=0

# The transfer group stores configuration specific to an active file
# transfer between two peers.
[transfer]

# Maximum input bandwidth for a single transfer, in kilobytes.
# Float values are accepted.
# Default is 0 (unlimited).
max-bandwidth-in=0.0

# Maximum output bandwidth for a single transfer, in kilobytes.
# Float values are accepted.
# Default is 0 (unlimited).
max-bandwidth-out=0.0

# The log group contains options related to daemon and HTTP message
# logging.
[log]

# 'http-log-file' option specifies the filename where to append HTTP
# access log entries in an Apache-like format.
# Leave it blank to disable web access logging (the default).
#http-log-file=/var/log/filetea-http.log

# Group names starting with 'peer-' represent other nodes available
# for relaying download requests. Each of these groups MUST specify an
# 'id' property and an 'url' property. Download requests will be
# redirected to the specific node whose 'id' is encoded in the url of
# the requested file. Multiple peer nodes can be specified, each in
# its own group.

# Note: Relying requests to peer nodes is not currently implemented.

# Sample peer-node with id 'abc'.
#[peer-abc]
#id=abc
#url=http://some.other.node.net:8080

# Sample peer-node with id 'xyz'.
#[peer-xyz]
#id=xyz
#url=https://some.other.node1.net
