From 2847b956d2a8c2f6320dcf6389282de9de9a8480 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Thu, 23 May 2024 17:52:25 +0200 Subject: [PATCH] add config + update spec file Signed-off-by: Toshaan Bharvani --- SOURCES/config.yaml | 16 ++++++++++++++++ SPECS/blocky.spec | 20 +++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 SOURCES/config.yaml diff --git a/SOURCES/config.yaml b/SOURCES/config.yaml new file mode 100644 index 0000000..f44e041 --- /dev/null +++ b/SOURCES/config.yaml @@ -0,0 +1,16 @@ +upstream: + default: + - 46.182.19.48 + - 80.241.218.68 + - tcp-tls:fdns1.dismail.de:853 + - https://dns.digitale-gesellschaft.ch/dns-query +blocking: + blackLists: + ads: + - https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts + clientGroupsBlock: + default: + - ads +ports: + dns: 5353 + http: 4444 diff --git a/SPECS/blocky.spec b/SPECS/blocky.spec index 113a951..b23876f 100644 --- a/SPECS/blocky.spec +++ b/SPECS/blocky.spec @@ -1,3 +1,5 @@ +%global _hardened_build 1 + Name : blocky Version : 0.23 Release : 1%{dist} @@ -17,33 +19,33 @@ Fast and lightweight DNS proxy as ad-blocker for local network with many feature %prep %setup -T -q -c %{name}-%{version} export GOPATH=`pwd` -mkdir -p src/github.com/0xERROR/ -cd src/github.com/0xERROR/ -git clone https://github.com/0xERROR/blocky +mkdir -p src/github.com/0xERR0R/ +cd src/github.com/0xERR0R/ +git clone https://github.com/0xERR0R/blocky %build export GOPATH=`pwd` -cd src/github.com/0xERROR/blocky +cd src/github.com/0xERR0R/blocky git checkout tags/v%{version} -GO111MODULE=on go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/0xERR0R/blocky/util.Version="%{version}'.'%{release}"' -X 'github.com/0xERR0R/blocky/util.BuildTime="$(date "+%Y%m%d-%H%M%S")"' -X 'github.com/0xERR0R/blocky/util.Architecture="%{_arch}"'" +GO111MODULE=on go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/0xERR0R/blocky/util.Version="%{version}"."%{release}"' -X 'github.com/0xERR0R/blocky/util.BuildTime="$(date "+%Y%m%d-%H%M%S")"' -X 'github.com/0xERR0R/blocky/util.Architecture="%{_arch}"'" %install install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/blocky.service -install -p -D -m 0555 src/github.com/0xERROR/blocky/blocky %{buildroot}%{_bindir}/blocky +install -p -D -m 0655 src/github.com/0xERR0R/blocky/blocky %{buildroot}%{_bindir}/blocky %post -%systemd_post gitea.service +%systemd_post blocky.service %preun -%systemd_preun gitea.service +%systemd_preun blocky.service %postun -%systemd_postun gitea.service +%systemd_postun blocky.service %files