mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-06-10 14:53:30 -07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a1dce3215 | |||
| 2df31300e3 | |||
| fbd8110be9 |
@@ -7,10 +7,18 @@ use crate::config;
|
|||||||
use crate::display::DisplayState;
|
use crate::display::DisplayState;
|
||||||
|
|
||||||
pub fn update_ui(
|
pub fn update_ui(
|
||||||
_task_tracker: &TaskTracker,
|
task_tracker: &TaskTracker,
|
||||||
_config: &config::Config,
|
_config: &config::Config,
|
||||||
_shutdown_token: CancellationToken,
|
shutdown_token: CancellationToken,
|
||||||
_ui_update_rx: Receiver<DisplayState>,
|
mut ui_update_rx: Receiver<DisplayState>,
|
||||||
) {
|
) {
|
||||||
info!("Headless mode, not spawning UI.");
|
info!("Headless mode, not spawning UI.");
|
||||||
|
task_tracker.spawn(async move {
|
||||||
|
loop {
|
||||||
|
tokio::select! {
|
||||||
|
_ = shutdown_token.cancelled() => break,
|
||||||
|
_ = ui_update_rx.recv() => {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,12 +61,6 @@ On the first detection of a crash, a diagnostic snapshot is saved to `/data/rayh
|
|||||||
|
|
||||||
If recovery fails after 5 attempts, the status will change to **failed**. A reboot of the device will reset WiFi.
|
If recovery fails after 5 attempts, the status will change to **failed**. A reboot of the device will reset WiFi.
|
||||||
|
|
||||||
You can also configure WiFi during installation:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
./installer orbic --admin-password 'mypassword' --wifi-ssid 'MyNetwork' --wifi-password 'networkpass'
|
|
||||||
```
|
|
||||||
|
|
||||||
## WebDAV Upload
|
## WebDAV Upload
|
||||||
|
|
||||||
Rayhunter can automatically upload finished recordings to a WebDAV server. When a `[webdav]` section is present in `config.toml`, a background worker periodically scans the recording store and uploads any closed entry that is older than `min_age_secs`. Each eligible entry uploads two files: the raw `.qmdl` capture and its `.ndjson` analysis output. After a successful upload the entry is either marked as uploaded in the manifest (and skipped on subsequent polls), or deleted locally if `delete_on_upload = true`. With no `[webdav]` section, no upload worker runs.
|
Rayhunter can automatically upload finished recordings to a WebDAV server. When a `[webdav]` section is present in `config.toml`, a background worker periodically scans the recording store and uploads any closed entry that is older than `min_age_secs`. Each eligible entry uploads two files: the raw `.qmdl` capture and its `.ndjson` analysis output. After a successful upload the entry is either marked as uploaded in the manifest (and skipped on subsequent polls), or deleted locally if `delete_on_upload = true`. With no `[webdav]` section, no upload worker runs.
|
||||||
|
|||||||
@@ -346,9 +346,13 @@ async fn tplink_launch_telnet_v5(admin_ip: &str) -> Result<(), Error> {
|
|||||||
admin_ip: admin_ip.to_owned(),
|
admin_ip: admin_ip.to_owned(),
|
||||||
});
|
});
|
||||||
|
|
||||||
let listener = tokio::net::TcpListener::bind("127.0.0.1:4000")
|
let bind_addr = "127.0.0.1:4000";
|
||||||
|
let listener = tokio::net::TcpListener::bind(bind_addr)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.with_context(|| format!(
|
||||||
|
"Failed to bind to {bind_addr}. Is another process using this port?\n\
|
||||||
|
Try closing any application that might be listening on port 4000 and rerun the installer."
|
||||||
|
))?;
|
||||||
|
|
||||||
println!("Listening on http://{}", listener.local_addr().unwrap());
|
println!("Listening on http://{}", listener.local_addr().unwrap());
|
||||||
println!("Please open above URL in your browser and log into the router to continue.");
|
println!("Please open above URL in your browser and log into the router to continue.");
|
||||||
|
|||||||
Reference in New Issue
Block a user