Skip to content
pubscout

http_proxy_override

1.0.1, released 2 years ago by an unverified publisher

Gets system proxy settings to configure HttpOverrides for Flutter apps.

$ flutter pub add http_proxy_override
Source repository

What it does

The plugin reads the device's proxy configuration and creates an HttpOverrides object. You assign it to HttpOverrides.global so that the standard http package routes requests through the system proxy. It works on Android and iOS.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to route http package traffic through a debugging proxy like Charles or Fiddler
  • You want automatic use of the device's proxy settings without hard‑coding them

Skip it when

  • Your app does not use the http package (e.g., uses dio or graphql clients)
  • You target platforms without system proxy support (web, desktop)

Strengths

  • Very small and easy to add
  • No extra native code or build steps
  • Works automatically with the built‑in http client

Weaknesses

  • Only supports the http package; other clients need manual proxy config
  • Limited to Android and iOS platforms
  • No runtime API to change proxy after creation

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

Call HttpProxyOverride.createHttpProxy() and assign the result to HttpOverrides.global before runApp()

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  HttpProxyOverride httpProxyOverride = await HttpProxyOverride.createHttpProxy();
  HttpOverrides.global = httpProxyOverride;
  runApp(MyApp());
}

Alternatives

Packages that do the same job and could replace http_proxy_override.

  • dio

    Dio lets you set a proxy directly in its Options, avoiding the need for a separate plugin