From fcf06a15c42b63e7b8690039a27796239887956b Mon Sep 17 00:00:00 2001 From: MeganerdNL Date: Sat, 5 Aug 2023 09:18:51 +0200 Subject: [PATCH] New package: doh-proxy --- srcpkgs/doh-proxy/files/README.voidlinux | 9 ++++++++ srcpkgs/doh-proxy/files/doh-proxy/run | 4 ++++ srcpkgs/doh-proxy/template | 26 ++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 srcpkgs/doh-proxy/files/README.voidlinux create mode 100755 srcpkgs/doh-proxy/files/doh-proxy/run create mode 100644 srcpkgs/doh-proxy/template diff --git a/srcpkgs/doh-proxy/files/README.voidlinux b/srcpkgs/doh-proxy/files/README.voidlinux new file mode 100644 index 0000000000000..e0ed7e23da1c8 --- /dev/null +++ b/srcpkgs/doh-proxy/files/README.voidlinux @@ -0,0 +1,9 @@ +The runit service starts doh-proxy without any options by default. +To customize options, make a file /etc/sv/doh-proxy/conf and assign +OPTS variable with options to run doh-proxy with. + +Example: +OPTS="-u 127.0.0.1:53 -H myserver.com" + +See documentation https://github.com/DNSCrypt/doh-server or run +'doh-proxy --help' for available options. diff --git a/srcpkgs/doh-proxy/files/doh-proxy/run b/srcpkgs/doh-proxy/files/doh-proxy/run new file mode 100755 index 0000000000000..22307bb2e6728 --- /dev/null +++ b/srcpkgs/doh-proxy/files/doh-proxy/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +[ -r ./conf ] && . ./conf +exec chpst -u _doh_proxy:_doh_proxy doh-proxy ${OPTS} diff --git a/srcpkgs/doh-proxy/template b/srcpkgs/doh-proxy/template new file mode 100644 index 0000000000000..09ac8d7d9fc5a --- /dev/null +++ b/srcpkgs/doh-proxy/template @@ -0,0 +1,26 @@ +# Template file for 'doh-proxy' +pkgname=doh-proxy +version=0.9.10 +revision=1 +build_style=cargo +short_desc="Fast and secure DoH (DNS-over-HTTPS) and ODoH (Oblivious DoH) server" +maintainer="MeganerdNL " +license="MIT" +homepage="https://github.com/DNSCrypt/doh-server" +distfiles="https://github.com/DNSCrypt/doh-server/archive/refs/tags/${version}.tar.gz" +checksum=ed5cc16f10ea1e7c4487c3d7ddb96ca5a3363af7492ccce01cc24dcbfa778fef +system_accounts="_doh_proxy" + +post_extract() { + cargo generate-lockfile +} + +if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + XBPS_CROSS_RUSTFLAGS+=" -latomic" +fi + +post_install() { + vlicense LICENSE + vdoc "${FILESDIR}/README.voidlinux" + vsv doh-proxy +}