mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-17 04:08:29 +02:00
feat: Implement a web-based IPTV player with HLS/MPEG-TS support and Flutter communication.
This commit is contained in:
1 parent
2ca92d8425
commit
55acbbc135
28 files changed
+2075
-1448
No files matched your search
@@ -23,12 +23,10 @@ class DnsResolver {
|
||||
);
|
||||
|
||||
// Fallback to Cloudflare via IP (1.1.1.1)
|
||||
if (ip == null) {
|
||||
ip = await _queryDoH(
|
||||
'https://1.1.1.1/dns-query?name=$hostname&type=A',
|
||||
headers: {'accept': 'application/dns-json'},
|
||||
);
|
||||
}
|
||||
ip ??= await _queryDoH(
|
||||
'https://1.1.1.1/dns-query?name=$hostname&type=A',
|
||||
headers: {'accept': 'application/dns-json'},
|
||||
);
|
||||
|
||||
if (ip != null) {
|
||||
print('DnsResolver: Resolved $hostname -> $ip');
|
||||
@@ -40,7 +38,8 @@ class DnsResolver {
|
||||
return ip;
|
||||
}
|
||||
|
||||
static Future<String?> _queryDoH(String url, {Map<String, String>? headers}) async {
|
||||
static Future<String?> _queryDoH(String url,
|
||||
{Map<String, String>? headers}) async {
|
||||
try {
|
||||
final client = HttpClient()
|
||||
..connectionTimeout = const Duration(seconds: 10)
|
||||
|
||||
Reference in new issue
Block a user