diff --git a/CHANGELOG.md b/CHANGELOG.md index 34d1a4b..9583d50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Make `/api/v1/accounts/{account_id}/follow` work with form-data. +- Make `onion_proxy_url` override `proxy_url` setting if request target is onion. ## [1.21.0] - 2023-04-12 diff --git a/src/activitypub/http_client.rs b/src/activitypub/http_client.rs index 05318ed..74171ca 100644 --- a/src/activitypub/http_client.rs +++ b/src/activitypub/http_client.rs @@ -15,8 +15,8 @@ pub fn build_federation_client( let mut client_builder = Client::builder(); let mut maybe_proxy_url = instance.proxy_url.as_ref(); if is_onion { - maybe_proxy_url = maybe_proxy_url - .or(instance.onion_proxy_url.as_ref()); + maybe_proxy_url = instance.onion_proxy_url.as_ref() + .or(maybe_proxy_url); }; if let Some(proxy_url) = maybe_proxy_url { let proxy = Proxy::all(proxy_url)?;