Skip Navigation

Redirecting iOS Safari

I found a decent safari extension for iOS for redirecting links to privacy focused frontends: Privacy Redirect

If you're self-hosting a private instance that's not secure you'll need to put http:// at the start of the URLs specifically.

17
17 comments
  • Just an FYI that this extension redirects after the initial request is made, due to a limitation the WebRequest API from when the extension was implemented. This means it still reaches the destination before the redirect occurs.

    The developer has been made aware of the declarativeNetRequest API which avoids this issue but he has yet to make any updates.

    • Okay, so I went and checked out that issue and I spent 20 minutes reading the linked documentation and checking through the codebase. As far as I can tell, implementing this would require a complete re-write to how the extension currently works. This is because declarativeNetRequest is designed as a more secure replacement for webRequest, which is probably why Apple supports it in the first place. It takes the job of writing redirects out of the hands of the extension and gives it to the browser instead.
      In the current codebase, after the browser matches a url, the extension runs a .js file to chop out what it needs, rewrite it and finally trigger the redirection. webRequest would be able to block the domains and still run those .js files. declarativeNetRequest would require all of that to be rewritten as regex and JSON expressions. It also might not even be possible, as I'm not sure you can dynamically change those JSON expressions after the fact, say when you want to change which instance you're being redirected too.

      Edit: Also the dev was made aware in late March, so if a full rewrite is needed I'm not surprised it hasn't been completed yet.

      • Rules can be updated dynamically using updateDynamicRules.

        I wrote an extension that implements declarativeNetRequest redirects to private front ends just using a static hardcoded list. It only took a couple of hours. I’m using it on MacOS and iOS. I don’t think it’s the kind of thing that would take significant investment from the developer, I just don’t think they have any plans or motivation to make it more private than the current implementation.

17 comments