adapt to current matrix-dart-sdk changes
use proxy by default (gonna remove later)
This commit is contained in:
parent
55487a90c3
commit
08cf4913eb
|
|
@ -105,7 +105,7 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
|
|
||||||
late Client sendingClient;
|
late Client sendingClient;
|
||||||
|
|
||||||
Timeline? timeline;
|
RoomTimeline? timeline;
|
||||||
|
|
||||||
late final String readMarkerEventId;
|
late final String readMarkerEventId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ abstract class ClientManager {
|
||||||
return Client(
|
return Client(
|
||||||
clientName,
|
clientName,
|
||||||
httpClient:
|
httpClient:
|
||||||
PlatformInfos.isAndroid ? CustomHttpClient.createHTTPClient() : null,
|
CustomHttpClient.createHTTPClient(),
|
||||||
verificationMethods: {
|
verificationMethods: {
|
||||||
KeyVerificationMethod.numbers,
|
KeyVerificationMethod.numbers,
|
||||||
if (kIsWeb || PlatformInfos.isMobile || PlatformInfos.isLinux)
|
if (kIsWeb || PlatformInfos.isMobile || PlatformInfos.isLinux)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:extera_next/utils/platform_infos.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:http/io_client.dart';
|
import 'package:http/io_client.dart';
|
||||||
|
|
||||||
|
|
@ -10,6 +11,7 @@ class CustomHttpClient {
|
||||||
static HttpClient customHttpClient(String? cert) {
|
static HttpClient customHttpClient(String? cert) {
|
||||||
final context = SecurityContext.defaultContext;
|
final context = SecurityContext.defaultContext;
|
||||||
|
|
||||||
|
if (PlatformInfos.isAndroid) {
|
||||||
try {
|
try {
|
||||||
if (cert != null) {
|
if (cert != null) {
|
||||||
final bytes = utf8.encode(cert);
|
final bytes = utf8.encode(cert);
|
||||||
|
|
@ -22,8 +24,16 @@ class CustomHttpClient {
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return HttpClient(context: context);
|
// Use Nekoray mixed proxy
|
||||||
|
// Made it for myself, remove later
|
||||||
|
final httpClient = HttpClient(context: context);
|
||||||
|
httpClient.findProxy = (uri) {
|
||||||
|
return 'PROXY localhost:2080;';
|
||||||
|
};
|
||||||
|
|
||||||
|
return httpClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
static http.Client createHTTPClient() => IOClient(customHttpClient(ISRG_X1));
|
static http.Client createHTTPClient() => IOClient(customHttpClient(ISRG_X1));
|
||||||
|
|
|
||||||
10
pubspec.lock
10
pubspec.lock
|
|
@ -1201,12 +1201,10 @@ packages:
|
||||||
matrix:
|
matrix:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "/home/officialdakari/repos/matrix-dart-sdk"
|
||||||
ref: main
|
relative: false
|
||||||
resolved-ref: "58c4cf19d010d9ae193e9df10bd1f8fdf02277b0"
|
source: path
|
||||||
url: "https://git.extera.xyz/OfficialDakari/matrix-dart-sdk.git"
|
version: "3.0.1"
|
||||||
source: git
|
|
||||||
version: "2.0.1"
|
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,10 @@ dependencies:
|
||||||
linkify: ^5.0.0
|
linkify: ^5.0.0
|
||||||
material: ^1.0.0+2
|
material: ^1.0.0+2
|
||||||
matrix:
|
matrix:
|
||||||
git:
|
path: /home/officialdakari/repos/matrix-dart-sdk
|
||||||
url: https://git.extera.xyz/OfficialDakari/matrix-dart-sdk.git
|
# git:
|
||||||
ref: main
|
# url: https://git.extera.xyz/OfficialDakari/matrix-dart-sdk.git
|
||||||
|
# ref: feature/threads
|
||||||
mime: ^1.0.6
|
mime: ^1.0.6
|
||||||
native_imaging: ^0.2.0
|
native_imaging: ^0.2.0
|
||||||
opus_caf_converter_dart: ^1.0.1
|
opus_caf_converter_dart: ^1.0.1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue