desktop_proxy 1.0.1 copy "desktop_proxy: ^1.0.1" to clipboard
desktop_proxy: ^1.0.1 copied to clipboard

Resolves the system proxy for a given URL on Windows and macOS.

desktop_proxy #

A Flutter plugin that resolves the system proxy configuration for a given URL on Windows and MacOS.

Features #

  • Single API: getProxyForUrl(Uri) returns the proxy to use, or null for a direct connection (DIRECT).
  • Federated plugin structure with native entry points for Windows (C++) and
    macOS (Swift).

Supported platforms #

Platform Status
Windows
macOS

Installation # #

Add desktop_proxy to your pubspec.yaml:

dependencies:
  desktop_proxy: ^latest_version

Usage #

import 'package:desktop_proxy/desktop_proxy.dart';

final desktopProxy = DesktopProxy();

final Uri? proxy = await desktopProxy.getProxyForUrl(
  Uri.parse('https://example.com'),
);

if (proxy == null) {
  // No proxy configured - connect directly (DIRECT).
} else {
  // Route the request through `proxy`, e.g. http://proxy.corp:8080
}

API #

Future<Uri?> getProxyForUrl(Uri url);

Returns the proxy Uri for url, or null when the connection should be made directly.

2
likes
160
points
230
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Resolves the system proxy for a given URL on Windows and macOS.

Repository (GitLab)

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on desktop_proxy

Packages that implement desktop_proxy