add WebDAV

add Auto check updates

Optimize more details
This commit is contained in:
chen08209
2024-05-20 15:15:09 +08:00
parent c4b470ffaf
commit 91d30c0f0e
65 changed files with 2866 additions and 1565 deletions

View File

@@ -1,18 +1,13 @@
// ignore_for_file: avoid_print
import 'package:http/io_client.dart';
import 'dart:io';
main() async {
final result = await Process.run(
'netstat',
["-ano","|","findstr",":7890","|","findstr","LISTENING"],
runInShell: true,
);
final output = result.stdout as String;
final line = output.split('\n').first;
final pid = line.split(' ').firstWhere(
(value) => value.trim().contains(RegExp(r'^\d+$')),
orElse: () => '',
);
print(pid);
void main() async {
HttpClient httpClient = HttpClient();
httpClient.findProxy = HttpClient.findProxyFromEnvironment;
IOClient ioClient = IOClient(httpClient);
var response = await ioClient.get(Uri.parse('https://mirror.ghproxy.com/https://raw.githubusercontent.com/Ruk1ng001/freeSub/main/clash_top30.yaml'));
print(response.body);
}