mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
feat(http): add option to skip SSL certificate verification (#801)
This commit is contained in:
1 parent
3384f5197a
commit
2523282a89
19 files changed
+48
-1
No files matched your search
@@ -43,6 +43,8 @@ class CreateView extends GetView<CreateController> {
|
||||
|
||||
final _availableSchemes = ["http:", "https:", "magnet:"];
|
||||
|
||||
final _skipVerifyCertController = false.obs;
|
||||
|
||||
CreateView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -454,6 +456,22 @@ class CreateView extends GetView<CreateController> {
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Referer',
|
||||
)),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 10),
|
||||
child: CompactCheckbox(
|
||||
label: 'skipVerifyCert'.tr,
|
||||
value:
|
||||
_skipVerifyCertController.value,
|
||||
onChanged: (bool? value) {
|
||||
_skipVerifyCertController.value =
|
||||
value ?? false;
|
||||
},
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
@@ -578,7 +596,11 @@ class CreateView extends GetView<CreateController> {
|
||||
await Future.wait(urls.map((url) {
|
||||
return createTask(CreateTask(
|
||||
req: Request(
|
||||
url: url, extra: parseReqExtra(url), proxy: parseProxy()),
|
||||
url: url,
|
||||
extra: parseReqExtra(url),
|
||||
proxy: parseProxy(),
|
||||
skipVerifyCert: _skipVerifyCertController.value,
|
||||
),
|
||||
opt: Options(
|
||||
name: isMultiLine ? "" : _renameController.text,
|
||||
path: _pathController.text,
|
||||
@@ -592,6 +614,7 @@ class CreateView extends GetView<CreateController> {
|
||||
url: submitUrl,
|
||||
extra: parseReqExtra(_urlController.text),
|
||||
proxy: parseProxy(),
|
||||
skipVerifyCert: _skipVerifyCertController.value,
|
||||
));
|
||||
await _showResolveDialog(rr);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user