aboutsummaryrefslogtreecommitdiff
path: root/dns/blocky
diff options
context:
space:
mode:
authorGreg Fitzgerald <gregf@beastie.tech>2021-04-28 15:58:51 +0000
committerJuraj Lutter <otis@FreeBSD.org>2021-04-28 20:55:06 +0000
commit19d94acee3a6877d5252a7a77ff7d40c97fed85c (patch)
treefd15a52fb47ecfeb7ee2d7e1a821fdc7b959317f /dns/blocky
parent13398fb580523748798c3cded2e7685b95b56272 (diff)
downloadports-19d94acee3a6877d5252a7a77ff7d40c97fed85c.tar.gz
ports-19d94acee3a6877d5252a7a77ff7d40c97fed85c.zip
Diffstat (limited to 'dns/blocky')
-rw-r--r--dns/blocky/Makefile72
-rw-r--r--dns/blocky/distinfo95
-rw-r--r--dns/blocky/files/blocky-config.yml.sample15
-rw-r--r--dns/blocky/files/blocky.in36
-rw-r--r--dns/blocky/files/pkg-message.in14
-rw-r--r--dns/blocky/pkg-descr4
-rw-r--r--dns/blocky/pkg-plist2
7 files changed, 238 insertions, 0 deletions
diff --git a/dns/blocky/Makefile b/dns/blocky/Makefile
new file mode 100644
index 000000000000..c5ed69d9df75
--- /dev/null
+++ b/dns/blocky/Makefile
@@ -0,0 +1,72 @@
+PORTNAME= blocky
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.13
+CATEGORIES= dns
+
+MAINTAINER= gregf@beastie.tech
+COMMENT= Fast and lightweight DNS proxy as ad-blocker
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= go:modules
+USE_GITHUB= yes
+GH_ACCOUNT= 0xERR0R
+USE_RC_SUBR= blocky
+
+GH_TUPLE= \
+ asaskevich:EventBus:49d423059eef:asaskevich_eventbus/vendor/github.com/asaskevich/EventBus \
+ asaskevich:govalidator:f61b66f89f4a:asaskevich_govalidator/vendor/github.com/asaskevich/govalidator \
+ beorn7:perks:v1.0.1:beorn7_perks/vendor/github.com/beorn7/perks \
+ cespare:xxhash:v2.1.1:cespare_xxhash_v2/vendor/github.com/cespare/xxhash/v2 \
+ davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \
+ fsnotify:fsnotify:v1.4.9:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify \
+ go-chi:chi:v4.1.2:go_chi_chi/vendor/github.com/go-chi/chi \
+ go-chi:cors:v1.2.0:go_chi_cors/vendor/github.com/go-chi/cors \
+ go-openapi:errors:v0.19.2:go_openapi_errors/vendor/github.com/go-openapi/errors \
+ go-openapi:strfmt:v0.19.4:go_openapi_strfmt/vendor/github.com/go-openapi/strfmt \
+ go-stack:stack:v1.8.0:go_stack_stack/vendor/github.com/go-stack/stack \
+ go-tomb:tomb:dd632973f1e7:go_tomb_tomb/vendor/gopkg.in/tomb.v1 \
+ go-yaml:yaml:9f266ea9e77c:go_yaml_yaml_1/vendor/gopkg.in/yaml.v3 \
+ go-yaml:yaml:v2.4.0:go_yaml_yaml/vendor/gopkg.in/yaml.v2 \
+ golang:crypto:75b288015ac9:golang_crypto/vendor/golang.org/x/crypto \
+ golang:net:e18ecbb05110:golang_net/vendor/golang.org/x/net \
+ golang:protobuf:v1.4.3:golang_protobuf/vendor/github.com/golang/protobuf \
+ golang:sys:68d13333faf2:golang_sys/vendor/golang.org/x/sys \
+ golang:text:v0.3.4:golang_text/vendor/golang.org/x/text \
+ inconshreveable:mousetrap:v1.0.0:inconshreveable_mousetrap/vendor/github.com/inconshreveable/mousetrap \
+ jedib0t:go-pretty:v4.3.0:jedib0t_go_pretty/vendor/github.com/jedib0t/go-pretty \
+ mattn:go-colorable:v0.1.4:mattn_go_colorable/vendor/github.com/mattn/go-colorable \
+ mattn:go-isatty:v0.0.8:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
+ mattn:go-runewidth:v0.0.8:mattn_go_runewidth/vendor/github.com/mattn/go-runewidth \
+ matttproud:golang_protobuf_extensions:v1.0.1:matttproud_golang_protobuf_extensions/vendor/github.com/matttproud/golang_protobuf_extensions \
+ mgutz:ansi:9520e82c474b:mgutz_ansi/vendor/github.com/mgutz/ansi \
+ miekg:dns:v1.1.41:miekg_dns/vendor/github.com/miekg/dns \
+ mitchellh:mapstructure:v1.1.2:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \
+ mongodb:mongo-go-driver:v1.0.3:mongodb_mongo_go_driver/vendor/go.mongodb.org/mongo-driver \
+ mroth:weightedrand:v0.4.1:mroth_weightedrand/vendor/github.com/mroth/weightedrand \
+ nxadm:tail:v1.4.8:nxadm_tail/vendor/github.com/nxadm/tail \
+ onsi:ginkgo:v1.16.1:onsi_ginkgo/vendor/github.com/onsi/ginkgo \
+ onsi:gomega:v1.11.0:onsi_gomega/vendor/github.com/onsi/gomega \
+ patrickmn:go-cache:v2.1.0:patrickmn_go_cache/vendor/github.com/patrickmn/go-cache \
+ pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \
+ prometheus:client_golang:v1.10.0:prometheus_client_golang/vendor/github.com/prometheus/client_golang \
+ prometheus:client_model:v0.2.0:prometheus_client_model/vendor/github.com/prometheus/client_model \
+ prometheus:common:v0.18.0:prometheus_common/vendor/github.com/prometheus/common \
+ prometheus:procfs:v0.6.0:prometheus_procfs/vendor/github.com/prometheus/procfs \
+ protocolbuffers:protobuf-go:v1.23.0:protocolbuffers_protobuf_go/vendor/google.golang.org/protobuf \
+ sirupsen:logrus:v1.8.1:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
+ spf13:cobra:v1.1.3:spf13_cobra/vendor/github.com/spf13/cobra \
+ spf13:pflag:v1.0.5:spf13_pflag/vendor/github.com/spf13/pflag \
+ stretchr:objx:v0.2.0:stretchr_objx/vendor/github.com/stretchr/objx \
+ stretchr:testify:v1.7.0:stretchr_testify/vendor/github.com/stretchr/testify \
+ x-cray:logrus-prefixed-formatter:v0.5.2:x_cray_logrus_prefixed_formatter/vendor/github.com/x-cray/logrus-prefixed-formatter
+
+GO_TARGET= main.go:${PREFIX}/sbin/${PORTNAME}
+
+SUB_FILES= pkg-message
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/blocky-config.yml.sample ${STAGEDIR}${PREFIX}/etc/blocky-config.yml.sample
+
+.include <bsd.port.mk>
diff --git a/dns/blocky/distinfo b/dns/blocky/distinfo
new file mode 100644
index 000000000000..024e4e962a6e
--- /dev/null
+++ b/dns/blocky/distinfo
@@ -0,0 +1,95 @@
+TIMESTAMP = 1618871237
+SHA256 (0xERR0R-blocky-v0.13_GH0.tar.gz) = 44655fde420c7699b991ef3fc3b38631441a8cfb4881c2bf23f72273c9b456ff
+SIZE (0xERR0R-blocky-v0.13_GH0.tar.gz) = 426743
+SHA256 (asaskevich-EventBus-49d423059eef_GH0.tar.gz) = d410b23e38de9a9e98422ee1ddf5750b35456753cc9c5e5d7aa406a2cd71180a
+SIZE (asaskevich-EventBus-49d423059eef_GH0.tar.gz) = 7529
+SHA256 (asaskevich-govalidator-f61b66f89f4a_GH0.tar.gz) = 7e241314ac30b59d9dc6ead8e902de94e07135486694e4e7ef0dc97eaf42c40e
+SIZE (asaskevich-govalidator-f61b66f89f4a_GH0.tar.gz) = 51800
+SHA256 (beorn7-perks-v1.0.1_GH0.tar.gz) = 98db84bb0224a26094e6adba91b7ee7a1a7ace28cb648d818f8e779e6a19f825
+SIZE (beorn7-perks-v1.0.1_GH0.tar.gz) = 10867
+SHA256 (cespare-xxhash-v2.1.1_GH0.tar.gz) = 0ee31178d2c5a1249be4e26294a2f428008dc4e1ecbbfbe47f74e41026df1148
+SIZE (cespare-xxhash-v2.1.1_GH0.tar.gz) = 9292
+SHA256 (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 7d82b9bb7291adbe7498fe946920ab3e7fc9e6cbfc3b2294693fad00bf0dd17e
+SIZE (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 42152
+SHA256 (fsnotify-fsnotify-v1.4.9_GH0.tar.gz) = 4f888b1cb132026227826751d156c0a2958e7d492e5e38386cde8848ef494dcb
+SIZE (fsnotify-fsnotify-v1.4.9_GH0.tar.gz) = 31900
+SHA256 (go-chi-chi-v4.1.2_GH0.tar.gz) = 9382097218bb6922ecc26707fb683a4568825010fb0cc5168621b88661d5e42e
+SIZE (go-chi-chi-v4.1.2_GH0.tar.gz) = 75928
+SHA256 (go-chi-cors-v1.2.0_GH0.tar.gz) = f9da3db2ad76085112fb6b47e7a2f22ab0adac88cdc5071ea5faf3e862139cc0
+SIZE (go-chi-cors-v1.2.0_GH0.tar.gz) = 8405
+SHA256 (go-openapi-errors-v0.19.2_GH0.tar.gz) = 9de2d613f203fcdafacb58385dcddca02af8ad98575ffbf65f0cd2c326b31f81
+SIZE (go-openapi-errors-v0.19.2_GH0.tar.gz) = 16875
+SHA256 (go-openapi-strfmt-v0.19.4_GH0.tar.gz) = 3a99b3d0cd2219da2c9a57e184ce53c3387782b68ba0f5cc6d5d8634b711784d
+SIZE (go-openapi-strfmt-v0.19.4_GH0.tar.gz) = 35493
+SHA256 (go-stack-stack-v1.8.0_GH0.tar.gz) = 3b8987e137d76f4f35db1e8005ec7fb766b68eed8cac0ca0b795ac43cd72b319
+SIZE (go-stack-stack-v1.8.0_GH0.tar.gz) = 8039
+SHA256 (go-tomb-tomb-dd632973f1e7_GH0.tar.gz) = b67f4ee9324a78176bc3196fe262388696aeb3f31d9879d498200219f9c4c554
+SIZE (go-tomb-tomb-dd632973f1e7_GH0.tar.gz) = 3631
+SHA256 (go-yaml-yaml-9f266ea9e77c_GH0.tar.gz) = 63efc9aabcbb56b2c9469927784fd67ecb3a79720c4fa754c511335a04156d04
+SIZE (go-yaml-yaml-9f266ea9e77c_GH0.tar.gz) = 86898
+SHA256 (go-yaml-yaml-v2.4.0_GH0.tar.gz) = d8e94679e5fff6bd1a35e10241543929a5f3da44f701755babf99b3daf0faac0
+SIZE (go-yaml-yaml-v2.4.0_GH0.tar.gz) = 73209
+SHA256 (golang-crypto-75b288015ac9_GH0.tar.gz) = 6e74e21bf9dfdbf0a8dac8cb205fbc3bfd8dff308a24080b9d6093a3858f0db2
+SIZE (golang-crypto-75b288015ac9_GH0.tar.gz) = 1729931
+SHA256 (golang-net-e18ecbb05110_GH0.tar.gz) = c30374f6fd34c6b77d53224aa3ba7458e3773d7e6e4fa16d88fb05c7d05e0e89
+SIZE (golang-net-e18ecbb05110_GH0.tar.gz) = 1253124
+SHA256 (golang-protobuf-v1.4.3_GH0.tar.gz) = 5736f943f8647362f5559689df6154f3c85d261fb088867c8a68494e2a767610
+SIZE (golang-protobuf-v1.4.3_GH0.tar.gz) = 171969
+SHA256 (golang-sys-68d13333faf2_GH0.tar.gz) = 5c3c90ba4825031c3b528655871fa23218c401f6f47ef097ce8e2c90e84f8d00
+SIZE (golang-sys-68d13333faf2_GH0.tar.gz) = 1217255
+SHA256 (golang-text-v0.3.4_GH0.tar.gz) = 39eabfef83413361eafd4353ee9d9821707853235f2e55f3d5b1d38ce698fe89
+SIZE (golang-text-v0.3.4_GH0.tar.gz) = 8354508
+SHA256 (inconshreveable-mousetrap-v1.0.0_GH0.tar.gz) = 5edc7731c819c305623568e317aa253d342be3447def97f1fa9e10eb5ad819f6
+SIZE (inconshreveable-mousetrap-v1.0.0_GH0.tar.gz) = 2290
+SHA256 (jedib0t-go-pretty-v4.3.0_GH0.tar.gz) = 563c07ce1dc3bfaf88d3dad0e965c09e449993f775f30396b2e399953ffd7294
+SIZE (jedib0t-go-pretty-v4.3.0_GH0.tar.gz) = 550932
+SHA256 (mattn-go-colorable-v0.1.4_GH0.tar.gz) = 157806ad8125e6bef4d9b58c9125ccb98a8343136f93faf442ab0cc6e7c24c11
+SIZE (mattn-go-colorable-v0.1.4_GH0.tar.gz) = 8981
+SHA256 (mattn-go-isatty-v0.0.8_GH0.tar.gz) = 4f40edb394582f49ac6330bc807be93018216ef485eb65f00adcf61b670d4f3e
+SIZE (mattn-go-isatty-v0.0.8_GH0.tar.gz) = 3564
+SHA256 (mattn-go-runewidth-v0.0.8_GH0.tar.gz) = 7b1ae2393fe4b0ddc64b94aabf1d825c969aebe09f167751a009d5ed6836850e
+SIZE (mattn-go-runewidth-v0.0.8_GH0.tar.gz) = 16500
+SHA256 (matttproud-golang_protobuf_extensions-v1.0.1_GH0.tar.gz) = 2def0ee6f6b12b1efc0e3007d89f598608a072610e805c3655ea9d13c3ead49b
+SIZE (matttproud-golang_protobuf_extensions-v1.0.1_GH0.tar.gz) = 37184
+SHA256 (mgutz-ansi-9520e82c474b_GH0.tar.gz) = f9203c71aceb8b7ffa87181fd8f51dc69acce3d2161c4c017ea92c6840f85093
+SIZE (mgutz-ansi-9520e82c474b_GH0.tar.gz) = 4876
+SHA256 (miekg-dns-v1.1.41_GH0.tar.gz) = c807ee900b039dfb117b86548702459f4902cf18020b41797d337ec33d9eeee8
+SIZE (miekg-dns-v1.1.41_GH0.tar.gz) = 199522
+SHA256 (mitchellh-mapstructure-v1.1.2_GH0.tar.gz) = 53fbc06b125ff1c9c73a4eb1764346932671a29c67a45a92e2ebc6855635069b
+SIZE (mitchellh-mapstructure-v1.1.2_GH0.tar.gz) = 20980
+SHA256 (mongodb-mongo-go-driver-v1.0.3_GH0.tar.gz) = 8a26f0989a516b6ee9c3e3ddfc453d58141e375d0bd06465e0aac4dbfe815f3e
+SIZE (mongodb-mongo-go-driver-v1.0.3_GH0.tar.gz) = 3307263
+SHA256 (mroth-weightedrand-v0.4.1_GH0.tar.gz) = 1257eb150f0886131dc9ef816f9f5cee4dce75453774732b370e8aebe3a90220
+SIZE (mroth-weightedrand-v0.4.1_GH0.tar.gz) = 7660
+SHA256 (nxadm-tail-v1.4.8_GH0.tar.gz) = 8208362046819275a0809000dceacbd7b2a7caa07bcd6547dd2ff9b2104fa56c
+SIZE (nxadm-tail-v1.4.8_GH0.tar.gz) = 1255770
+SHA256 (onsi-ginkgo-v1.16.1_GH0.tar.gz) = 976ba34e4346d2bc2c6063d3bbab3158b2197af60a99e3af7377ce4e64ceb6b1
+SIZE (onsi-ginkgo-v1.16.1_GH0.tar.gz) = 163382
+SHA256 (onsi-gomega-v1.11.0_GH0.tar.gz) = 474c31779682826b62fed14f7599acb3ac11b6c135b43beda2eca592aa4f74c9
+SIZE (onsi-gomega-v1.11.0_GH0.tar.gz) = 102337
+SHA256 (patrickmn-go-cache-v2.1.0_GH0.tar.gz) = 3ab025f2f580f8818a5357db52596fef1b0ad5945816a022c8b805ba46dc93be
+SIZE (patrickmn-go-cache-v2.1.0_GH0.tar.gz) = 13572
+SHA256 (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 28f3dc1b5c0efd61203ab07233f774740d3bf08da4d8153fb5310db6cea0ebda
+SIZE (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 11398
+SHA256 (prometheus-client_golang-v1.10.0_GH0.tar.gz) = e7305f84aa6553d9dd4bfd148d29289df36a9df82dae7be3c6eda62feb56f3d1
+SIZE (prometheus-client_golang-v1.10.0_GH0.tar.gz) = 176316
+SHA256 (prometheus-client_model-v0.2.0_GH0.tar.gz) = 4ab1be9cdfa702d7f49beeb09a256bcc6a2aad55e8a0a37e7732a46934264e12
+SIZE (prometheus-client_model-v0.2.0_GH0.tar.gz) = 10986
+SHA256 (prometheus-common-v0.18.0_GH0.tar.gz) = 64b0963add6f1945d8da40452d9bf796db263e4d8aba26cf17fdcc3f76b8f940
+SIZE (prometheus-common-v0.18.0_GH0.tar.gz) = 123693
+SHA256 (prometheus-procfs-v0.6.0_GH0.tar.gz) = 6ad7a23cf4db9fa5dbf2c5d8fbd0fbf5ffe48e3ddb7bf15f9359813d764ce73c
+SIZE (prometheus-procfs-v0.6.0_GH0.tar.gz) = 169898
+SHA256 (protocolbuffers-protobuf-go-v1.23.0_GH0.tar.gz) = e7266bedaa4f110216fce52ae533dc5eba475d3829bb0592e8876684e202ae1f
+SIZE (protocolbuffers-protobuf-go-v1.23.0_GH0.tar.gz) = 1214648
+SHA256 (sirupsen-logrus-v1.8.1_GH0.tar.gz) = e9492c08ac8f202b438ccfb992bf81b7860739cf8f2266958e0c574c7abfdd74
+SIZE (sirupsen-logrus-v1.8.1_GH0.tar.gz) = 47161
+SHA256 (spf13-cobra-v1.1.3_GH0.tar.gz) = e5f93c61e1236e61c7fc45882d2a03b81f46ebebdf70628ebb64b0b5fe34f6fa
+SIZE (spf13-cobra-v1.1.3_GH0.tar.gz) = 146580
+SHA256 (spf13-pflag-v1.0.5_GH0.tar.gz) = 9a2cae1f8e8ab0d2cc8ebe468e871af28d9ac0962cf0520999e3ba85f0c7b808
+SIZE (spf13-pflag-v1.0.5_GH0.tar.gz) = 50796
+SHA256 (stretchr-objx-v0.2.0_GH0.tar.gz) = be7dce02798cdc24cee6bd2d95bfcf6976b1521ef735349bf5e7dfe6d147746f
+SIZE (stretchr-objx-v0.2.0_GH0.tar.gz) = 79981
+SHA256 (stretchr-testify-v1.7.0_GH0.tar.gz) = 560c0984072cb436b17bbce5699b205d5aa2beb58ef7a94530d7724b5739a8d6
+SIZE (stretchr-testify-v1.7.0_GH0.tar.gz) = 91073
+SHA256 (x-cray-logrus-prefixed-formatter-v0.5.2_GH0.tar.gz) = a966d81bbaef60a98073b589c2054f0171ccc09539589b71c30c936009fbb164
+SIZE (x-cray-logrus-prefixed-formatter-v0.5.2_GH0.tar.gz) = 6873
diff --git a/dns/blocky/files/blocky-config.yml.sample b/dns/blocky/files/blocky-config.yml.sample
new file mode 100644
index 000000000000..978c57082d31
--- /dev/null
+++ b/dns/blocky/files/blocky-config.yml.sample
@@ -0,0 +1,15 @@
+upstream:
+ externalResolvers:
+ - 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
+port: 53
+httpPort: 4000
diff --git a/dns/blocky/files/blocky.in b/dns/blocky/files/blocky.in
new file mode 100644
index 000000000000..24a92028836a
--- /dev/null
+++ b/dns/blocky/files/blocky.in
@@ -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"
diff --git a/dns/blocky/files/pkg-message.in b/dns/blocky/files/pkg-message.in
new file mode 100644
index 000000000000..953a51c3cce8
--- /dev/null
+++ b/dns/blocky/files/pkg-message.in
@@ -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
+}
+]
diff --git a/dns/blocky/pkg-descr b/dns/blocky/pkg-descr
new file mode 100644
index 000000000000..372109f8b56d
--- /dev/null
+++ b/dns/blocky/pkg-descr
@@ -0,0 +1,4 @@
+Fast and lightweight DNS proxy as ad-blocker for local
+network with many features.
+
+WWW: https://0xerr0r.github.io/blocky/
diff --git a/dns/blocky/pkg-plist b/dns/blocky/pkg-plist
new file mode 100644
index 000000000000..55ea60866bc2
--- /dev/null
+++ b/dns/blocky/pkg-plist
@@ -0,0 +1,2 @@
+@sample etc/blocky-config.yml.sample
+sbin/blocky