url test is only valid for group not a single proxy

This commit is contained in:
Hiddify
2024-02-22 10:05:42 +01:00
parent 62c5e55317
commit dea12afc86

View File

@@ -112,7 +112,12 @@ class ProxyRepositoryImpl
}
@override
TaskEither<ProxyFailure, Unit> urlTest(String groupTag) {
TaskEither<ProxyFailure, Unit> urlTest(String groupTag_) {
var groupTag = groupTag_;
if (!["auto", "select"].contains(groupTag)) {
loggy.warning("only proxy group can do url test");
groupTag = "select";
}
return exceptionHandler(
() => singbox.urlTest(groupTag).mapLeft(ProxyUnexpectedFailure.new).run(),
ProxyUnexpectedFailure.new,