Initial build of dnscrypt-proxy

This commit is contained in:
Bahar KURT
2025-08-20 01:51:06 +03:00
parent 4d27e42878
commit 22d85ebc29
3 changed files with 120 additions and 0 deletions
@@ -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*")
@@ -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)
@@ -0,0 +1,48 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>dnscrypt-proxy</Name>
<Homepage>https://github.com/DNSCrypt/dnscrypt-proxy</Homepage>
<Packager>
<Name>Bedirhan KURT</Name>
<Email>bedirhan.kurt@outlook.com</Email>
</Packager>
<License>ISC</License>
<Summary>Flexible DNS proxy, with support for encrypted DNS protocols</Summary>
<Description>A flexible DNS proxy, with support for modern encrypted DNS protocols such as DNSCrypt v2, DNS-over-HTTPS, Anonymized DNSCrypt and ODoH (Oblivious DoH).</Description>
<Archive sha1sum="5b21f8b421107cca57dd5ac29ee921b2153b8d5c" type="targz">https://github.com/DNSCrypt/dnscrypt-proxy/archive/refs/tags/2.1.13.tar.gz</Archive>
<BuildDependencies>
<Dependency>git</Dependency>
<Dependency>golang</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>dnscrypt-proxy</Name>
<RuntimeDependencies>
<Dependency>glibc</Dependency>
<Dependency>python-urllib3</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="config">/etc/dnscrypt-proxy</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="data">/usr/share/dnscrypt-proxy</Path>
</Files>
<Provides>
<COMAR script="service.py">System.Service</COMAR>
</Provides>
</Package>
<History>
<Update release="1">
<Date>2025-08-20</Date>
<Version>2.1.13</Version>
<Comment>Initial release.</Comment>
<Name>Bedirhan KURT</Name>
<Email>bedirhan.kurt@outlook.com</Email>
</Update>
</History>
</PISI>