mirror of
https://github.com/opnsense/plugins.git
synced 2026-04-21 22:28:36 -04:00
security/tor: allow to enable directory page (#858)
This commit is contained in:
parent
3b40fe3aaf
commit
eef4adc554
4 changed files with 18 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= tor
|
||||
PLUGIN_VERSION= 1.6
|
||||
PLUGIN_VERSION= 1.7
|
||||
PLUGIN_COMMENT= The Onion Router
|
||||
PLUGIN_DEPENDS= tor ruby
|
||||
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
|
||||
|
|
|
|||
|
|
@ -69,6 +69,12 @@
|
|||
<label>Directory Port</label>
|
||||
<type>text</type>
|
||||
</field>
|
||||
<field>
|
||||
<id>relay.dir_frontpage</id>
|
||||
<label>Show Directory Frontpage</label>
|
||||
<type>checkbox</type>
|
||||
<help>Upload a HTML file to /usr/local/etc/tor/exit-notice.html before enabling this to serve a directory frontpage.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>relay.relay</id>
|
||||
<label>Bridge</label>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
<model>
|
||||
<mount>//OPNsense/tor/relay</mount>
|
||||
<version>1.0.0</version>
|
||||
<description>Tor Relay configuration</description>
|
||||
<items>
|
||||
<enabled type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</enabled>
|
||||
<dir_frontpage type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</dir_frontpage>
|
||||
<host type="TextField">
|
||||
<Required>N</Required>
|
||||
<mask>/^([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])$/</mask>
|
||||
|
|
|
|||
|
|
@ -196,11 +196,15 @@ RelayBandwidthBurst {{ OPNsense.tor.relay.bandwithburst }} KBytes
|
|||
DirPort {% if helpers.exists('OPNsense.tor.relay.host') and OPNsense.tor.relay.host != '' %}{{ OPNsense.tor.relay.host }}:{% endif%}{{ OPNsense.tor.relay.directory_port }}
|
||||
{% endif %}
|
||||
|
||||
## Uncomment to return an arbitrary blob of html on your DirPort. Now you
|
||||
## Return an arbitrary blob of html on your DirPort. Now you
|
||||
## can explain what Tor is if anybody wonders why your IP address is
|
||||
## contacting them. See contrib/tor-exit-notice.html in Tor's source
|
||||
## distribution for a sample.
|
||||
#DirPortFrontPage /usr/local/etc/tor/tor-exit-notice.html
|
||||
|
||||
{% if helpers.exists('OPNsense.tor.relay.dir_frontpage') and OPNsense.tor.relay.dir_frontpage == '1' %}
|
||||
DirPortFrontPage /usr/local/etc/tor/exit-notice.html
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if helpers.exists('OPNsense.tor.relay.exitenabled') %}
|
||||
ExitRelay {{ OPNsense.tor.relay.exitenabled }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue