Skip to content

Commit 062cd1e

Browse files
committed
remove flutter_system_proxy
1 parent 8db767c commit 062cd1e

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

lib/services/connection/api_manager/binary_api.dart

+1-14
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'dart:developer' as dev;
44
import 'dart:io';
55

66
import 'package:flutter/foundation.dart';
7-
import 'package:flutter_system_proxy/flutter_system_proxy.dart';
87
import 'package:web_socket_channel/io.dart';
98

109
import 'package:flutter_deriv_api/api/models/enums.dart';
@@ -81,30 +80,18 @@ class BinaryAPI extends BaseAPI {
8180

8281
_logDebugInfo('connecting to $uri.');
8382

84-
8583
if (!kIsWeb) {
8684
await _setUserAgent();
8785
}
8886

89-
HttpClient? client;
90-
91-
if (proxyAwareConnection) {
92-
final String proxy = await FlutterSystemProxy.findProxyFromEnvironment(
93-
uri.toString().replaceAll('wss', 'https'));
94-
95-
client = HttpClient()
96-
..userAgent = WebSocket.userAgent
97-
..findProxy = (Uri uri) => proxy;
98-
}
99-
10087
// Initialize connection to websocket server.
10188
if (kIsWeb) {
10289
_webSocketChannel = WebSocketChannel.connect(uri);
10390
} else {
10491
_webSocketChannel = IOWebSocketChannel.connect(
10592
'$uri',
10693
pingInterval: _websocketConnectTimeOut,
107-
customClient: client);
94+
);
10895
}
10996

11097
_webSocketListener = _webSocketChannel?.stream

pubspec.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ dependencies:
2929
recase: ^4.0.0
3030
rxdart: ^0.27.7
3131
device_info_plus: ^8.1.0
32-
flutter_system_proxy:
33-
git:
34-
url: [email protected]:BrowserStackCE/flutter_system_proxy.git
35-
ref: main
3632
package_info_plus: ^4.2.0
3733
connectivity_plus: ^5.0.2
3834

0 commit comments

Comments
 (0)