Draft incorporating firewall - audit only mode #1

Closed
yume wants to merge 6 commits from nyuukyou into master
3 changed files with 8 additions and 5 deletions
Showing only changes of commit b6daeb8dc9 - Show all commits

1
yume-mods/nyuukyou/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
target/

View file

@ -410,7 +410,7 @@ checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
name = "fedivet"
version = "0.1.0"
source = "git+https://forge.yumechi.jp/yume/fedivet?tag=testing-audit#c67e647b113cfbcfa221f20481b33fd12de8cc99"
source = "git+https://forge.yumechi.jp/yume/fedivet?tag=testing-audit#92abe7b368ab4e2a619e3f4bb838c8778734a545"
dependencies = [
"async-trait",
"axum",

View file

@ -29,7 +29,9 @@ async fn build_state<E: IntoResponse + Clone + Serialize + Send + Sync + 'static
base: Arc<BaseAppState<E>>,
_args: &Args,
) -> impl HasAppState<E> + Evaluator<E> {
base.audited(AuditOptions::new(PathBuf::from("/store/log/audit/incoming")))
base
.extract_meta()
.audited(AuditOptions::new(PathBuf::from("/store/log/audit/incoming")))
}
#[tokio::main]
@ -42,9 +44,9 @@ async fn main() {
let args = Args::parse();
let state = build_state::<MisskeyError>(
Arc::new(BaseAppState::new(
args.backend.parse().expect("Invalid backend URL"),
)),
Arc::new(
BaseAppState::new(args.backend.parse().expect("Invalid backend URL")).with_empty_ctx(),
),
&args,
)
.await;