From 22d85ebc290bd3eac09fdd6f76a74f55c80e72af Mon Sep 17 00:00:00 2001 From: Bahar KURT Date: Wed, 20 Aug 2025 01:51:06 +0300 Subject: [PATCH] Initial build of dnscrypt-proxy --- network/connection/dnscrypt-proxy/actions.py | 38 +++++++++++++++ .../dnscrypt-proxy/comar/service.py | 34 +++++++++++++ network/connection/dnscrypt-proxy/pspec.xml | 48 +++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 network/connection/dnscrypt-proxy/actions.py create mode 100644 network/connection/dnscrypt-proxy/comar/service.py create mode 100644 network/connection/dnscrypt-proxy/pspec.xml diff --git a/network/connection/dnscrypt-proxy/actions.py b/network/connection/dnscrypt-proxy/actions.py new file mode 100644 index 0000000000..c3a3c5e921 --- /dev/null +++ b/network/connection/dnscrypt-proxy/actions.py @@ -0,0 +1,38 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/copyleft/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +def build(): + shelltools.cd("dnscrypt-proxy") + shelltools.system("""go build -ldflags "-compressdwarf=false -linkmode external" .""") + +def install(): + # Main executable + pisitools.dobin("dnscrypt-proxy/dnscrypt-proxy") + + # Base configuration + pisitools.dodir("/etc/dnscrypt-proxy") + pisitools.insinto("/etc/dnscrypt-proxy", "dnscrypt-proxy/example-dnscrypt-proxy.toml", "dnscrypt-proxy.toml") + pisitools.insinto("/etc/dnscrypt-proxy", "dnscrypt-proxy/example-allowed-ips.txt", "allowed-ips.txt") + pisitools.insinto("/etc/dnscrypt-proxy", "dnscrypt-proxy/example-allowed-names.txt", "allowed-names.txt") + pisitools.insinto("/etc/dnscrypt-proxy", "dnscrypt-proxy/example-blocked-ips.txt", "blocked-ips.txt") + pisitools.insinto("/etc/dnscrypt-proxy", "dnscrypt-proxy/example-blocked-names.txt", "blocked-names.txt") + pisitools.insinto("/etc/dnscrypt-proxy", "dnscrypt-proxy/example-captive-portals.txt", "captive-portals.txt") + pisitools.insinto("/etc/dnscrypt-proxy", "dnscrypt-proxy/example-cloaking-rules.txt", "cloaking-rules.txt") + pisitools.insinto("/etc/dnscrypt-proxy", "dnscrypt-proxy/example-forwarding-rules.txt", "forwarding-rules.txt") + + # generate-domains-blocklist + pisitools.dodir("/usr/share/dnscrypt-proxy/utils/generate-domains-blocklist") + pisitools.insinto("/usr/share/dnscrypt-proxy/utils/generate-domains-blocklist", "utils/generate-domains-blocklist/*.conf") + pisitools.insinto("/usr/share/dnscrypt-proxy/utils/generate-domains-blocklist", "utils/generate-domains-blocklist/*.txt") + pisitools.dobin("utils/generate-domains-blocklist/generate-domains-blocklist.py") + + # Documentation + pisitools.dodoc("ChangeLog", "README*", "LICENSE*") diff --git a/network/connection/dnscrypt-proxy/comar/service.py b/network/connection/dnscrypt-proxy/comar/service.py new file mode 100644 index 0000000000..c8c7a7f480 --- /dev/null +++ b/network/connection/dnscrypt-proxy/comar/service.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +from comar.service import * +import os + +serviceType = "local" +serviceDesc = _({"en": "DNSCrypt-proxy client", + "tr": "DNSCrypt-proxy istemcisi"}) +serviceDefault = "off" + +PIDFILE="/run/dnscrypt-proxy.pid" + +@synchronized +def start(): + # path to executable + # creates a pid file, sets the working directory and calls the jar file + startService(command="/usr/bin/dnscrypt-proxy", + args="--config /etc/dnscrypt-proxy/dnscrypt-proxy.toml", + donotify=True) + +@synchronized +def stop(): + stopService(pidfile=PIDFILE, + donotify=True) + + try: + os.unlink(PIDFILE) + except: + pass + +def ready(): + start() + +def status(): + return isServiceRunning(pidfile=PIDFILE) diff --git a/network/connection/dnscrypt-proxy/pspec.xml b/network/connection/dnscrypt-proxy/pspec.xml new file mode 100644 index 0000000000..48a7c6d18f --- /dev/null +++ b/network/connection/dnscrypt-proxy/pspec.xml @@ -0,0 +1,48 @@ + + + + + dnscrypt-proxy + https://github.com/DNSCrypt/dnscrypt-proxy + + Bedirhan KURT + bedirhan.kurt@outlook.com + + ISC + Flexible DNS proxy, with support for encrypted DNS protocols + A flexible DNS proxy, with support for modern encrypted DNS protocols such as DNSCrypt v2, DNS-over-HTTPS, Anonymized DNSCrypt and ODoH (Oblivious DoH). + https://github.com/DNSCrypt/dnscrypt-proxy/archive/refs/tags/2.1.13.tar.gz + + git + golang + + + + + dnscrypt-proxy + + glibc + python-urllib3 + + + /etc/dnscrypt-proxy + /usr/bin + /usr/share/doc + /usr/share/dnscrypt-proxy + + + System.Service + + + + + + 2025-08-20 + 2.1.13 + Initial release. + Bedirhan KURT + bedirhan.kurt@outlook.com + + + +