Blocky
This commit is contained in:
parent
a73caeb8ba
commit
1e81154471
7 changed files with 105 additions and 0 deletions
32
dns/blocky-amigan/Makefile
Normal file
32
dns/blocky-amigan/Makefile
Normal file
|
@ -0,0 +1,32 @@
|
|||
PORTNAME= blocky
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.19
|
||||
PORTREVISION= 6
|
||||
CATEGORIES= dns
|
||||
#MASTER_SITES= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod
|
||||
MASTER_SITES=https://git.dynatron.me/amigan/blocky/raw/branch/development/:gomod
|
||||
DISTFILES= go.mod:gomod
|
||||
|
||||
MAINTAINER= eduardo@FreeBSD.org
|
||||
COMMENT= Fast and lightweight DNS proxy as ad-blocker
|
||||
|
||||
LICENSE= APACHE20
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
USES= go:modules
|
||||
USE_RC_SUBR= blocky
|
||||
|
||||
GO_MODULE= pkg.dynatron.me/amigan/blocky
|
||||
GO_TARGET= main.go:${PREFIX}/sbin/${PORTNAME}
|
||||
GO_BUILDFLAGS= -ldflags "-w -s \
|
||||
-X github.com/0xERR0R/blocky/util.Version=${DISTVERSION} \
|
||||
-X github.com/0xERR0R/blocky/util.BuildTime=`date '+%Y%m%d-%H%M%S'`"
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
do-extract:
|
||||
git clone https://git.dynatron.me/amigan/blocky.git work/blocky-v0.19
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${FILESDIR}/blocky-config.yml.sample ${STAGEDIR}${PREFIX}/etc/blocky-config.yml.sample
|
||||
|
||||
.include <bsd.port.mk>
|
3
dns/blocky-amigan/distinfo
Normal file
3
dns/blocky-amigan/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1663205933
|
||||
SHA256 (go/dns_blocky-amigan/blocky-v0.19/go.mod) = 104ea489e877ff025d56ec0ea2f910b2e991f56f4a3b95fe26a3e7ddd318d2a2
|
||||
SIZE (go/dns_blocky-amigan/blocky-v0.19/go.mod) = 12460
|
14
dns/blocky-amigan/files/blocky-config.yml.sample
Normal file
14
dns/blocky-amigan/files/blocky-config.yml.sample
Normal file
|
@ -0,0 +1,14 @@
|
|||
upstream:
|
||||
default:
|
||||
- 1.1.1.1
|
||||
- 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
|
||||
port: 53
|
||||
httpPort: 4000
|
36
dns/blocky-amigan/files/blocky.in
Normal file
36
dns/blocky-amigan/files/blocky.in
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: blocky
|
||||
# REQUIRE: DAEMON NETWORKING
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following to /etc/rc.conf[.local] to enable this service
|
||||
#
|
||||
# blocky_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable blocky.
|
||||
# blocky_config (str): Set to /usr/local/etc/blocky/config.yml by default.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=blocky
|
||||
rcvar=blocky_enable
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${blocky_enable:=NO}
|
||||
: ${blocky_config:="%%PREFIX%%/etc/blocky-config.yml"}
|
||||
: ${blocky_flags:=}
|
||||
|
||||
pidfile=/var/run/blocky.pid
|
||||
command="%%PREFIX%%/sbin/blocky"
|
||||
|
||||
start_cmd="${name}_start"
|
||||
|
||||
blocky_start()
|
||||
{
|
||||
echo -n "Starting ${name}."
|
||||
/usr/sbin/daemon -p ${pidfile} -f ${command} -c ${blocky_config} ${blocky_flags}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
14
dns/blocky-amigan/files/pkg-message.in
Normal file
14
dns/blocky-amigan/files/pkg-message.in
Normal file
|
@ -0,0 +1,14 @@
|
|||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
A sample configuration file is installed at the following location:
|
||||
%%PREFIX%%/etc/blocky-config.yml.sample
|
||||
|
||||
Default location for configuration file when using rc.d script:
|
||||
%%PREFIX%%/etc/blocky-config.yml
|
||||
|
||||
Please refer to the documentation located at
|
||||
https://0xerr0r.github.io/blocky/ for further information.
|
||||
EOM
|
||||
}
|
||||
]
|
4
dns/blocky-amigan/pkg-descr
Normal file
4
dns/blocky-amigan/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
Fast and lightweight DNS proxy as ad-blocker for local
|
||||
network with many features.
|
||||
|
||||
WWW: https://0xerr0r.github.io/blocky/
|
2
dns/blocky-amigan/pkg-plist
Normal file
2
dns/blocky-amigan/pkg-plist
Normal file
|
@ -0,0 +1,2 @@
|
|||
@sample etc/blocky-config.yml.sample
|
||||
sbin/blocky
|
Loading…
Reference in a new issue