diff --git a/veilid-core/src/veilid_api/debug.rs b/veilid-core/src/veilid_api/debug.rs index 3dfa1b5f..4b93db45 100644 --- a/veilid-core/src/veilid_api/debug.rs +++ b/veilid-core/src/veilid_api/debug.rs @@ -1341,6 +1341,28 @@ impl VeilidAPI { } } + async fn debug_punish_list(&self, _args: Vec) -> VeilidAPIResult { + // + let network_manager = self.network_manager()?; + let address_filter = network_manager.address_filter(); + + let out = format!("Address Filter Punishments:\n{:#?}", address_filter); + return Ok(out); + } + + async fn debug_punish(&self, args: String) -> VeilidAPIResult { + let args: Vec = + shell_words::split(&args).map_err(|e| VeilidAPIError::parse_error(e, args))?; + + let command = get_debug_argument_at(&args, 0, "debug_punish", "command", get_string)?; + + if command == "list" { + self.debug_punish_list(args).await + } else { + Ok(">>> Unknown command\n".to_owned()) + } + } + pub async fn debug_help(&self, _args: String) -> VeilidAPIResult { Ok(r#"buckets [dead|reliable] dialinfo @@ -1358,6 +1380,7 @@ restart network contact [] ping relay [public|local] +punish list route allocate [ord|*ord] [rel] [] [in|out] release publish [full] @@ -1450,6 +1473,8 @@ record list self.debug_route(rest).await } else if arg == "record" { self.debug_record(rest).await + } else if arg == "punish" { + self.debug_punish(rest).await } else { Err(VeilidAPIError::generic("Unknown server debug command")) } diff --git a/veilid-flutter/pubspec.yaml b/veilid-flutter/pubspec.yaml index efe8114f..6aa84ed0 100644 --- a/veilid-flutter/pubspec.yaml +++ b/veilid-flutter/pubspec.yaml @@ -6,7 +6,8 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: sdk: '>=3.0.0 <4.0.0' - + flutter: '>=3.10.6' + dependencies: change_case: ^1.0.1 charcode: ^1.3.1