mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
remove unused pkg
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:system_proxy/system_proxy.dart';
|
|
||||||
|
|
||||||
class CustomProxy {
|
|
||||||
Future<void> init() async {
|
|
||||||
Map<String, String>? proxy = await SystemProxy.getProxySettings();
|
|
||||||
if (proxy != null) {
|
|
||||||
HttpOverrides.global = ProxiedHttpOverrides(
|
|
||||||
proxy['host']!,
|
|
||||||
proxy['port']!,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ProxiedHttpOverrides extends HttpOverrides {
|
|
||||||
final String _port;
|
|
||||||
final String _host;
|
|
||||||
|
|
||||||
ProxiedHttpOverrides(this._host, this._port);
|
|
||||||
|
|
||||||
@override
|
|
||||||
HttpClient createHttpClient(SecurityContext? context) {
|
|
||||||
return super.createHttpClient(context)
|
|
||||||
// set proxy
|
|
||||||
..findProxy = (uri) {
|
|
||||||
return "PROXY $_host:$_port;";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1808,14 +1808,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.4.0"
|
version: "3.4.0"
|
||||||
system_proxy:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: system_proxy
|
|
||||||
sha256: bbdfc9736a963409941fb0e7c494606c1f13c2be34de15833ee385da83cf7ab0
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.0"
|
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ dependencies:
|
|||||||
# 状态栏图标控制
|
# 状态栏图标控制
|
||||||
# status_bar_control: ^3.2.1
|
# status_bar_control: ^3.2.1
|
||||||
# 代理
|
# 代理
|
||||||
system_proxy: ^0.1.0
|
# system_proxy: ^0.1.0
|
||||||
# pip
|
# pip
|
||||||
# floating: ^3.0.0
|
# floating: ^3.0.0
|
||||||
floating:
|
floating:
|
||||||
|
|||||||
Reference in New Issue
Block a user