tor-hs: cleanup tor-hs.conf
authorSergey Ponomarev <redacted>
Sun, 23 Jul 2023 09:14:45 +0000 (12:14 +0300)
committerJosef Schlehofer <redacted>
Tue, 20 May 2025 11:20:46 +0000 (13:20 +0200)
Replace boolean "true"/"false" with more frequently used 1/0.
This may avoid configuration mistakes which is critical for Tor.
The Luci app anyway will set it as 1/0.

Make sections named. This is not required but again safes from mistakes when executing uci command.

Uncomment sections but disable them by default.
Then in a Luci app a user can quickly figure out what to change.
Ideally a user may just enable the config and start using it.

In the nextcloud config use a single 80 instead of 80;80.
This simpler configuration is now supported.

Instead of "Hidden service" the Tor team now uses "Onion service".

Signed-off-by: Sergey Ponomarev <redacted>
net/tor-hs/files/tor-hs.conf

index 5480685d0fb34ee4984ef376934531848b0e09d5..2165670bec83f920ff975318dd5aa6064862ecdd 100644 (file)
@@ -1,22 +1,21 @@
 config tor-hs common
-       #option GenConf "/etc/tor/torrc_hs"
        option GenConf "/etc/tor/torrc_generated"
        option HSDir "/etc/tor/hidden_service"
-       option RestartTor "true"
-       option UpdateTorConf "true"
+       option RestartTor 1
+       option UpdateTorConf 1
 
-#config hidden-service
-#      option Name 'sshd'
-#      option Description "Hidden service for ssh"
-#      option Enabled 'false'
-#      option IPv4 '127.0.0.1'
-#      #public port=2222, local port=22
-#      list PublicLocalPort '2222;22'
+config hidden-service sshd
+       option Name 'sshd'
+       option Description 'Onion service for ssh'
+       option Enabled 0
+       option IPv4 '127.0.0.1'
+       #public port=2222, local port=22
+       list PublicLocalPort '2222;22'
 
-#config hidden-service
-#      option Name 'nextcloud'
-#      option Description "Hidden service for Nextcloud"
-#      option Enabled 'false'
-#      option IPv4 '127.0.0.1'
-#      option HookScript '/etc/tor/nextcloud-update.sh'
-#      list PublicLocalPort '80;80'
+config hidden-service nextcloud
+       option Name 'nextcloud'
+       option Description 'Onion service for Nextcloud'
+       option Enabled 0
+       option IPv4 '127.0.0.1'
+       option HookScript '/etc/tor/nextcloud-update.sh'
+       list PublicLocalPort '80'
git clone https://git.99rst.org/PROJECT