diff --git a/install.zsh b/install.zsh index 97db47b..642238b 100755 --- a/install.zsh +++ b/install.zsh @@ -71,7 +71,6 @@ PATCH_FILES_CURL=( typeset -a PATCH_FILES PATCH_FILES=( "170-pds-oauth-same-site-fix.patch" - "8980-social-app-disable-proxy.diff" "140-social-app-yarn-network-timeout.patch" "130-atproto-ozone-enable-daemon-v2.patch" "200-feed-generator-custom.patch" diff --git a/ios/patching/047-social-app-ios-conditional-proxy.patch b/ios/patching/047-social-app-ios-conditional-proxy.patch deleted file mode 100644 index 4c2d5e6..0000000 --- a/ios/patching/047-social-app-ios-conditional-proxy.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- a/src/state/session/agent.ts -+++ b/src/state/session/agent.ts -@@ -43,12 +43,18 @@ - - export type ProxyHeaderValue = `${Did}#${AtprotoServiceType}` - -+// Default Bluesky proxy DID for non-self-hosted accounts (bsky.social etc.) -+const DEFAULT_BSKY_PROXY: ProxyHeaderValue = 'did:web:api.bsky.app#bsky_appview' -+ -+function shouldUseProxy(serviceUrl: string): boolean { -+ return !serviceUrl.startsWith(BSKY_SERVICE) -+} -+ - export function createPublicAgent() { - configureModerationForGuest() // Side effect but only relevant for tests - - const agent = new BskyAppAgent({service: PUBLIC_BSKY_SERVICE}) -- // Disable proxy for self-hosted environments -- // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) -+ // Self-hosted public agent doesn't need proxy - return agent - } - -@@ -91,8 +97,10 @@ - // after session is attached - const aa = prefetchAgeAssuranceData({agent}) - -- // Disable proxy for self-hosted environments -- // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) -+ // Enable proxy only for non-self-hosted accounts (e.g. bsky.social) -+ if (shouldUseProxy(storedAccount.service)) { -+ agent.configureProxy(DEFAULT_BSKY_PROXY) -+ } - - return agent.prepare({ - resolvers: [gates, moderation, aa], -@@ -131,8 +139,10 @@ - const moderation = configureModerationForAccount(agent, account) - const aa = prefetchAgeAssuranceData({agent}) - -- // Disable proxy for self-hosted environments -- // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) -+ // Enable proxy only for non-self-hosted accounts (e.g. bsky.social) -+ if (shouldUseProxy(service)) { -+ agent.configureProxy(DEFAULT_BSKY_PROXY) -+ } - - return agent.prepare({ - resolvers: [gates, moderation, aa], -@@ -304,8 +314,10 @@ - logger.error(e, {message: `session: failed snoozeEmailConfirmationPrompt`}) - } - -- // Disable proxy for self-hosted environments -- // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) -+ // Enable proxy only for non-self-hosted accounts (e.g. bsky.social) -+ if (shouldUseProxy(service)) { -+ agent.configureProxy(DEFAULT_BSKY_PROXY) -+ } - - return agent.prepare({ - resolvers: [gates, moderation, aa], diff --git a/ios/setup.zsh b/ios/setup.zsh index edd1297..c970b1f 100755 --- a/ios/setup.zsh +++ b/ios/setup.zsh @@ -54,7 +54,6 @@ PATCH_FILES_IOS=( "044-social-app-ios-splash-video.patch" "045-social-app-ios-composer-cancel.patch" "046-social-app-ios-null-url-guards.patch" - "047-social-app-ios-conditional-proxy.patch" ) function ios-env() { diff --git a/patching/8980-social-app-disable-proxy.diff b/patching/8980-social-app-disable-proxy.diff deleted file mode 100644 index 4bc454f..0000000 --- a/patching/8980-social-app-disable-proxy.diff +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/src/state/session/agent.ts b/src/state/session/agent.ts -index 36d19299b..ba095436a 100644 ---- a/src/state/session/agent.ts -+++ b/src/state/session/agent.ts -@@ -39,7 +39,8 @@ export function createPublicAgent() { - configureModerationForGuest() // Side effect but only relevant for tests - - const agent = new BskyAppAgent({service: PUBLIC_BSKY_SERVICE}) -- agent.configureProxy(BLUESKY_PROXY_HEADER.get()) -+ // Disable proxy for self-hosted environments -+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) - return agent - } - -@@ -77,7 +78,8 @@ export async function createAgentAndResume( - } - } - -- agent.configureProxy(BLUESKY_PROXY_HEADER.get()) -+ // Disable proxy for self-hosted environments -+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) - - return agent.prepare(gates, moderation, onSessionChange) - } -@@ -112,7 +114,8 @@ export async function createAgentAndLogin( - const gates = tryFetchGates(account.did, 'prefer-fresh-gates') - const moderation = configureModerationForAccount(agent, account) - -- agent.configureProxy(BLUESKY_PROXY_HEADER.get()) -+ // Disable proxy for self-hosted environments -+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) - - return agent.prepare(gates, moderation, onSessionChange) - } -@@ -201,7 +204,8 @@ export async function createAgentAndCreateAccount( - logger.error(e, {message: `session: failed snoozeEmailConfirmationPrompt`}) - } - -- agent.configureProxy(BLUESKY_PROXY_HEADER.get()) -+ // Disable proxy for self-hosted environments -+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) - - return agent.prepare(gates, moderation, onSessionChange) - }