setup: Move app data files into respective apps

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-03-17 16:20:57 -04:00
1 parent fdcbd46513
commit ff247fa5aa
51 files changed

No files matched your search

@@ -0,0 +1,12 @@
module Test_Tor =
test Tor.lns get "\n" = { }
test Tor.lns get "# comment\n" = { "#comment" = "comment" }
test Tor.lns get "SocksPort 9050\n" = { "SocksPort" = "9050" }
test Tor.lns get "SocksPort 0.0.0.0:9050\n" = { "SocksPort" = "0.0.0.0:9050" }
test Tor.lns get "SocksPort [::]:9050\n" = { "SocksPort" = "[::]:9050" }
test Tor.lns get "ExitPolicy reject *:*\n" = { "ExitPolicy" = "reject *:*" }
test Tor.lns get "VirtualAddrNetworkIPv4 10.192.0.0/10\n" = { "VirtualAddrNetworkIPv4" = "10.192.0.0/10" }
test Tor.lns get "ServerTransportPlugin obfs3,obfs4 exec /usr/bin/obfs4proxy\n" = { "ServerTransportPlugin" = "obfs3,obfs4 exec /usr/bin/obfs4proxy" }
test Tor.lns get "HiddenServiceDir /var/lib/tor-instances/plinth/hidden_service/\n" = { "HiddenServiceDir" = "/var/lib/tor-instances/plinth/hidden_service/" }
test Tor.lns get "Bridge obfs4 10.1.1.1:30000 0123456789ABCDEF0123456789ABCDEF01234567 cert=A/b+1 iat-mode=0\n" = { "Bridge" = "obfs4 10.1.1.1:30000 0123456789ABCDEF0123456789ABCDEF01234567 cert=A/b+1 iat-mode=0" }
@@ -0,0 +1,40 @@
(* Tor lens for Augeas
Author: James Valleroy <jvalleroy@mailbox.org>
About: Reference
Online Tor configuration manual:
https://www.torproject.org/docs/tor-manual.html.en
About: License
This file is licensed under the LGPL v2+.
About: Configuration files
This lens applies to /etc/tor/torrc. See <filter>.
*)
module Tor =
autoload xfm
let eol = Util.eol
let ws = /[ \t]/
let k = /[A-Za-z0-9_.,:*]+/
let val = /[A-Za-z0-9_.,:*+-=\/]+/
let bracket_val = "[" . val* . "]" . val*
let multi_val = val . (" " . val)+
let simple_entry = [ key k . del ws+ " " . store val . eol ]
let bracket_entry = [ key k . del ws+ " " . store bracket_val . eol ]
let multi_entry = [ key k . del ws+ " " . store multi_val . eol ]
let entry = simple_entry|bracket_entry|multi_entry
let lns = (entry|Util.comment|Util.empty_dos)*
let filter = (incl "/etc/tor/torrc")
let xfm = transform lns filter