the shake of all times
This commit is contained in:
@@ -2,19 +2,16 @@
|
|||||||
|
|
||||||
router shit
|
router shit
|
||||||
|
|
||||||
## usage
|
## whatever i did must be BEAUTIFUL
|
||||||
|
|
||||||
- Build (Windows host OK):
|
read [in vietnamese](https://ldlda.com/blogs/else/ssh-ax3000cv2-update-firmware-0-10-2)
|
||||||
- cargo build --release --target armv7-unknown-linux-musleabihf
|
|
||||||
- Run on a Linux box/router:
|
|
||||||
- copy target/armv7-unknown-linux-musleabihf/release/wakey to the device
|
|
||||||
- chmod +x wakey && ./wakey
|
|
||||||
- Install via release asset (OpenWrt):
|
|
||||||
- wget -O- `https://your.gitea/owner/repo/releases/download/vX.Y.Z/wakey-rootfs-vX.Y.Z-armv7-unknown-linux-musleabihf.tgz` | tar -xz -C /
|
|
||||||
- /etc/init.d/wakey enable && /etc/init.d/wakey start
|
|
||||||
|
|
||||||
Optional updater (fetch latest automatically on OpenWrt):
|
## now i NEED the split arch to be on
|
||||||
|
|
||||||
```sh
|
like RN rn rn so i can have web outside and the lil agent can be sitting here configuring itself (Parse/append to rc.local files? add to init.d? fuhh)
|
||||||
WAKEY_HOST=git.ldlda.com WAKEY_OWNER=lda WAKEY_REPO=wakey sh /etc/ldlda_help/update_wakey.sh
|
|
||||||
```
|
I NEED IT
|
||||||
|
|
||||||
|
I NEEED IT
|
||||||
|
|
||||||
|
I NEEEEEED it.
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ pub async fn get(dev: Option<&str>) -> anyhow::Result<Vec<AddrOutput>> {
|
|||||||
link = link.match_name(dev.to_owned());
|
link = link.match_name(dev.to_owned());
|
||||||
if let Some(ind) = link.execute().try_next().await?.map(|a| a.header.index) {
|
if let Some(ind) = link.execute().try_next().await?.map(|a| a.header.index) {
|
||||||
address = address.set_link_index_filter(ind);
|
address = address.set_link_index_filter(ind);
|
||||||
}
|
};
|
||||||
|
address.execute().try_next().await?;
|
||||||
|
} else {
|
||||||
};
|
};
|
||||||
address.execute().try_next().await?;
|
todo!();
|
||||||
todo!()
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-5
@@ -46,11 +46,9 @@ pub fn api_router() -> Router {
|
|||||||
.route("/ips/{name}", get(ip))
|
.route("/ips/{name}", get(ip))
|
||||||
.route(
|
.route(
|
||||||
"/mac-cache",
|
"/mac-cache",
|
||||||
get(|| async {
|
get(async || match load_mac_name_cache().await {
|
||||||
match load_mac_name_cache().await {
|
Ok(h) => Json(h).into_response(),
|
||||||
Ok(h) => Json(h).into_response(),
|
Err(e) => e.to_string().into_response(),
|
||||||
Err(e) => e.to_string().into_response(),
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.layer(middleware::from_fn(add_performance_header))
|
.layer(middleware::from_fn(add_performance_header))
|
||||||
|
|||||||
@@ -110,3 +110,4 @@ pub type WakeStatus = Status<WakeStatusLine>; */
|
|||||||
// }): Query<DeviceQuery>,
|
// }): Query<DeviceQuery>,
|
||||||
// ) -> impl IntoResponse {
|
// ) -> impl IntoResponse {
|
||||||
// }
|
// }
|
||||||
|
pub mod impls;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use super::{WakeStatus, WakeTarget, WakeTargetResult};
|
use crate::utils::wake::{WakeStatus, WakeTarget, WakeTargetResult};
|
||||||
use crate::route::wake::{
|
use crate::route::wake::{
|
||||||
WakeTarget as RouteWakeTarget, WakeTargetResult as RouteWakeResult,
|
WakeTarget as RouteWakeTarget, WakeTargetResult as RouteWakeResult,
|
||||||
WakeTargetStatus as RouteWakeStatus,
|
WakeTargetStatus as RouteWakeStatus,
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
//! why did my Head Ass split these into two.
|
//! why did my Head Ass split these into two.
|
||||||
|
|
||||||
pub mod impls;
|
|
||||||
use std::{io, net::IpAddr};
|
use std::{io, net::IpAddr};
|
||||||
|
|
||||||
use futures::TryFutureExt;
|
use futures::TryFutureExt;
|
||||||
Reference in New Issue
Block a user