带阿里标识的版本
This commit is contained in:
@@ -4,12 +4,12 @@ import 'package:dio/io.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:http/io_client.dart';
|
||||
import 'package:aliyun_httpdns/aliyun_httpdns.dart';
|
||||
import 'package:TrustAPP_httpdns/TrustAPP_httpdns.dart';
|
||||
|
||||
/* *
|
||||
* 构建带 HTTPDNS 能力的 IOHttpClientAdapter
|
||||
* 构建<EFBFBD><EFBFBD>?HTTPDNS 能力<EFBFBD><EFBFBD>?IOHttpClientAdapter
|
||||
*
|
||||
* 本方案由EMAS团队设计实现,参考请注明出处。
|
||||
* 本方案由EMAS团队设计实现,参考请注明出处<EFBFBD><EFBFBD>?
|
||||
*/
|
||||
|
||||
IOHttpClientAdapter buildHttpdnsHttpClientAdapter() {
|
||||
@@ -43,7 +43,7 @@ void _configureHttpClient(HttpClient client) {
|
||||
client.maxConnectionsPerHost = 8;
|
||||
}
|
||||
|
||||
// 配置基于 HTTPDNS 的连接工厂
|
||||
// 配置基于 HTTPDNS 的连接工<EFBFBD><EFBFBD>?
|
||||
void _configureConnectionFactory(HttpClient client) {
|
||||
client
|
||||
.connectionFactory = (Uri uri, String? proxyHost, int? proxyPort) async {
|
||||
@@ -86,10 +86,10 @@ void _configureConnectionFactory(HttpClient client) {
|
||||
};
|
||||
}
|
||||
|
||||
// 通过 HTTPDNS 解析目标 IP 列表;IPv4 优先;失败则返回空列表(上层回退系统 DNS)
|
||||
// 通过 HTTPDNS 解析目标 IP 列表;IPv4 优先;失败则返回空列表(上层回退系统 DNS<EFBFBD><EFBFBD>?
|
||||
Future<List<InternetAddress>> _resolveTargets(String domain) async {
|
||||
try {
|
||||
final res = await AliyunHttpdns.resolveHostSyncNonBlocking(
|
||||
final res = await TrustAPPHttpdns.resolveHostSyncNonBlocking(
|
||||
domain,
|
||||
ipType: 'both',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user