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
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.relaycheckbox
- 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 ###