new: add seperated VPN service mode
This commit is contained in:
@@ -159,11 +159,11 @@ class ConnectionRepositoryImpl
|
||||
await $(
|
||||
TaskEither(() async {
|
||||
if (options.enableTun) {
|
||||
// final hasPrivilege = await platformSource.checkPrivilege();
|
||||
// if (!hasPrivilege) {
|
||||
// loggy.warning("missing privileges for tun mode");
|
||||
// return left(const MissingPrivilege());
|
||||
// }
|
||||
final hasPrivilege = await platformSource.checkPrivilege();
|
||||
if (!hasPrivilege) {
|
||||
loggy.warning("missing privileges for tun mode");
|
||||
return left(const MissingPrivilege());
|
||||
}
|
||||
}
|
||||
return right(unit);
|
||||
}),
|
||||
@@ -192,11 +192,11 @@ class ConnectionRepositoryImpl
|
||||
await $(
|
||||
TaskEither(() async {
|
||||
if (options.enableTun) {
|
||||
// final hasPrivilege = await platformSource.checkPrivilege();
|
||||
// if (!hasPrivilege) {
|
||||
// loggy.warning("missing privileges for tun mode");
|
||||
// return left(const MissingPrivilege());
|
||||
// }
|
||||
final hasPrivilege = await platformSource.checkPrivilege();
|
||||
if (!hasPrivilege) {
|
||||
loggy.warning("missing privileges for tun mode");
|
||||
return left(const MissingPrivilege());
|
||||
}
|
||||
}
|
||||
return right(unit);
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user