proxy_manager
0.0.3, released 4 years ago by kingtous.cn
Set or clear system proxy on Windows, Linux, and macOS from Dart code
What it does
The package exposes a ProxyManager that can configure the system proxy settings for desktop platforms. It supports HTTP, HTTPS, and SOCKS proxies and can also clean the proxy configuration.
AI-written summary of version 0.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- Configuring a corporate proxy for a desktop Flutter app
- Running integration tests that require a specific proxy
- Developing a tool that needs to switch proxies at runtime
Skip it when
- Building a mobile app that needs proxy support
- Using a proxy only for a single HTTP request
- Relying on a third‑party proxy service that handles configuration automatically
Strengths
- Cross‑platform desktop support (Windows, Linux, macOS)
- Simple imperative API
- No build_runner or code generation required
Weaknesses
- Only works on desktop platforms
- Minimal documentation and examples
- No support for mobile or web
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
```dart
import 'package:proxy_manager/proxy_manager.dart';
final manager = ProxyManager();
await manager.setAsSystemProxy(ProxyTypes.http, "127.0.0.1", 1087);
await manager.setAsSystemProxy(ProxyTypes.https, "127.0.0.1", 1087);
await manager.setAsSystemProxy(ProxyTypes.socks, "127.0.0.1", 1080);
```Alternatives
Packages that do the same job and could replace proxy_manager.
- dbus
Native Dart D-Bus client for Linux and Windows.
91Compare - native_flutter_proxy
Read and set system network proxy info from native on Android and iOS.
54Compare - system_proxy
A Flutter plugin to retrieve system proxy settings for Dart HttpClient.
48Compare - http_proxy_override
Gets system proxy settings to configure HttpOverrides for Flutter apps.
38Compare
Works with
Packages commonly used together with proxy_manager: ones it builds on, ones built on it, and its own family.