Guide Dart

Fix Supabase in Flutter for Indian Users

Step-by-step guide to bypass ISP DNS blocks in your Flutter app. One environment variable change - no code rewrites.


The Problem

Indian ISPs - including Jio, Airtel, ACT Fibernet, and BSNL - are DNS-blocking *.supabase.co following a government ministry order under Section 69A of the IT Act. When a user on one of these networks tries to reach your Supabase backend, the ISP's DNS resolver returns a sinkhole IP instead of the real Supabase server address. The connection hangs and eventually times out with ERR_CONNECTION_TIMED_OUT or DNS_PROBE_FINISHED_NXDOMAIN.

Client-side apps like Flutter apps are directly affected because API calls happen from the user's browser or device, which uses the ISP's DNS. Your app cannot reach *.supabase.co, so every Supabase operation fails - database queries, authentication, file storage, and real-time subscriptions.

Flutter note: This block also affects mobile devices. When your Flutter app runs on an Android or iOS device connected to Jio 4G/5G or Airtel mobile data, it uses the carrier's DNS resolver. Most Indian Android users are on Jio or Airtel, so a significant portion of your mobile user base is affected.

Changing DNS on your own machine (to 1.1.1.1 or 8.8.8.8) can help during development, but it does not fix the problem for your end users. They are stuck on their ISP's default DNS and cannot change it. The fix needs to be transparent - your users should not need to install a VPN or configure anything.

Your Current Setup

This is the standard Supabase setup for Flutter. The URL points to *.supabase.co, which is blocked on Jio, Airtel, ACT, and BSNL networks across India.

lib/supabase.dart
// lib/supabase.dart
import 'package:supabase_flutter/supabase_flutter.dart';

Future<void> initSupabase() async {
  await Supabase.initialize(
    url: 'https://xyz.supabase.co',
    anonKey: 'your-anon-key',
  );
}

final supabase = Supabase.instance.client;

When an Indian user on a blocked ISP opens your Flutter app, the Supabase client tries to connect to the .supabase.co domain. The ISP intercepts the DNS query and returns a dead-end IP. The request never reaches Supabase, and your app fails silently or shows a network error.

Step 1: Set Up JioBase

JioBase is a managed reverse proxy that routes your Supabase traffic through Cloudflare's edge network. Since the proxy domain is not blocked, DNS resolves normally for all ISPs. Your Supabase requests go through the proxy instead of directly to *.supabase.co.

1

Create a free account

Go to jiobase.com/register and sign up with your email. No credit card required. The free tier includes 50,000 requests per month.

2

Create a new proxy app

In the dashboard, click "New App" and fill in the details. Give your app a name, and enter your Supabase project URL (e.g., https://xyz.supabase.co).

3

Enter your Supabase project URL

Paste your full Supabase project URL. This is the URL you currently use in your Flutter app, like https://abcdefgh.supabase.co. JioBase will proxy all traffic to this endpoint.

4

Choose a slug

Pick a slug for your proxy URL. For example, choosing myapp gives you myapp.jiobase.com. This is the URL your Flutter app will connect to instead of supabase.co.

Step 2: Update Your Flutter Code

Replace your Supabase URL with the JioBase proxy URL. Your anon key stays the same. All Supabase features - REST API, Auth, Storage, Realtime - work through the proxy without any code changes beyond the URL swap.

lib/constants.dart
// lib/supabase.dart
import 'package:supabase_flutter/supabase_flutter.dart';

Future<void> initSupabase() async {
  await Supabase.initialize(
    // Proxied through JioBase:
    url: 'https://myapp.jiobase.com',
    anonKey: 'your-anon-key',
  );
}

final supabase = Supabase.instance.client;

That is the entire code change. The Supabase client library does not validate or restrict the URL format. It sends standard HTTP requests and WebSocket connections to whatever URL you provide. JioBase transparently forwards every request to your actual Supabase project over HTTPS. Your Row Level Security policies, auth configuration, and database schema are completely unaffected.

Step 3: Rebuild and Deploy

After updating the environment variable (or the URL in your code), you need to rebuild your Flutter app and redeploy it. Most frameworks read environment variables at build time, so a restart or rebuild is required for the change to take effect.

terminal
flutter pub run build

Once the build completes, deploy to your hosting provider as you normally would. The updated app will route all Supabase traffic through JioBase's Cloudflare proxy. Users on Jio, Airtel, ACT, BSNL, and any other affected ISP will be able to access your app immediately.

For Flutter, run flutter build apk for Android or flutter build ios for iOS, then publish the update to the Play Store or App Store. Existing app installations will continue to fail until users update to the new version with the proxy URL.

Additional Notes for Flutter

Here are some Flutter-specific tips to keep in mind when setting up the proxy:

Flutter apps run on the user's device (mobile or web), so the ISP block directly affects your Indian users. This is especially critical for Android apps since most Indian Android users are on Jio or Airtel.

For Flutter web builds, the fix is identical - the supabase_flutter package uses the same URL configuration.

After changing the URL, rebuild your app (flutter build apk / flutter build web) and publish an update. Existing app installations will continue to fail until they update.

Verify It Works

After deploying your updated Flutter app, verify the proxy is working correctly with these steps:

1

Deploy your updated app

Push your changes and let your hosting provider build and deploy the new version. Make sure the environment variable with the JioBase proxy URL is set in your hosting provider's settings as well.

2

Test on a Jio or Airtel network

Open your app on a device connected to Jio 4G/5G, JioFiber, or Airtel. If you do not have access to these networks, ask a friend or team member in India to test. You can also use tools like BrowserStack for remote device testing on Indian networks.

3

Check the Network tab in DevTools

Open your browser's Developer Tools and go to the Network tab. All Supabase-related requests should now go to your JioBase domain (e.g., myapp.jiobase.com) instead of *.supabase.co. Verify that requests return 200 status codes.

4

Confirm all Supabase features work

Test database queries, authentication (sign up, sign in, OAuth), file uploads/downloads, and real-time subscriptions if your app uses them. The proxy handles all Supabase features transparently. Everything should work exactly as before - the only difference is the domain in the URL.

How The Proxy Works

Understanding the proxy architecture helps explain why this fix is reliable and why it adds negligible latency.

Flutter App

Device

HTTPS

JioBase Proxy

Cloudflare Edge

HTTPS

Supabase

*.supabase.co

1. DNS resolves normally. Your Flutter app connects to myapp.jiobase.com. Since this domain is not on the ISP's block list, DNS returns the correct Cloudflare edge IP.

2. Request hits Cloudflare's edge. The request arrives at the nearest Cloudflare data center (there are 300+ worldwide, including multiple in India). The JioBase Cloudflare Worker receives the request.

3. Proxy forwards to Supabase. The Worker forwards the request - including all headers, body, and query parameters - to your actual Supabase project at *.supabase.co. Server-to-server traffic is not affected by ISP blocks.

4. Response flows back. Supabase responds to the Worker, which relays the response back to your Flutter app. The entire round-trip adds only 1-5ms of latency compared to a direct connection.

What JioBase proxies

  • REST API (PostgREST) - database queries, inserts, updates, deletes
  • Auth - sign up, sign in, OAuth, password reset, session refresh
  • Storage - file uploads, downloads, signed URLs, image transformations
  • Realtime - WebSocket subscriptions, presence, broadcast channels
  • Edge Functions - custom serverless functions on Supabase

Why Changing DNS Is Not Enough

The first instinct when encountering a DNS block is to switch to a public DNS resolver like Cloudflare's 1.1.1.1 or Google's 8.8.8.8. While this can work for your own development machine, it does not solve the problem for your users.

  • Your users cannot change their DNS. You cannot ask 500 million Jio users to reconfigure their DNS settings. Most do not know how, and on mobile data it often requires root access.
  • Some ISPs use Deep Packet Inspection (DPI). Even with correct DNS, the ISP can inspect the TLS handshake's SNI field, see you are connecting to *.supabase.co, and block the connection.
  • ISPs may intercept public DNS. Some ISPs block or redirect DNS requests to 1.1.1.1 and 8.8.8.8, forcing traffic back through their own poisoned resolvers.
  • VPNs add friction and latency. Requiring a VPN means extra cost, 50-200ms added latency, and user friction. Most users will leave your app rather than install a VPN.

A reverse proxy is the only production-grade solution. It is transparent to your users, adds minimal latency (1-5ms via Cloudflare's edge), and works on every ISP without any client-side configuration.

Frequently Asked Questions

Do I need to publish a new app version to the Play Store?

If the Supabase URL is hardcoded in your Dart code, yes - you need to publish an update. Consider using a remote config or environment variable approach for future flexibility, so you can change the URL without an app update.

Does the supabase_flutter package work with a proxy URL?

Yes. The supabase_flutter package does not validate the URL format. It works with any URL that responds with the Supabase API format. Simply replace the supabase.co URL with your JioBase proxy URL.

Will Supabase Realtime work in my Flutter app through the proxy?

Yes. JioBase proxies WebSocket connections. The supabase_flutter package handles the WebSocket upgrade automatically, and the proxy transparently forwards it. Realtime subscriptions, presence, and broadcast all work.

Does JioBase store or log my data?

No. JioBase is a pass-through proxy. It forwards your requests to Supabase and relays the responses back without storing, logging, or inspecting the request or response bodies. Only basic request metadata (timestamp, path, status code) is logged for analytics.

What happens if the ISP block is lifted?

You can switch back to the direct Supabase URL at any time. Just update your environment variable back to the original *.supabase.co URL and redeploy. However, keeping the proxy provides insurance against future blocks - ISP blocking orders in India have historically been unpredictable.

Can I use my own custom domain instead of *.jiobase.com?

Yes. JioBase supports custom domains. You can point a subdomain like api.yourdomain.com to the proxy, giving your users a branded experience. Custom domains are available on paid plans.

Is there a self-hosted alternative?

Yes! Run npx create-jiobase to deploy a full-featured proxy on your own Cloudflare Workers account for free. The CLI generates a production-quality worker with WebSocket/Realtime support, CORS configuration, and service filtering — then auto-deploys it. See the self-host page for details.

Fix your Supabase app in under 60 seconds

JioBase routes your Supabase traffic through Cloudflare's edge network. No VPN, no DNS hacks, no code rewrites. One command or one line change.

npx create-jiobase — deploy your own proxy on Cloudflare Workers

Related guides