From c3882a3449f65132dda190a5787a8e8341fdac0e Mon Sep 17 00:00:00 2001
From: idk <hankhill19580@gmail.com>
Date: Sat, 14 Aug 2021 00:49:49 -0400
Subject: [PATCH] Big update to i2p.firefox download page.

---
 Dockerfile                           |  2 +-
 docker-run-dev.sh                    |  5 ++-
 i2p2www/pages/downloads/firefox.html | 65 +++++++++++++++++++++++++---
 site-updater-docker.sh               | 50 ++++++++++++++++++---
 4 files changed, 107 insertions(+), 15 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 02f5b73fc..f827a938d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,7 +8,7 @@ WORKDIR /var/www/i2p.www
 
     ## Install the dependencies
 RUN apt-get update && \
-    apt-get -y install apache2 apache2-utils libapache2-mod-wsgi python2-dev python-pip patch python-virtualenv git && \
+    apt-get -y install apache2 apache2-utils libapache2-mod-wsgi python2-dev python-pip patch python-virtualenv git python-polib && \
     ## Start setting up the site
     rm -rfv env && \
     virtualenv --distribute env                && \  
diff --git a/docker-run-dev.sh b/docker-run-dev.sh
index 29ce8070e..3560872a9 100755
--- a/docker-run-dev.sh
+++ b/docker-run-dev.sh
@@ -1,4 +1,5 @@
 #! /usr/bin/env sh
-virtualenv --distribute env
-. env/bin/activate
+#virtualenv --distribute env
+#. env/bin/activate
+./setup_venv.sh
 ./runserver.py
diff --git a/i2p2www/pages/downloads/firefox.html b/i2p2www/pages/downloads/firefox.html
index f45ba52a2..e6cdef8f7 100644
--- a/i2p2www/pages/downloads/firefox.html
+++ b/i2p2www/pages/downloads/firefox.html
@@ -2,19 +2,31 @@
 {%- from "downloads/macros" import package_outer with context -%}
 {% block title %}Firefox Profile{% endblock %}
 {% block content %}
+
 <h1>{{ _('I2P Firefox Browser Profile') }}</h1>
 <p>{% trans -%}
 Now that you have joined the I2P network, you will want to see I2P Sites and and 
 other content that is hosted on the network. The Firefox browser profile is 
-pre-configured to allow you to access the content available on the network. It 
-also keeps your I2P search activity separate from your internet search activity.
+pre-configured to allow you to access the content available on the network.
 {%- endtrans %}</p>
+<h2>{{ _('Why should I use it?') }}</h2>
 <p>{% trans -%}
-WHAT IS WRONG?
+Browsers are highly complex and powerful engines for executing code and displaying
+information obtained mainly from strangers on the internet. By default, they
+tend to leak a great deal of information about the person using them to the servers
+they retrieve information from. Using this browser profile allows you to become
+part of a "common" set of very similar browser users, instead of appearing unique
+or revealing details of your hardware or software. Because this involves disabling 
+some browser features, this also reduces the attack surface available to outsiders. 
+This keeps you safer while browsing the Invisible Web.
 {%- endtrans %}</p>
-<p>{% trans -%}
-This browser profile also includes both the NoScrpt and HTTPSEverywhere plugin for
-better protection Javascript based attacks and HTTPS support where available.
+<h2>{{ _('How do I use it?') }}</h2>
+<p>{% trans guideurl=get_url('downloads_windows'), postfilename=pver('I2P-Profile-Installer-%s.exe') -%}
+First, download and install <a href="{{ guideurl }}">I2P for Windows</a>. Then,
+download the Firefox browser profile using the green button just below, and run
+the <code>{{ postfilename }}</code> by double-clicking it. Finally, start Firefox
+with the preconfigured Firefox profile using the shortcut on the desktop or in
+the start menu.
 {%- endtrans %}</p>
 
 {%- set name     = 'Windows' -%}
@@ -46,4 +58,45 @@ The files are signed by {{ signer }},
 <a href="{{ signingkey }}">whose key is here</a>.
 {%- endtrans %}
 
+<h2>{{ _('What is in it?') }}</h2>
+<p>{% trans -%}
+This browser profile also includes both the NoScript and HTTPSEverywhere plugin for
+better protection Javascript based attacks and HTTPS support where available. It
+also keeps your I2P search activity separate from your visible internet search
+activity. The profile configures the I2P Proxy for all sites and browser features.
+I2P In Private Browsing is used to provide I2P-Specific browser integrations.
+{%- endtrans %}</p>
+<h3>{{ _('Source Code and Issue Tracking') }}</h3>
+<div>{% trans -%}
+If you would like to examine the source code for individual components, you may
+find it on i2pgit.org or github.com. The license for each respective component
+can be found in the license directory of the <code>i2p.firefox</code> project.
+{%- endtrans %}</div>
+<div><a href="https://i2pgit.org/i2p-hackers/i2p.firefox">{% trans -%}Gitlab Repository{%- endtrans %}</a></div>
+<div><a href="https://github.com/i2p/i2p.firefox">{% trans -%}Github Repository{%- endtrans %}</a></div>
+<div>{% trans -%}
+If you wish to file an issue about the Firefox profile, please use Gitlab to
+contact us. For security-sensitive issues, please remember to check the
+"This issue is confidential and should only be visible to team members with at least Reporter access"
+option when filing the issue.
+{%- endtrans %}</div>
+<div><a href="https://i2pgit.org/i2p-hackers/i2p.firefox/issues">{% trans -%}Gitlab Repository{%- endtrans %}</a></div>
+<h2>{{ _('How is it different from Tor Browser?') }}</h2>
+<p>{% trans -%}
+This is not a fork of Firefox. Instead, it is a browser profile with pre-configured
+settings. That means that it requires Firefox(Or Tor Browser) to be installed
+before you can use it. This is for security reasons, it is important that you are
+able to recieve reliable updates from a trustworthy vendor. As much as we would
+like to, we can't maintain a whole Firefox fork and provide timely updates for
+it right now.
+{%- endtrans %}</p>
+<p>{% trans -%}
+I2P routers are designed to have long uptimes, and so unlike Tor Browser, the
+lifetime of your I2P Router is not tied to the lifetime of your I2P browsing
+session. The browser profile will manage your history, your browser's local
+storage and cache, and your browsing context but it will never stop your I2P
+router on it's own. You may stop the router using the web interface on the
+router console homepage.
+{%- endtrans %}</p>
+
 {% endblock %}
diff --git a/site-updater-docker.sh b/site-updater-docker.sh
index 4e5eef8ec..20bb0b489 100755
--- a/site-updater-docker.sh
+++ b/site-updater-docker.sh
@@ -1,14 +1,52 @@
 #! /usr/bin/env bash
 
 ## Set additional docker run arguments by changing the variable
-## i2p_www_docker_run_args
+## i2p_www_docker_run_args in an optional file called config.sh
+## for example
+##
+##i2p_www_docker_run_args='-d'
+## to run the site in the background, or
+##
+##i2p_www_docker_run_args='-t'
+## to emulate a TTY
+
+## To operate a quick and easy mirror of the I2P Site in a container
+## simply clone the i2p.www source to a host with Docker installed, then 
+## add:
+##
+##i2p_www_docker_run_args='-d'
+## to config.sh
+##
+## Then add:
+##
+##*/10 * * * *	/path/to/i2p.www/site-updater-docker.sh
+##
+## to a crontab belonging to a member of the `docker` group. To add yourself
+## to the `docker` group use the command:
+##
+##sudo adduser $(whoami) docker
+##
+## a more secure solution may be to create a user especially to run the
+## docker crontab only, who is a member of the docker group. To do this,
+##
+##sudo adduser --disabled-password --disabled-login --ingroup docker docker
+## however the specifics may vary from distribution to distribution.
+
+
+
+if [ -f config.sh ]; then
+	. config.sh
+fi
+
+if [ -z $port ]; then
+	port="8090"
+fi
+
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" || exit
 cd "$DIR"
 
 git pull origin master
-docker build --no-cache -t i2p-mirror/i2p.www .
-docker rm -f mirror.i2p.www
-#docker run -itd $i2p_www_docker_run_args --name mirror.i2p.www -p 0.0.0.0:8090:80 i2p-mirror/i2p.www
-docker run -it --net=host --name i2p.www -p 5000:5000 --volume "`pwd`":/var/www/i2p.www --env DEV=on i2p-mirror/i2p.www ./runserver.py
-#docker run -td --name mirror.i2p.www --restart=always -p 0.0.0.0:5000:5000 i2p-mirror/i2p.www
+docker build $i2p_www_docker_build_args -t i2p-mirror/i2p.www$suffix .
+docker rm -f mirror.i2p.www$suffix
+docker run $i2p_www_docker_run_args --name mirror.i2p.www$suffix -p 0.0.0.0:$port:80 i2p-mirror/i2p.www$suffix
-- 
GitLab