mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
@@ -106,9 +106,14 @@ class Request {
|
|||||||
persistentConnection: true,
|
persistentConnection: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final bool enableSystemProxy = Pref.enableSystemProxy;
|
bool enableSystemProxy = Pref.enableSystemProxy;
|
||||||
final String systemProxyHost = Pref.systemProxyHost;
|
late final String systemProxyHost;
|
||||||
final String systemProxyPort = Pref.systemProxyPort;
|
late final int? systemProxyPort;
|
||||||
|
if (enableSystemProxy) {
|
||||||
|
systemProxyHost = Pref.systemProxyHost;
|
||||||
|
systemProxyPort = int.tryParse(Pref.systemProxyPort);
|
||||||
|
enableSystemProxy = systemProxyPort != null && systemProxyHost.isNotEmpty;
|
||||||
|
}
|
||||||
|
|
||||||
final http11Adapter = IOHttpClientAdapter(
|
final http11Adapter = IOHttpClientAdapter(
|
||||||
createHttpClient: () {
|
createHttpClient: () {
|
||||||
@@ -131,7 +136,7 @@ class Request {
|
|||||||
proxy = Uri(
|
proxy = Uri(
|
||||||
scheme: 'http',
|
scheme: 'http',
|
||||||
host: systemProxyHost,
|
host: systemProxyHost,
|
||||||
port: int.parse(systemProxyPort),
|
port: systemProxyPort,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user