From fe9ef2b83a9e116917bfc046b0770fad0e39bbe8 Mon Sep 17 00:00:00 2001
From: YunoHost <yolo@yunohost.org>
Date: Tue, 13 May 2014 10:59:34 +0200
Subject: [PATCH] THOR

---
 torhiddenservice.md    | 39 +++++++++++++++++++++++++++++++++++++++
 torhiddenservice_fr.md | 41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 torhiddenservice.md
 create mode 100644 torhiddenservice_fr.md

diff --git a/torhiddenservice.md b/torhiddenservice.md
new file mode 100644
index 00000000..cc7ec030
--- /dev/null
+++ b/torhiddenservice.md
@@ -0,0 +1,39 @@
+# Using Yunohost as a Tor Hidden Service
+
+See https://www.torproject.org/docs/tor-hidden-service.html.en
+
+## Installing Tor
+
+```bash
+apt-get install tor 
+```
+
+## Configuring our hidden service
+
+Edit /ect/tor/torrc, and add these lines:
+
+```
+HiddenServiceDir  /var/lib/tor/hidden_service/
+HiddenServicePort 80 127.0.0.1:80
+HiddenServicePort 443 127.0.0.1:443
+```
+
+## Restart Tor
+
+```bash
+service tor restart
+```
+
+## Get your Tor Hidden Service hostname
+
+```bash
+cat /path/to/hidden_service/keys/hostname
+```
+
+Your domain looks like *random123456789.onion*
+
+## Add the .onion domain to Yunohost
+
+```bash
+yunohost domain add random123456789.onion
+```
diff --git a/torhiddenservice_fr.md b/torhiddenservice_fr.md
new file mode 100644
index 00000000..602c5444
--- /dev/null
+++ b/torhiddenservice_fr.md
@@ -0,0 +1,41 @@
+# Utiliser Yunohost comme un service caché Tor
+
+Voir https://www.torproject.org/docs/tor-hidden-service.html.en (anglais)
+
+## Installer Tor
+
+```bash
+apt-get install tor 
+```
+
+## Configurer notre service caché
+
+Editer le fichier /ect/tor/torrc, et ajouter ces lignes :
+
+```
+HiddenServiceDir  /var/lib/tor/hidden_service/
+HiddenServicePort 80 127.0.0.1:80
+HiddenServicePort 443 127.0.0.1:443
+```
+
+## Redemarrer Tor
+
+```bash
+service tor restart
+```
+
+
+## Obtenir l'adresse du service caché
+
+```bash
+cat /path/to/hidden_service/keys/hostname
+```
+
+Le domaine ressemble à *random123456789.onion*
+
+## Ajouter le domaine .onion à Yunohost
+
+```bash
+yunohost domain add random123456789.onion
+```
+