diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | filtron.service | 19 |
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..242c246c6a8e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +# Generated by mksrcinfo v8 +# Mon Jul 2 23:04:42 UTC 2018 +pkgbase = filtron + pkgdesc = Filtering reverse HTTP proxy + pkgver = 0+51+93f8b22 + pkgrel = 1 + url = https://github.com/asciimoo/filtron + arch = any + license = AGPL3 + makedepends = git + makedepends = go + optdepends = searx: A privacy-respecting, hackable metasearch engine + optdepends = searx-git: A privacy-respecting, hackable metasearch engine (Git) + optdepends = morty: Privacy-aware web content sanitizer proxy-as-a-service + optdepends = morty-git: Privacy-aware web content sanitizer proxy-as-a-service (Git) + conflicts = filtron-git + source = git+https://github.com/asciimoo/filtron + source = filtron.service + sha512sums = SKIP + sha512sums = 0b7bbe55b3fd89d589e5662699f93d7aaf3c1d77d29be9cc568f8430e4a2491ba4920ca153f4d887a29da1f51670ec06346809cc5d1f373af540e252feccc799 + +pkgname = filtron + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b5db8e018ebe --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Jean Lucas <jean@4ray.co> + +pkgname=filtron +pkgver=0+51+93f8b22 +pkgrel=1 +pkgdesc='Filtering reverse HTTP proxy' +arch=(any) +url='https://github.com/asciimoo/filtron' +license=(AGPL3) +conflicts=(filtron-git) +makedepends=(git go) +optdepends=('searx: A privacy-respecting, hackable metasearch engine' + 'searx-git: A privacy-respecting, hackable metasearch engine (Git)' + 'morty: Privacy-aware web content sanitizer proxy-as-a-service' + 'morty-git: Privacy-aware web content sanitizer proxy-as-a-service (Git)') +source=(git+https://github.com/asciimoo/filtron + filtron.service) +sha512sums=(SKIP + 0b7bbe55b3fd89d589e5662699f93d7aaf3c1d77d29be9cc568f8430e4a2491ba4920ca153f4d887a29da1f51670ec06346809cc5d1f373af540e252feccc799) + +pkgver() { + cd filtron + printf 0+%s+%s $(git rev-list --count HEAD) $(git rev-parse --short HEAD) +} + +build() { + cd filtron + GOPATH=$srcdir/filtron go get -v -x github.com/asciimoo/filtron +} + +package() { + cd filtron + install -D bin/filtron $pkgdir/usr/bin/filtron + install -Dm 644 ../filtron.service $pkgdir/usr/lib/systemd/system/filtron.service + install -Dm 644 LICENSE $pkgdir/usr/share/licenses/filtron/LICENSE +} diff --git a/filtron.service b/filtron.service new file mode 100644 index 000000000000..9f2a84587741 --- /dev/null +++ b/filtron.service @@ -0,0 +1,19 @@ +[Unit] +Description=Filtron instance +After=network.target + +[Service] +Type=simple +User=nobody +PrivateTmp=true +PrivateDevices=true +# Prevent access to /home, /root, and /run/user +ProtectHome=true +# Prevent writes to /usr, /boot, and /etc +ProtectSystem=full +ExecStart=/usr/bin/filtron -listen 127.0.0.1:4004 -rules /etc/filtron/rules.json -target 127.0.0.1:8888 +Restart=on-failure +RestartSec=1 + +[Install] +WantedBy=multi-user.target |