rename blacklist to blocklist
This commit is contained in:
parent
89d7a2db67
commit
05e34b5aaa
|
@ -34,6 +34,9 @@ server {
|
||||||
client_body_buffer_size 128k;
|
client_body_buffer_size 128k;
|
||||||
client_max_body_size 128k;
|
client_max_body_size 128k;
|
||||||
|
|
||||||
|
# legacy endpoint rewrite
|
||||||
|
rewrite /skynet/blacklist /skynet/blocklist permanent;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# This is only safe workaround to reroute based on some conditions
|
# This is only safe workaround to reroute based on some conditions
|
||||||
# See https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/
|
# See https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/
|
||||||
|
@ -60,22 +63,13 @@ server {
|
||||||
proxy_pass https://nebulouslabs.github.io/skynet-docs;
|
proxy_pass https://nebulouslabs.github.io/skynet-docs;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /blacklist {
|
location /skynet/blocklist {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache blacklist for 1 minute
|
proxy_cache_valid any 1m; # cache blocklist for 1 minute
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://siad/skynet/blacklist;
|
proxy_pass http://siad/skynet/blocklist;
|
||||||
}
|
|
||||||
|
|
||||||
location /skynet/blacklist {
|
|
||||||
include /etc/nginx/conf.d/include/cors;
|
|
||||||
|
|
||||||
proxy_cache skynet;
|
|
||||||
proxy_cache_valid any 1m; # cache blacklist for 1 minute
|
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
|
||||||
proxy_pass http://siad/skynet/blacklist;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /portals {
|
location /portals {
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
set -e # exit on first error
|
set -e # exit on first error
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Please provide a skylink to blacklist" && exit 1
|
echo "Please provide a skylink to blocklist" && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for server in "germany.siasky.net" "us-east.siasky.net" "us-west.siasky.net" "helsinki.siasky.net" "siasky.dev";
|
for server in "germany.siasky.net" "us-east.siasky.net" "us-west.siasky.net" "helsinki.siasky.net" "us-va-1.siasky.net" "us-pa-2.siasky.net";
|
||||||
do
|
do
|
||||||
echo "⌁ Blacklisting on ${server}"
|
echo "⌁ Blacklisting on ${server}"
|
||||||
ssh -q -t user@${server} 'docker exec sia siac skynet blacklist add '$1''
|
ssh -q -t user@${server} 'docker exec sia siac skynet blocklist add '$1''
|
||||||
ssh -q -t user@${server} 'rm -rf /home/user/skynet_webportal/docker/data/nginx/cache' # prune nginx cache
|
ssh -q -t user@${server} 'rm -rf /home/user/skynet_webportal/docker/data/nginx/cache' # prune nginx cache
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "✓ All portals succesfully blacklisted provided skylink"
|
echo "✓ All portals succesfully blocklisted $1"
|
|
@ -23,7 +23,7 @@ You may want to fork this repository and replace ssh keys in
|
||||||
- [funds-checker](funds-checker.py): script that checks wallet balance and sends status messages to discord periodically
|
- [funds-checker](funds-checker.py): script that checks wallet balance and sends status messages to discord periodically
|
||||||
- [health-checker](health-checker.py): script that monitors health-check service for server health issues and reports them to discord periodically
|
- [health-checker](health-checker.py): script that monitors health-check service for server health issues and reports them to discord periodically
|
||||||
- [log-checker](log-checker.py): script that scans siad logs for critical errors and reports them to discord periodically
|
- [log-checker](log-checker.py): script that scans siad logs for critical errors and reports them to discord periodically
|
||||||
- [blacklist-skylink](../scripts/blacklist-skylink.sh): script that can be run locally from a machine that has access to all your skynet portal servers that blacklists provided skylink and prunes nginx cache to ensure it's not available any more (that is a bit much but that's the best we can do right now without paid nginx version) - if you want to use it, make sure to adjust the server addresses
|
- [blocklist-skylink](../scripts/blocklist-skylink.sh): script that can be run locally from a machine that has access to all your skynet portal servers that blocklists provided skylink and prunes nginx cache to ensure it's not available any more (that is a bit much but that's the best we can do right now without paid nginx version) - if you want to use it, make sure to adjust the server addresses
|
||||||
|
|
||||||
### Step 1: setting up server user
|
### Step 1: setting up server user
|
||||||
|
|
||||||
|
|
Reference in New Issue