Riapplica la fase 5 di aKode (86e7c72e) sulla base ripulita:
- crate codex-* -> akode-*, codex-rs -> akode-rs, codex-cli -> akode-cli, binario e ausiliari akode;
- ~/.codex -> ~/.akode, CODEX_HOME -> AKODE_HOME, variabili CODEX_* -> AKODE_*, .codex/ -> .akode/ di progetto;
nessun fallback a ~/.codex o a CODEX_*;
- testi per l'utente "Codex" -> "aKode"; testi verso il modello e istruzioni di sistema invariati;
- snapshot insta rinominati (non ancora rigenerati).
I conflitti con la base ripulita sono stati risolti riapplicando la rinomina ai file senza le
funzioni di imeAI (script di mappa dei token per file).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
38 lines
925 B
Rust
38 lines
925 B
Rust
use tokio_tungstenite::tungstenite::http::Uri;
|
|
|
|
use super::is_loopback_destination;
|
|
|
|
#[test]
|
|
fn recognizes_loopback_websocket_destinations() {
|
|
for destination in [
|
|
"ws://localhost:8080",
|
|
"ws://LOCALHOST:8080",
|
|
"ws://127.0.0.1:8080",
|
|
"ws://[::1]:8080",
|
|
] {
|
|
let uri = destination.parse::<Uri>().unwrap();
|
|
assert!(
|
|
is_loopback_destination(&uri),
|
|
"expected loopback destination: {destination}; parsed host: {:?}",
|
|
uri.host()
|
|
);
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn rejects_non_loopback_websocket_destinations() {
|
|
for destination in [
|
|
"ws://relay.example:8080",
|
|
"ws://192.0.2.1:8080",
|
|
"ws://[2001:db8::1]:8080",
|
|
"/missing-host",
|
|
] {
|
|
assert!(!is_loopback_destination(
|
|
&destination.parse::<Uri>().unwrap()
|
|
));
|
|
}
|
|
}
|
|
|
|
#[path = "network_policy_tests.rs"]
|
|
mod network_policy_tests;
|