Skip to content

fix some stuff ... #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions bin/tor2web.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

tor2web=./bin/tor2web
#tor2web=tor2web

datadir=/run/user/$UID/tor2web-data

if ! [ -e tor2web.conf ]; then
cp -v tor2web.conf.example tor2web.conf
fi

mkdir -p $datadir
mkdir -p $datadir/certs
mkdir -p $datadir/logs
mkdir -p $datadir/run

touch $datadir/certs/tor2web-key.pem
touch $datadir/certs/tor2web-cert.pem

if ! [ -e $datadir/templates/ ]; then
cp -r data/templates/ $datadir/
fi

if [ -e $datadir/run/rpc.socket ]; then
rm $datadir/run/rpc.socket
fi

exec $tor2web -c tor2web.conf --rundir $datadir/run --pidfile $datadir/tor2web.pid --nodaemon
121 changes: 121 additions & 0 deletions tor2web.conf.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Tor2web configuration file
[main]

listen_port_http = 1582
listen_port_https = 15443

# Unique nodename identifier
# nodename = [UNIQUE_IDENTIFIER]
# nodename = localhost

# Path to Tor2web data directory
# datadir = /home/tor2web
datadir = /run/user/1000/tor2web-data

# Debug and logging
# logreqs = False
# debugmode = False
# debugtostdout = False
logreqs = True
debugmode = True
debugtostdout = True

# Processes (suggested number of cores + 1)
# processes = 5
# requests_per_process = 100000
# processes = 1

# Ip addresses and ports
# transport = BOTH
# listen_ipv4 = [LISTENING_IPV4_ADDRESS]
# listen_ipv6 = [LISTENING_IPV6_ADDRESS]
# listen_port_http = 80
# listen_port_https = 443

# This is the base hostname for the current tor2web node
# basehost = AUTO
# basehost = localhost

# This is the SOCKS host and port on which Tor is listening
# sockshost = 127.0.0.1
# socksport = 9050
# socksoptimisticdata = True
# sockmaxpersistentperhost = 5
# sockcachedconnectiontimeout = 240
# sockretryautomatically = True

# SSL configuration

# TODO
disable_ssl = True

# TODO
inject_header = False

# ssl_key = /home/tor2web/certs/tor2web-key.pem
# ssl_cert = /home/tor2web/certs/tor2web-cert.pem

# BE SURE TO CONFIGURE THE INTERMEDIATE CA OR YOUR WEB BROWSER WILL RESPOND
# WITH VERY LOUD WARNINGS AND ERRORS
# ssl_intermediate = /home/tor2web/certs/tor2web-intermediate.pem
# TO GENERATE DH Parameters:
# $ cd /home/tor2web/certs/
# $ openssl dhparam -out tor2web-dh.pem 2048

# ssl_dh = /home/tor2web/certs/tor2web-dh.pem
# cipher_list = ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA
# ssl_tofu_cache_size = 100

# Access Blocking
# mode = BLOCKLIST
# onion = None
# blockhotlinking = True
# blockhotlinking_exts = [jpg, png, gif]


# Add special HTTP headers
# This option makes it possible to add headers to responses sent to clients.
# Do NOT use this unless you are positive you need it.
# extra_HTTP_headers_to_response = [ 'Cache-Control: max-age=600', 'Surrogate-Control: max-age=86400' ]

# Disable the automagical redirect of Tor user on Tor HSs
# disable_tor_redirection = False

# If set to True will disable the tor2web disclaimer
# disable_disclaimer = False
disable_disclaimer = True

# If set to True will disable the tor2web banner
# disable_banner = False

# If set to True will avoid rewriting visible data (experimental; will result
# in less functional proxy) Could be useful in relation to DMCA for US law only
# avoid_rewriting_visible_content = True
avoid_rewriting_visible_content = False

# Mail configuration for automatic exception and user abuse notifications
# smtpuser = [USERNAME]
# smtppass = [PASSWORD]
# smtpmail = [EMAIL]
# smtpmailto_exceptions = [EMAIL_FOR_ABUSES_EXCEPTIONS]
# smtpmailto_notifications = [EMAIL_FOR_ABUSES_NOTIFICATION]
# smtpdomain = [DOMAIN]
# smtpport = [PORT]

# Exit nodes list refresh period (in seconds)
# exit_node_list_refresh = 600

# Enables the automatic fetching of the hashed blocklist
# automatic_blocklist_updates_source = https://ahmia.fi/bannedMD5.txt
# automatic_blocklist_updates_refresh = 600
# automatic_blocklist_updates_mode = MERGE

# This publishes blocklist which will be available at::/antanistaticmap/lists/blocklist
# publish_blocklist = False

# List of mirrors shown in Tor2web disclaimer and banner
# An updated list of know mirrors can be found at: https://github.com/globaleaks/tor2web/wiki
# mirror = [tor2web.org, mirror2.tld, mirror3.tld, ...]

# This allows Tor2web to make use of a simple TCP proxies
# dummyproxy = https://127.0.0.1:8080
Loading