From 8282871ffb1b844ec2430ad4097964561bf8fd0c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 23 Apr 2018 12:35:36 +0100 Subject: [PATCH] socks5 proxy for pleroma --- src/freedombone-app-pleroma | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index 12f0c593..d3e3b8ce 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -446,7 +446,7 @@ function pleroma_create_database { fi sed -i 's|import_config|# import_config|g' $pleroma_secret - sed -i '/url: /aconfig :pleroma, :http, proxy_url: "127.0.0.1:9050"' $pleroma_secret + sed -i '/url:/a config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}' $pleroma_secret sed -i 's|config :pleroma, :http, proxy_url:|# config :pleroma, :http, proxy_url:|g' $PLEROMA_DIR/config/config.exs cd "$PLEROMA_DIR" || exit 678245245724 @@ -730,7 +730,7 @@ function configure_interactive_pleroma { function pleroma_upgrade_tor { pleroma_tor_update= - if ! grep -q '9050' $pleroma_secret; then + if ! grep -q '{:socks5, :localhost, 9050}' $pleroma_secret; then pleroma_tor_update=1 fi @@ -742,8 +742,9 @@ function pleroma_upgrade_tor { return fi - if ! grep -q '9050' $pleroma_secret; then - sed -i '/url: /aconfig :pleroma, :http, proxy_url: "127.0.0.1:9050"' $pleroma_secret + if ! grep -q '{:socks5, :localhost, 9050}' $pleroma_secret; then + sed -i '/9050/d' $pleroma_secret + sed -i '/url:/a config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}' $pleroma_secret fi if ! grep -q '# config :pleroma, :http, proxy_url:' $PLEROMA_DIR/config/config.exs; then