mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-16 05:13:41 +00:00
feat: support proxy (#284)
This commit is contained in:
45 files changed
+1017
-1124
No files matched your search
@@ -16,7 +16,7 @@ import 'package:window_manager/window_manager.dart';
|
||||
import '../../../../api/api.dart';
|
||||
import '../../../../api/model/downloader_config.dart';
|
||||
import '../../../../core/common/start_config.dart';
|
||||
import '../../../../generated/locales.g.dart';
|
||||
import '../../../../i18n/message.dart';
|
||||
import '../../../../util/locale_manager.dart';
|
||||
import '../../../../util/log_util.dart';
|
||||
import '../../../../util/package_info.dart';
|
||||
@@ -185,9 +185,7 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
||||
MenuItem(
|
||||
label: 'donate'.tr,
|
||||
onClick: (menuItem) => {
|
||||
launchUrl(
|
||||
Uri.parse(
|
||||
"https://github.com/GopeedLab/gopeed/blob/main/.donate/index.md#donate"),
|
||||
launchUrl(Uri.parse("https://docs.gopeed.com/donate.html"),
|
||||
mode: LaunchMode.externalApplication)
|
||||
},
|
||||
),
|
||||
@@ -376,7 +374,7 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
||||
}
|
||||
if (extra.locale.isEmpty) {
|
||||
final systemLocale = getLocaleKey(PlatformDispatcher.instance.locale);
|
||||
extra.locale = AppTranslation.translations.containsKey(systemLocale)
|
||||
extra.locale = messages.keys.containsKey(systemLocale)
|
||||
? systemLocale
|
||||
: getLocaleKey(fallbackLocale);
|
||||
}
|
||||
@@ -384,6 +382,10 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
||||
// default select all tracker subscribe urls
|
||||
extra.bt.trackerSubscribeUrls.addAll(allTrackerSubscribeUrls);
|
||||
}
|
||||
final proxy = config.proxy;
|
||||
if (proxy.scheme.isEmpty) {
|
||||
proxy.scheme = 'http';
|
||||
}
|
||||
|
||||
if (config.downloadDir.isEmpty) {
|
||||
if (Util.isDesktop()) {
|
||||
|
||||
Reference in new issue
Block a user