From e3807fbf2ba1fda30ff7c1c39bdc8c1d0632184d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 8 May 2024 15:03:48 +0200 Subject: [PATCH] fix --- conf/torrc | 33 +++++++++------------------------ manifest.toml | 8 ++++---- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 16 insertions(+), 31 deletions(-) diff --git a/conf/torrc b/conf/torrc index 2db2a2d..acaa294 100644 --- a/conf/torrc +++ b/conf/torrc @@ -1,24 +1,9 @@ -BridgeRelay 1 - -# Replace "TODO1" with a Tor port of your choice. -# This port must be externally reachable. -# Avoid port 9001 because it's commonly associated with Tor and censors may be scanning the Internet for this port. -ORPort __PORT_OR__ - -ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy - -# Replace "TODO2" with an obfs4 port of your choice. -# This port must be externally reachable and must be different from the one specified for ORPort. -# Avoid port 9001 because it's commonly associated with Tor and censors may be scanning the Internet for this port. -ServerTransportListenAddr obfs4 0.0.0.0:__PORT_OBFS4__ - -# Local communication port between Tor and obfs4. Always set this to "auto". -# "Ext" means "extended", not "external". Don't try to set a specific port number, nor listen on 0.0.0.0. -ExtORPort auto - -# Replace "
" with your email address so we can contact you if there are problems with your bridge. -# This is optional but encouraged. -#ContactInfo _CONTACT_ - -# Pick a nickname that you like for your bridge. This is optional. -#Nickname _NICKNAME_ \ No newline at end of file +# Enable log (otherwise, tor doesn't seemd to deploy onion address) +Log notice file /var/log/tor/notices.log +# Enable single hop routing (2 options below are dependencies of third). Will reduce latency in exchange of anonimity (since tor runs alongside xftp-server and onion address will be displayed in clients, this is totally fine) +SOCKSPort 0 +HiddenServiceNonAnonymousMode 1 +HiddenServiceSingleHopMode 1 +# xftp-server hidden service host directory and port mappings +HiddenServiceDir /var/lib/tor/simplex-xftp/ +HiddenServicePort 443 localhost:443 \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 6a4c464..34db167 100644 --- a/manifest.toml +++ b/manifest.toml @@ -59,10 +59,10 @@ ram.runtime = "50M" xftp.default = 5224 xftp.exposed = "TCP" - or.default = 9002 - or.exposed = "Both" - obfs4.default = 9003 - obfs4.exposed = "Both" + #or.default = 9002 + #or.exposed = "Both" + #obfs4.default = 9003 + #obfs4.exposed = "Both" [resources.system_user] diff --git a/scripts/install b/scripts/install index 7a311cc..f76c847 100755 --- a/scripts/install +++ b/scripts/install @@ -85,7 +85,7 @@ ynh_add_systemd_config --service=xftp --template=../conf/xftp.systemd.service yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_xftp" -yunohost service add tor --description="Tor Relay" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_or" --test_status="pgrep tor" +yunohost service add tor --description="Tor Relay" --log="/var/log/$app/$app.log" #--needs_exposed_ports="$port_or" --test_status="pgrep tor" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 08bda7b..49efecc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -53,7 +53,7 @@ systemctl enable xftp.service --quiet yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_xftp" -yunohost service add tor --description="Tor Relay" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_or" --test_status="pgrep tor" +yunohost service add tor --description="Tor Relay" --log="/var/log/$app/$app.log" #--needs_exposed_ports="$port_or" --test_status="pgrep tor" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index a12966a..b3043cc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,7 +93,7 @@ ynh_add_systemd_config --service=xftp --template=../conf/xftp.systemd.service yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_xftp" -yunohost service add tor --description="Tor Relay" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_or" --test_status="pgrep tor" +yunohost service add tor --description="Tor Relay" --log="/var/log/$app/$app.log" #--needs_exposed_ports="$port_or" --test_status="pgrep tor" #================================================= # START SYSTEMD SERVICE