From 774b2bce650add12aecf0d176655d3765f223dff Mon Sep 17 00:00:00 2001 From: Fabian Franz Date: Mon, 20 Nov 2017 17:47:23 +0100 Subject: [PATCH 1/2] security/tor: fix help string, add memory limit; closes #384 --- .../mvc/app/controllers/OPNsense/Tor/forms/general.xml | 7 +++++++ .../mvc/app/controllers/OPNsense/Tor/forms/relay.xml | 2 +- .../src/opnsense/mvc/app/models/OPNsense/Tor/General.xml | 4 ++++ .../tor/src/opnsense/service/templates/OPNsense/Tor/torrc | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/general.xml b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/general.xml index 97c5ff809..13a8d8e4e 100644 --- a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/general.xml +++ b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/general.xml @@ -101,4 +101,11 @@ Enable this, if you want to map onion services to the IP pool configured above. true + + general.max_memory_in_queues + + text + If this amount of memory is reached, Tor will close circuits until 10% of this limit are free again. + true + diff --git a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/relay.xml b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/relay.xml index 02224c367..7f9fba698 100644 --- a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/relay.xml +++ b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/relay.xml @@ -52,7 +52,7 @@ relay.relay checkbox - A bridge is a private relay. It is not visible in the public directory. Check this if you want to become a relay (public). + A bridge is a private relay. It is not visible in the public directory. Uncheck this if you want to become a public relay. relay.publish diff --git a/security/tor/src/opnsense/mvc/app/models/OPNsense/Tor/General.xml b/security/tor/src/opnsense/mvc/app/models/OPNsense/Tor/General.xml index 82bc0d222..3949a1531 100644 --- a/security/tor/src/opnsense/mvc/app/models/OPNsense/Tor/General.xml +++ b/security/tor/src/opnsense/mvc/app/models/OPNsense/Tor/General.xml @@ -117,5 +117,9 @@ + + 0 + N + diff --git a/security/tor/src/opnsense/service/templates/OPNsense/Tor/torrc b/security/tor/src/opnsense/service/templates/OPNsense/Tor/torrc index 55ffd2751..ede05720f 100644 --- a/security/tor/src/opnsense/service/templates/OPNsense/Tor/torrc +++ b/security/tor/src/opnsense/service/templates/OPNsense/Tor/torrc @@ -97,6 +97,10 @@ HidServAuth {{ service.onion_service }} {{ service.auth_cookie }} {% endfor %} {% endif %} +{% if helpers.exists('OPNsense.tor.general.max_memory_in_queues') and OPNsense.tor.general.max_memory_in_queues != '' %} +MaxMemInQueues {{ OPNsense.tor.general.max_memory_in_queues }} MB +{% endif %} + {% if helpers.exists('OPNsense.tor.hiddenservice') and helpers.exists('OPNsense.tor.hiddenserviceacl') and helpers.exists('OPNsense.tor.hiddenserviceacl.hiddenserviceacl') %} ############### This section is just for location-hidden services ### From 40a8b619df104703e075177f8e560b5498e39860 Mon Sep 17 00:00:00 2001 From: Fabian Franz Date: Mon, 20 Nov 2017 17:58:23 +0100 Subject: [PATCH 2/2] security/tor: bump version --- security/tor/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/tor/Makefile b/security/tor/Makefile index 59ce57587..4cde9ce9d 100644 --- a/security/tor/Makefile +++ b/security/tor/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= tor -PLUGIN_VERSION= 1.2 +PLUGIN_VERSION= 1.3 PLUGIN_COMMENT= The Onion Router PLUGIN_DEPENDS= tor ruby PLUGIN_MAINTAINER= franz.fabian.94@gmail.com