mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 06:33:43 +08:00
dns fix
This commit is contained in:
parent
dae1e8f039
commit
04e19a7311
@ -17,7 +17,7 @@ import 'package:uuid/uuid.dart';
|
|||||||
import 'package:window_manager/window_manager.dart';
|
import 'package:window_manager/window_manager.dart';
|
||||||
|
|
||||||
class AppConf {
|
class AppConf {
|
||||||
static const String appVersion = "2.10.4 Beta";
|
static const String appVersion = "2.10.5 Beta";
|
||||||
static const int appVersionCode = 39;
|
static const int appVersionCode = 39;
|
||||||
static const String appVersionDate = "2024-02-03";
|
static const String appVersionDate = "2024-02-03";
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ part of 'downloader.dart';
|
|||||||
T _$identity<T>(T value) => value;
|
T _$identity<T>(T value) => value;
|
||||||
|
|
||||||
final _privateConstructorUsedError = UnsupportedError(
|
final _privateConstructorUsedError = UnsupportedError(
|
||||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$MyDownloaderStatus {
|
mixin _$MyDownloaderStatus {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
|
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
|
|||||||
kDefaultExternalLibraryLoaderConfig;
|
kDefaultExternalLibraryLoaderConfig;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get codegenVersion => '2.0.0-dev.23';
|
String get codegenVersion => '2.0.0-dev.24';
|
||||||
|
|
||||||
static const kDefaultExternalLibraryLoaderConfig =
|
static const kDefaultExternalLibraryLoaderConfig =
|
||||||
ExternalLibraryLoaderConfig(
|
ExternalLibraryLoaderConfig(
|
||||||
@ -173,7 +173,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
},
|
},
|
||||||
codec: SseCodec(
|
codec: SseCodec(
|
||||||
decodeSuccessData: sse_decode_list_String,
|
decodeSuccessData: sse_decode_list_String,
|
||||||
decodeErrorData: null,
|
decodeErrorData: sse_decode_AnyhowException,
|
||||||
),
|
),
|
||||||
constMeta: kDnsLookupTxtConstMeta,
|
constMeta: kDnsLookupTxtConstMeta,
|
||||||
argValues: [host],
|
argValues: [host],
|
||||||
@ -206,7 +206,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
},
|
},
|
||||||
codec: SseCodec(
|
codec: SseCodec(
|
||||||
decodeSuccessData: sse_decode_rust_http_response,
|
decodeSuccessData: sse_decode_rust_http_response,
|
||||||
decodeErrorData: null,
|
decodeErrorData: sse_decode_AnyhowException,
|
||||||
),
|
),
|
||||||
constMeta: kFetchConstMeta,
|
constMeta: kFetchConstMeta,
|
||||||
argValues: [method, url, headers, inputData],
|
argValues: [method, url, headers, inputData],
|
||||||
@ -254,6 +254,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
get rust_arc_decrement_strong_count_ReqwestVersion => wire
|
get rust_arc_decrement_strong_count_ReqwestVersion => wire
|
||||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion;
|
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion;
|
||||||
|
|
||||||
|
@protected
|
||||||
|
AnyhowException dco_decode_AnyhowException(dynamic raw) {
|
||||||
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||||
|
return AnyhowException(raw as String);
|
||||||
|
}
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
ReqwestVersion
|
ReqwestVersion
|
||||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
@ -333,9 +339,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||||
switch (raw[0]) {
|
switch (raw[0]) {
|
||||||
case 0:
|
case 0:
|
||||||
return MyDownloaderStatus_NoStart();
|
return const MyDownloaderStatus_NoStart();
|
||||||
case 1:
|
case 1:
|
||||||
return MyDownloaderStatus_Running();
|
return const MyDownloaderStatus_Running();
|
||||||
case 2:
|
case 2:
|
||||||
return MyDownloaderStatus_Pending(
|
return MyDownloaderStatus_Pending(
|
||||||
dco_decode_my_network_item_pending_type(raw[1]),
|
dco_decode_my_network_item_pending_type(raw[1]),
|
||||||
@ -345,7 +351,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
dco_decode_String(raw[1]),
|
dco_decode_String(raw[1]),
|
||||||
);
|
);
|
||||||
case 4:
|
case 4:
|
||||||
return MyDownloaderStatus_Finished();
|
return const MyDownloaderStatus_Finished();
|
||||||
default:
|
default:
|
||||||
throw Exception("unreachable");
|
throw Exception("unreachable");
|
||||||
}
|
}
|
||||||
@ -444,6 +450,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
return dcoDecodeI64OrU64(raw);
|
return dcoDecodeI64OrU64(raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@protected
|
||||||
|
AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) {
|
||||||
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||||
|
var inner = sse_decode_String(deserializer);
|
||||||
|
return AnyhowException(inner);
|
||||||
|
}
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
ReqwestVersion
|
ReqwestVersion
|
||||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
@ -546,9 +559,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
var tag_ = sse_decode_i_32(deserializer);
|
var tag_ = sse_decode_i_32(deserializer);
|
||||||
switch (tag_) {
|
switch (tag_) {
|
||||||
case 0:
|
case 0:
|
||||||
return MyDownloaderStatus_NoStart();
|
return const MyDownloaderStatus_NoStart();
|
||||||
case 1:
|
case 1:
|
||||||
return MyDownloaderStatus_Running();
|
return const MyDownloaderStatus_Running();
|
||||||
case 2:
|
case 2:
|
||||||
var var_field0 = sse_decode_my_network_item_pending_type(deserializer);
|
var var_field0 = sse_decode_my_network_item_pending_type(deserializer);
|
||||||
return MyDownloaderStatus_Pending(var_field0);
|
return MyDownloaderStatus_Pending(var_field0);
|
||||||
@ -556,7 +569,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
var var_field0 = sse_decode_String(deserializer);
|
var var_field0 = sse_decode_String(deserializer);
|
||||||
return MyDownloaderStatus_Error(var_field0);
|
return MyDownloaderStatus_Error(var_field0);
|
||||||
case 4:
|
case 4:
|
||||||
return MyDownloaderStatus_Finished();
|
return const MyDownloaderStatus_Finished();
|
||||||
default:
|
default:
|
||||||
throw UnimplementedError('');
|
throw UnimplementedError('');
|
||||||
}
|
}
|
||||||
@ -677,6 +690,13 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
|||||||
return deserializer.buffer.getUint8() != 0;
|
return deserializer.buffer.getUint8() != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_AnyhowException(
|
||||||
|
AnyhowException self, SseSerializer serializer) {
|
||||||
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||||
|
throw UnimplementedError('Unreachable ((');
|
||||||
|
}
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void
|
void
|
||||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
|
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
|
||||||
|
|
||||||
@ -25,6 +25,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
|||||||
get rust_arc_decrement_strong_count_ReqwestVersionPtr => wire
|
get rust_arc_decrement_strong_count_ReqwestVersionPtr => wire
|
||||||
._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersionPtr;
|
._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersionPtr;
|
||||||
|
|
||||||
|
@protected
|
||||||
|
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
ReqwestVersion
|
ReqwestVersion
|
||||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
@ -98,6 +101,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
|||||||
@protected
|
@protected
|
||||||
int dco_decode_usize(dynamic raw);
|
int dco_decode_usize(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
ReqwestVersion
|
ReqwestVersion
|
||||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
@ -181,6 +187,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
|||||||
@protected
|
@protected
|
||||||
bool sse_decode_bool(SseDeserializer deserializer);
|
bool sse_decode_bool(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_AnyhowException(
|
||||||
|
AnyhowException self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void
|
void
|
||||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
|
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
|
||||||
|
|
||||||
@ -24,6 +24,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
|||||||
get rust_arc_decrement_strong_count_ReqwestVersionPtr => wire
|
get rust_arc_decrement_strong_count_ReqwestVersionPtr => wire
|
||||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion;
|
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion;
|
||||||
|
|
||||||
|
@protected
|
||||||
|
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
ReqwestVersion
|
ReqwestVersion
|
||||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
@ -97,6 +100,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
|||||||
@protected
|
@protected
|
||||||
int dco_decode_usize(dynamic raw);
|
int dco_decode_usize(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
ReqwestVersion
|
ReqwestVersion
|
||||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
@ -180,6 +186,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
|||||||
@protected
|
@protected
|
||||||
bool sse_decode_bool(SseDeserializer deserializer);
|
bool sse_decode_bool(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_AnyhowException(
|
||||||
|
AnyhowException self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void
|
void
|
||||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockreqwestVersion(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
@ -17,7 +17,11 @@ class SplashUIModel extends BaseUIModel {
|
|||||||
|
|
||||||
Future<void> _initApp() async {
|
Future<void> _initApp() async {
|
||||||
AnalyticsApi.touch("launch");
|
AnalyticsApi.touch("launch");
|
||||||
await URLConf.checkHost();
|
try {
|
||||||
|
await URLConf.checkHost();
|
||||||
|
} catch (e) {
|
||||||
|
dPrint("checkHost Error:$e");
|
||||||
|
}
|
||||||
step = 1;
|
step = 1;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
await AppConf.checkUpdate();
|
await AppConf.checkUpdate();
|
||||||
|
@ -32,7 +32,7 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_riverpod: ^2.3.6
|
flutter_riverpod: ^2.3.6
|
||||||
window_manager: ^0.3.2
|
window_manager: ^0.3.2
|
||||||
fluent_ui: ^4.8.5
|
fluent_ui: 4.8.5
|
||||||
flutter_staggered_grid_view: ^0.7.0
|
flutter_staggered_grid_view: ^0.7.0
|
||||||
flutter_acrylic: ^1.1.0
|
flutter_acrylic: ^1.1.0
|
||||||
url_launcher: ^6.1.10
|
url_launcher: ^6.1.10
|
||||||
@ -55,7 +55,7 @@ dependencies:
|
|||||||
flutter_tilt: ^2.0.10
|
flutter_tilt: ^2.0.10
|
||||||
card_swiper: ^3.0.1
|
card_swiper: ^3.0.1
|
||||||
ffi: ^2.1.0
|
ffi: ^2.1.0
|
||||||
flutter_rust_bridge: 2.0.0-dev.23
|
flutter_rust_bridge: 2.0.0-dev.24
|
||||||
freezed_annotation: ^2.4.1
|
freezed_annotation: ^2.4.1
|
||||||
meta: ^1.9.1
|
meta: ^1.9.1
|
||||||
win32: ^5.0.9
|
win32: ^5.0.9
|
||||||
|
@ -37,10 +37,10 @@ pub fn set_default_header(headers: HashMap<String, String>) {
|
|||||||
pub async fn fetch(method: MyMethod,
|
pub async fn fetch(method: MyMethod,
|
||||||
url: String,
|
url: String,
|
||||||
headers: Option<HashMap<String, String>>,
|
headers: Option<HashMap<String, String>>,
|
||||||
input_data: Option<Vec<u8>>) -> RustHttpResponse {
|
input_data: Option<Vec<u8>>) -> anyhow::Result<RustHttpResponse> {
|
||||||
http_package::fetch(_my_method_to_hyper_method(method), url, headers, input_data).await.unwrap()
|
http_package::fetch(_my_method_to_hyper_method(method), url, headers, input_data).await
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn dns_lookup_txt(host: String) -> Vec<String> {
|
pub async fn dns_lookup_txt(host: String) -> anyhow::Result<Vec<String>> {
|
||||||
http_package::dns_lookup_txt(host).await.unwrap()
|
http_package::dns_lookup_txt(host).await
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// Section: imports
|
// Section: imports
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
#![allow(
|
#![allow(
|
||||||
non_camel_case_types,
|
non_camel_case_types,
|
||||||
@ -31,7 +31,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
|
|||||||
default_rust_opaque = RustOpaqueMoi,
|
default_rust_opaque = RustOpaqueMoi,
|
||||||
default_rust_auto_opaque = RustAutoOpaqueMoi,
|
default_rust_auto_opaque = RustAutoOpaqueMoi,
|
||||||
);
|
);
|
||||||
const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.23";
|
const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.24";
|
||||||
|
|
||||||
// Section: executor
|
// Section: executor
|
||||||
|
|
||||||
@ -120,10 +120,8 @@ fn wire_dns_lookup_txt_impl(
|
|||||||
deserializer.end();
|
deserializer.end();
|
||||||
move |context| async move {
|
move |context| async move {
|
||||||
transform_result_sse(
|
transform_result_sse(
|
||||||
(move || async move {
|
(move || async move { crate::api::http_api::dns_lookup_txt(api_host).await })()
|
||||||
Result::<_, ()>::Ok(crate::api::http_api::dns_lookup_txt(api_host).await)
|
.await,
|
||||||
})()
|
|
||||||
.await,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -160,15 +158,13 @@ fn wire_fetch_impl(
|
|||||||
move |context| async move {
|
move |context| async move {
|
||||||
transform_result_sse(
|
transform_result_sse(
|
||||||
(move || async move {
|
(move || async move {
|
||||||
Result::<_, ()>::Ok(
|
crate::api::http_api::fetch(
|
||||||
crate::api::http_api::fetch(
|
api_method,
|
||||||
api_method,
|
api_url,
|
||||||
api_url,
|
api_headers,
|
||||||
api_headers,
|
api_input_data,
|
||||||
api_input_data,
|
|
||||||
)
|
|
||||||
.await,
|
|
||||||
)
|
)
|
||||||
|
.await
|
||||||
})()
|
})()
|
||||||
.await,
|
.await,
|
||||||
)
|
)
|
||||||
@ -218,6 +214,13 @@ flutter_rust_bridge::frb_generated_moi_arc_impl_value!(
|
|||||||
|
|
||||||
// Section: dart2rust
|
// Section: dart2rust
|
||||||
|
|
||||||
|
impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error {
|
||||||
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||||
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||||
|
unreachable!("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl SseDecode for reqwest::Version {
|
impl SseDecode for reqwest::Version {
|
||||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||||
@ -673,6 +676,13 @@ impl flutter_rust_bridge::IntoIntoDart<crate::http_package::RustHttpResponse>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error {
|
||||||
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||||
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||||
|
<String>::sse_encode(format!("{:?}", self), serializer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl SseEncode for reqwest::Version {
|
impl SseEncode for reqwest::Version {
|
||||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This file is automatically generated, so please do not edit it.
|
// This file is automatically generated, so please do not edit it.
|
||||||
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.24.
|
||||||
|
|
||||||
// Section: imports
|
// Section: imports
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use hickory_resolver::config::{NameServerConfigGroup, ResolverConfig, ResolverOpts};
|
use std::io;
|
||||||
use hickory_resolver::{lookup_ip::LookupIpIntoIter, TokioAsyncResolver};
|
use hickory_resolver::{lookup_ip::LookupIpIntoIter, system_conf, TokioAsyncResolver};
|
||||||
use hyper::client::connect::dns::Name;
|
use hyper::client::connect::dns::Name;
|
||||||
use once_cell::sync::OnceCell;
|
use once_cell::sync::OnceCell;
|
||||||
use reqwest::dns::{Addrs, Resolve, Resolving};
|
use reqwest::dns::{Addrs, Resolve, Resolving};
|
||||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
|
use std::net::SocketAddr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
/// Wrapper around an `AsyncResolver`, which implements the `Resolve` trait.
|
/// Wrapper around an `AsyncResolver`, which implements the `Resolve` trait.
|
||||||
@ -52,16 +52,12 @@ impl Iterator for SocketAddrs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_resolver() -> anyhow::Result<TokioAsyncResolver> {
|
fn new_resolver() -> io::Result<TokioAsyncResolver> {
|
||||||
let ali_ips: &[IpAddr] = &[
|
let (config, opts) = system_conf::read_system_conf().map_err(|e| {
|
||||||
IpAddr::V4(Ipv4Addr::new(223, 5, 5, 5)),
|
io::Error::new(
|
||||||
IpAddr::V4(Ipv4Addr::new(223, 6, 6, 6)),
|
io::ErrorKind::Other,
|
||||||
IpAddr::V6("2400:3200::1".parse::<Ipv6Addr>()?),
|
format!("error reading DNS system conf: {}", e),
|
||||||
IpAddr::V6("2400:3200:baba::1".parse::<Ipv6Addr>()?),
|
)
|
||||||
];
|
})?;
|
||||||
|
Ok(TokioAsyncResolver::tokio(config, opts))
|
||||||
let group =
|
|
||||||
NameServerConfigGroup::from_ips_https(ali_ips, 443, "dns.alidns.com".to_string(), true);
|
|
||||||
let cfg = ResolverConfig::from_parts(None, vec![], group);
|
|
||||||
Ok(TokioAsyncResolver::tokio(cfg, ResolverOpts::default()))
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user