From 282576c0864a51c360cb37f96e3ed71159ca953c Mon Sep 17 00:00:00 2001 From: lephisto Date: Wed, 27 Mar 2019 14:46:44 +0100 Subject: [PATCH] Implement functional Blacklist Script --- roles/fastd/files/blacklist.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/fastd/files/blacklist.sh b/roles/fastd/files/blacklist.sh index 039e4d0..4b4de82 100644 --- a/roles/fastd/files/blacklist.sh +++ b/roles/fastd/files/blacklist.sh @@ -1,2 +1,10 @@ -#!/bin/sh -exit 0 +#!/bin/bash +PEER_KEY=$1 +PEER_ADDRESS=$2 +if /bin/grep -Fq $PEER_KEY /opt/ffrgb_cty/vpn-blacklist/blacklist.json; then + echo "BANNED KEY: $PEER_KEY $PEER_ADDRESS" + exit 1 +else + echo "CLEAN KEY: $PEER_KEY " + exit 0 +fi