mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
fix build
This commit is contained in:
@@ -13,6 +13,7 @@ use crate::{
|
|||||||
config::hook::ConfigHook,
|
config::hook::ConfigHook,
|
||||||
manager::{start_stop::StartStop, Manager},
|
manager::{start_stop::StartStop, Manager},
|
||||||
net::keys::Key,
|
net::keys::Key,
|
||||||
|
net::vhost::AlpnInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::try_get_running_ip;
|
use super::try_get_running_ip;
|
||||||
@@ -96,7 +97,13 @@ impl OsApi for Manager {
|
|||||||
let mut tx = secrets.begin().await?;
|
let mut tx = secrets.begin().await?;
|
||||||
|
|
||||||
let addr = svc
|
let addr = svc
|
||||||
.add_lan(&mut tx, id.clone(), external_port, internal_port, false)
|
.add_lan(
|
||||||
|
&mut tx,
|
||||||
|
id.clone(),
|
||||||
|
external_port,
|
||||||
|
internal_port,
|
||||||
|
Err(AlpnInfo::Specified(vec![])),
|
||||||
|
)
|
||||||
.await
|
.await
|
||||||
.map_err(|e| eyre!("Could not add to local: {e:?}"))?;
|
.map_err(|e| eyre!("Could not add to local: {e:?}"))?;
|
||||||
|
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ impl NetService {
|
|||||||
.await?,
|
.await?,
|
||||||
);
|
);
|
||||||
self.lan.insert(lan_idx, lan);
|
self.lan.insert(lan_idx, lan);
|
||||||
Ok(addr)
|
Ok(())
|
||||||
}
|
}
|
||||||
pub async fn remove_lan(&mut self, id: InterfaceId, external: u16) -> Result<(), Error> {
|
pub async fn remove_lan(&mut self, id: InterfaceId, external: u16) -> Result<(), Error> {
|
||||||
let ctrl = self.net_controller()?;
|
let ctrl = self.net_controller()?;
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ impl<'a> Future for RuntimeEventLoop<'a> {
|
|||||||
if let Poll::Ready(Some((uuid, args))) = this.callback_receiver.poll_recv(cx) {
|
if let Poll::Ready(Some((uuid, args))) = this.callback_receiver.poll_recv(cx) {
|
||||||
match this.runtime.execute_script(
|
match this.runtime.execute_script(
|
||||||
"callback",
|
"callback",
|
||||||
&format!("globalThis.runCallback(\"{uuid}\", {})", Value::Array(args)),
|
format!("globalThis.runCallback(\"{uuid}\", {})", Value::Array(args)).into(),
|
||||||
) {
|
) {
|
||||||
Ok(_) => (),
|
Ok(_) => (),
|
||||||
Err(e) => return Poll::Ready(Err(e)),
|
Err(e) => return Poll::Ready(Err(e)),
|
||||||
|
|||||||
Reference in New Issue
Block a user