Add core debug flag
This commit is contained in:
@@ -66,18 +66,26 @@ class FFISingboxService
|
||||
String baseDir,
|
||||
String workingDir,
|
||||
String tempDir,
|
||||
bool debug,
|
||||
) {
|
||||
final port = _connectionStatusReceiver.sendPort.nativePort;
|
||||
return TaskEither(
|
||||
() => CombineWorker().execute(
|
||||
() {
|
||||
_box.setupOnce(NativeApi.initializeApiDLData);
|
||||
_box.setup(
|
||||
baseDir.toNativeUtf8().cast(),
|
||||
workingDir.toNativeUtf8().cast(),
|
||||
tempDir.toNativeUtf8().cast(),
|
||||
port,
|
||||
);
|
||||
final err = _box
|
||||
.setup(
|
||||
baseDir.toNativeUtf8().cast(),
|
||||
workingDir.toNativeUtf8().cast(),
|
||||
tempDir.toNativeUtf8().cast(),
|
||||
port,
|
||||
debug ? 1 : 0,
|
||||
)
|
||||
.cast<Utf8>()
|
||||
.toDartString();
|
||||
if (err.isNotEmpty) {
|
||||
return left(err);
|
||||
}
|
||||
return right(unit);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -38,6 +38,7 @@ class MobileSingboxService
|
||||
String baseDir,
|
||||
String workingDir,
|
||||
String tempDir,
|
||||
bool debug,
|
||||
) =>
|
||||
TaskEither.of(unit);
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ abstract interface class SingboxService {
|
||||
String baseDir,
|
||||
String workingDir,
|
||||
String tempDir,
|
||||
bool debug,
|
||||
);
|
||||
|
||||
TaskEither<String, Unit> parseConfig(
|
||||
|
||||
Reference in New Issue
Block a user