tor-hs: cleanup tor-hs.conf

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 <stokito@gmail.com>
This commit is contained in:
Sergey Ponomarev 2023-07-23 12:14:45 +03:00 committed by Josef Schlehofer
parent eee8f9e1e7
commit 783b92d5b3
1 changed files with 16 additions and 17 deletions

View 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'