Skip to content

Instantly share code, notes, and snippets.

@ghostdevv
Last active September 5, 2025 05:38
Show Gist options
  • Save ghostdevv/64a2e2792bf96d9c9ae33281eaf61253 to your computer and use it in GitHub Desktop.
Save ghostdevv/64a2e2792bf96d9c9ae33281eaf61253 to your computer and use it in GitHub Desktop.
BlueSky Location Mocking User Script

Warning

This may potentially violate BlueSky's ToS, or even local laws. As such it's probably best that you just don't use BlueSky for DMs until someone invents a time machine. If you decide to use this anyway, I'm certainly not responsible. I just did this for the funsies!

This ViolentMonkey user script intercepts the fetch request to https://bsky.app/ipcc which, if you're in the UK, has a response like this:

{"countryCode":"GB","isAgeRestrictedGeo":true}

All we actually need to do is set isAgeRestrictedGeo to false, but you might as well move countries while you're at it.

edit: they also added https://ip.bsky.app/config which looks like this if you're in the UK

{
  "countryCode": "GB",
  "regionCode": "ENG",
  "ageRestrictedGeos": [
    {
      "countryCode": "GB",
      "regionCode": null
    }
  ],
  "ageBlockedGeos": [
    {
      "countryCode": "US",
      "regionCode": "MS"
    }
  ],
  "isAgeRestrictedGeo": true
}

which similarly only needs small tweaks, however for simplicity we're pretending we're in sweden

// ==UserScript==
// @name BlueSky Location Mocker
// @namespace Violentmonkey Scripts
// @match https://bsky.app/*
// @grant none
// @version 1.0
// @author Willow (GHOST)
// @description 22/08/2025, 17:43:25
// ==/UserScript==
const originalFetch = window.fetch;
window.fetch = function (...args) {
const url = `${args[0]}`;
return originalFetch.apply(this, args).then(async (response) => {
if (url === 'https://bsky.app/ipcc') {
try {
const data = await response.clone().json();
if (data?.isAgeRestrictedGeo || data?.isAgeBlockedGeo) {
throw new Error('age restricted or blocked');
}
return response;
} catch {
// give up and move to sweden.
return new Response('{"countryCode":"SE"}', response);
}
}
if (url === 'https://ip.bsky.app/config') {
try {
const data = await response.clone().json();
if (data?.isAgeRestrictedGeo || data?.isAgeBlockedGeo) {
throw new Error('age restricted or blocked');
}
} catch {
// give up and move to sweden.
return new Response(
JSON.stringify(
{
countryCode: 'SE',
regionCode: 'M',
ageRestrictedGeos: [
{
countryCode: 'GB',
regionCode: null,
},
],
ageBlockedGeos: [
{
countryCode: 'US',
regionCode: 'MS',
},
],
},
null,
4,
),
response,
);
}
}
return response;
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment