socks5 proxy for pleroma

This commit is contained in:
Bob Mottram 2018-04-23 12:35:36 +01:00
parent a76e5b0424
commit 8282871ffb
1 changed files with 5 additions and 4 deletions

View File

@ -446,7 +446,7 @@ function pleroma_create_database {
fi fi
sed -i 's|import_config|# import_config|g' $pleroma_secret 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 sed -i 's|config :pleroma, :http, proxy_url:|# config :pleroma, :http, proxy_url:|g' $PLEROMA_DIR/config/config.exs
cd "$PLEROMA_DIR" || exit 678245245724 cd "$PLEROMA_DIR" || exit 678245245724
@ -730,7 +730,7 @@ function configure_interactive_pleroma {
function pleroma_upgrade_tor { function pleroma_upgrade_tor {
pleroma_tor_update= pleroma_tor_update=
if ! grep -q '9050' $pleroma_secret; then if ! grep -q '{:socks5, :localhost, 9050}' $pleroma_secret; then
pleroma_tor_update=1 pleroma_tor_update=1
fi fi
@ -742,8 +742,9 @@ function pleroma_upgrade_tor {
return return
fi fi
if ! grep -q '9050' $pleroma_secret; then if ! grep -q '{:socks5, :localhost, 9050}' $pleroma_secret; then
sed -i '/url: /aconfig :pleroma, :http, proxy_url: "127.0.0.1:9050"' $pleroma_secret sed -i '/9050/d' $pleroma_secret
sed -i '/url:/a config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}' $pleroma_secret
fi fi
if ! grep -q '# config :pleroma, :http, proxy_url:' $PLEROMA_DIR/config/config.exs; then if ! grep -q '# config :pleroma, :http, proxy_url:' $PLEROMA_DIR/config/config.exs; then