From 523805af7c2b6a87fdbb3fe96805d56992ffb364 Mon Sep 17 00:00:00 2001 From: syui Date: Sat, 6 Dec 2025 15:09:39 +0900 Subject: [PATCH] add bgs patch --- install.zsh | 9 +++++++++ patching/190-bgs-disable-ratelimit.patch | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 patching/190-bgs-disable-ratelimit.patch diff --git a/install.zsh b/install.zsh index 59eec59..a42e399 100755 --- a/install.zsh +++ b/install.zsh @@ -45,6 +45,7 @@ PATCH_FILES=( "disable-statsig-sdk.diff" "140-social-app-yarn-network-timeout.patch" "130-atproto-ozone-enable-daemon-v2.patch" + "190-bgs-disable-ratelimit.patch" ) function at-repos-clone() { @@ -112,8 +113,14 @@ function at-repos-social-app-avatar-write() { curl -sL https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/src/lib/strings/url-helpers.ts -o $dt/lib/strings/url-helpers.ts sed -i "s#https://go.web.syu.is/redirect?u=\${encodeURIComponent(url)}#\${url}#g" $dt/lib/strings/url-helpers.ts grep -R $did_admin .|cut -d : -f 1|sort -u|xargs sed -i "s/${did_admin}/${did}/g" + # at-repos-social-app-statsig-patch } +function at-repos-social-app-statsig-patch() { + patch-apply "Disable Statsig SDK" "social-app" "disable-statsig-sdk.diff" +} + + # Common patch function with status detection function apply-patch() { local patch_name=$1 @@ -240,6 +247,8 @@ function at-repos-patch-apply-all() { repo="atproto" elif [[ $filename == *"pds"* ]]; then repo="atproto" + elif [[ $filename == *"indigo"* || $filename == *"bgs"* ]]; then + repo="indigo" fi patch-apply "$title" "$repo" "$filename" diff --git a/patching/190-bgs-disable-ratelimit.patch b/patching/190-bgs-disable-ratelimit.patch new file mode 100644 index 0000000..1a6efae --- /dev/null +++ b/patching/190-bgs-disable-ratelimit.patch @@ -0,0 +1,12 @@ +diff --git a/bgs/fedmgr.go b/bgs/fedmgr.go +index 2235c6e..e69de29 100644 +--- a/bgs/fedmgr.go ++++ b/bgs/fedmgr.go +@@ -342,6 +342,7 @@ var ErrNewSubsDisabled = fmt.Errorf("new subscriptions temporarily disabled") + // Checks whether a host is allowed to be subscribed to + // must be called with the slurper lock held + func (s *Slurper) canSlurpHost(host string) bool { ++ return true + // Check if we're over the limit for new PDSs today + if !s.NewPDSPerDayLimiter.Allow() { + return false