Add auto ip check option

This commit is contained in:
problematicconsumer
2024-02-17 13:11:50 +03:30
parent 71fb84bea1
commit 611dff8a5b
5 changed files with 38 additions and 2 deletions

View File

@@ -17,6 +17,9 @@ sealed class ProxyFailure with _$ProxyFailure, Failure {
@With<ExpectedFailure>()
const factory ProxyFailure.serviceNotRunning() = ServiceNotRunning;
@With<ExpectedFailure>()
const factory ProxyFailure.unknownIp() = UnknownIp;
@override
({String type, String? message}) present(TranslationsEn t) {
return switch (this) {
@@ -28,6 +31,7 @@ sealed class ProxyFailure with _$ProxyFailure, Failure {
type: t.failure.singbox.serviceNotRunning,
message: null,
),
UnknownIp() => (type: t.general.unknown, message: null),
};
}
}