Skip to content

Commit

Permalink
Preparation for 19.1b1
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphwetzel committed Oct 18, 2019
1 parent 9ba3cdd commit 8994b73
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.6

EXPOSE 8080

RUN pip install pip --upgrade && pip install theonionbox

COPY theonionbox.cfg /usr/local/lib/python3.6/site-packages/theonionbox

ENTRYPOINT ["/usr/local/bin/theonionbox", "-c", "/usr/local/lib/python3.6/site-packages/theonionbox/theonionbox.cfg"]
173 changes: 173 additions & 0 deletions Docker/theonionbox.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
## Configuration File for TheOnionBox
## Latest Modification: 20190811 while preparing v5.0 - which then became 19.1

[TheOnionBox]
## Address of your Onion Box:
## This defaults to 127.0.0.1 to listen *only* on the local loopback interface.
host = 0.0.0.0
## If 'localhost', connections are limited to the local system.
# host = localhost
## Of course you may define a dedicated IP4 address as well.
# host = your.IP.4.address

## Port for the Web Server
## Defaults to 8080, which should be fine in most cases!
# port = 8080

## To define the lower threshold for the notification system:
## Messages (of the Box) with at least this level will be forwarded to the attached clients.
## Possible setting are DEBUG, INFO, NOTICE, WARNING, ERROR
## Defaults to NOTICE, case insensitive
## To 'DEBUG' or 'TRACE' the box you have to set the respective commandline parameters!
# message_level = NOTICE

## Per default, the Box operates at the root level of a domain e.g. http://localhost:8080/.
## If you intend to operate it (behind a proxy!) at a deeper level (e.g. @ http://my.server.com/theonionbox/)
## you have to define that base path here. You are not limited to a single path element.
## Please assure that this is an absolute filepath yet without the domain:port, beginning with a leading slash,
## no trailing slash, no quotation marks:
# base_path = /theonionbox

## The acceptable duration in seconds between two communication events of a client to the Box.
## If this duration is exceeded, the Box will expire the session. Default is 300 (seconds).
# session_ttl = 300
## Note: This is applicable for login procedures as well as monitoring activities.
## Note: The minimum duration accepted == 30, max == 3600. Values will be forced into that range.

## Shall we operate with SSL?
## Note: To actually make this running, you have to create a valid ssl certificate first:
## So run e.g.
## openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
##
## DON'T distribute this combined private/public key to clients!
## (see http://www.piware.de/2011/01/creating-an-https-server-in-python/#comment-11380)
##
## The file that holds the Certificate!
# ssl_certificate = server.pem
## The file that holds the Key!
# ssl_key = private_key.pem

## When a NTP server is provided
## we use it's time signal to compensate for the server's clock deviations
# ntp_server = pool.ntp.org
# ntp_server = fritz.box

## Tor ships with the GeoIPLight2 Country DB
## If you're interested in a more precise indication, you should install the GeoIP City DB
## e.g. from http://dev.maxmind.com/geoip/geoip2/geolite2/ and define here the path to the db file.
## Both flavours (Full or Light) are supported.
# geoip2_city = path/to/geoip2/city/db.mmdb
## Be aware that you need to install python module 'geoip2' as well to access those information.

## Path to store the database file for persistance of e.g. bandwidth data.
## Defaults to a system defined temporary directory.
# persistance_dir = /home/pi/theonionbox
## Be aware, that you have to assure write privileges to this directory for the user running your box.

[Tor]
## How shall we establish the connection to your primary (controlled) Tor node?
## => via a ControlSocket (define additionally 'socket' parameter):
# control = socket
## => via a ControlPort (define additionally 'host' & 'port' parameter):
# control = port
## => via a Proxy (define a proxy via the [Proxy] section and set 'host' to an address reachable through this proxy):
# control = proxy
## Note: This defaults to control = port if not defined!

## Address of this Tor instance
## Do NOT use 'localhost' but 127.0.0.1 to connect locally
## Defaults to 127.0.0.1
# host = 127.0.0.1

## ControlPort of this Tor instance
## Default for a Relay (or Bridge)
# port = 9051
## Default for a TorBrowser
# port = 9151
## You may use 'auto' (port = auto) to test for 9051 (relay default) and 9151 (browser default)
# port = auto
## Note: This defaults to port = auto if not defined!

## ControlSocket of this Tor instance
# socket = /var/run/tor/control

## Authorization Cookie - necessary to access a Tor node via a hidden service utilizing HiddenServiceAuthorizeClient
# auth_cookie = YourCookieHereLength22
## There's no default value for this option.

# TODO 20190811: [Tor] options below this line are deprecated!

## Timeout when connecting to Tor.
## Usually the connection should be established very quick;
## you may increase this if connecting to very remote systems.
# timeout = 5

## The Number of Seconds we keep the connection to
## Tor open after the last user disconnected.
## Hint: The minimum reasonable TTL is > 30(s)
## Defaults to 30 (seconds)
## eg. 1 day
# ttl = 86400
## eg. 1 hour
# ttl = 3600
## eg. forever
# ttl = -1

## Switches to preserve the messages of the Relay
## Up to 400 messages (total) will be preserved
## The severity of these messages can be defined here
## There's one switch for ERR, WARN & NOTICE
## The default setting is 'on' for all of these
## There's NO switch for INFO & DEBUG (as this would flood the memory without true value)
## Live - transmission of messages can be switched on/off in the client
# tor_preserve_ERR = no
# tor_preserve_WARN = no
# tor_preserve_NOTICE = no


[TorProxy]
## These parameters configure a connection to a Tor node acting as SocksProxy into the Tor network.
## Note: Operation via a proxy given by a unix domain socket is (as of 04/2017) not supported!

## If you establish connection cookies for hosts to be controlled via the control center, there is the need
## to verify that those cookies are defined. To perform the verification, we need valid control port
## settings of the node acting as proxy:

## How shall we establish the connection to the node?
## => via a ControlSocket (define additionally 'socket' parameter):
# control = socket
## => via a ControlPort (define additionally 'port' parameter):
# control = port
## You may use control = tor to operate with the node configured in [Tor]
# control = tor
## Note: This defaults to control = tor if not defined!

## Address of the proxy to use
## Do NOT use 'localhost' but 127.0.0.1 to connect locally
## You may use 'tor' (host = tor) to use [Tor]host
# host = tor
# host = 127.0.0.1

## SocksPort of the proxy
## Default for a Relay (or Bridge)
# proxy = 9050
## Default for a Tor Browser
# proxy = 9150
## You may use 'auto' (proxy = auto) to test for 9050 (relay default) and 9150 (browser default)
# proxy = auto
## Note: This defaults to proxy = auto if not defined!

## ControlPort of the proxy Tor node
## Default for a Relay (or Bridge)
# port = 9051
## Default for a Tor Browser
# port = 9151
## You may use 'auto' (port = auto) to test for 9051 (relay default) and 9151 (browser default)
# port = auto
## You may use 'tor' (port = tor) to use [Tor]port
# port = tor

## ControlSocket of the proxy Tor node
# socket = /var/run/tor/control
## You may use 'tor' (socket = tor) to use [Tor]socket
# socket = tor
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ def generate_data_files(data_files):
('service/FreeBSD', ['FreeBSD/theonionbox.sh']),
('service/init.d', ['init.d/theonionbox.sh']),
('service/systemd', ['systemd/theonionbox.service']),
('service/Docker', ['Docker/Dockerfile', 'Docker/theonionbox.cfg']),
('support', []),
('support/osxtemp', []),
('support/osxtemp/libsmc', ['support/osxtemp/libsmc/LICENSE', 'support/osxtemp/libsmc/Makefile']),
Expand Down
4 changes: 2 additions & 2 deletions theonionbox/config/theonionbox.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

[TheOnionBox]
## Address of your Onion Box:
## This defaults to 0.0.0.0 to listen on all interfaces.
# host = 0.0.0.0
## This defaults to 127.0.0.1 to listen *only* on the local loopback interface.
# host = 127.0.0.1
## If 'localhost', connections are limited to the local system.
# host = localhost
## Of course you may define a dedicated IP4 address as well.
Expand Down
2 changes: 1 addition & 1 deletion theonionbox/stamp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__title__ = 'The Onion Box'
__description__ = 'Dashboard to monitor Tor node operations.'
__version__ = '19.1b1'
__stamp__ = '20191018|222143'
__stamp__ = '20191018|223636'

0 comments on commit 8994b73

Please sign in to comment.