this slop is exhausting

This commit is contained in:
Michael Neale
2025-11-04 18:13:56 +11:00
parent fd9a06a805
commit a4d80a3196
4 changed files with 0 additions and 14 deletions
@@ -64,7 +64,6 @@ pub async fn run() -> Result<()> {
let local_addr = listener.local_addr()?;
info!("listening on {}", local_addr);
// Auto-start tunnel if configured (spawn as background task to not block server startup)
let port = local_addr.port();
let app_state_clone = app_state.clone();
tokio::spawn(async move {
-3
View File
@@ -21,8 +21,6 @@ pub struct ErrorResponse {
}
/// Start the tunnel
///
/// Starts a Lapstone tunnel with the specified port.
#[utoipa::path(
post,
path = "/api/tunnel/start",
@@ -40,7 +38,6 @@ pub async fn start_tunnel(
) -> Response {
match state.tunnel_manager.start(req.port).await {
Ok(_info) => {
// Return current status (includes auto_start flag)
let status = state.tunnel_manager.get_status().await;
(StatusCode::OK, Json(status)).into_response()
}
-4
View File
@@ -36,13 +36,9 @@ impl AppState {
}))
}
/// Auto-start tunnel if configured to do so
pub async fn auto_start_tunnel(&self, port: u16) {
let status = self.tunnel_manager.get_status().await;
// Only auto-start if:
// 1. auto_start is enabled
// 2. tunnel is not already running
if status.auto_start && status.state == crate::tunnel::TunnelState::Idle {
tracing::info!("Auto-starting tunnel on port {}", port);
match self.tunnel_manager.start(port).await {
-6
View File
@@ -5,9 +5,6 @@ use serde::{Deserialize, Serialize};
use std::sync::Arc;
use tokio::sync::RwLock;
// Note: TunnelMode removed - only Lapstone is currently supported
// See tunnel/archived/README.md for archived Tailscale implementation
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
#[serde(rename_all = "lowercase")]
pub enum TunnelState {
@@ -86,7 +83,6 @@ impl TunnelManager {
{
let mut cfg = self.config.write().await;
f(&mut cfg);
// Save config via goose Config system (keyring + config.yaml)
if let Err(e) = config::save_config(&cfg).await {
tracing::error!("Failed to save tunnel config: {}", e);
}
@@ -102,7 +98,6 @@ impl TunnelManager {
let config = self.config.read().await.clone();
// Only Lapstone tunnel is currently supported
let tunnel_secret = config.secret.clone().unwrap_or_else(generate_secret);
let server_secret = std::env::var("GOOSE_SERVER__SECRET_KEY")
.expect("GOOSE_SERVER__SECRET_KEY must be set for tunnel to work");
@@ -138,7 +133,6 @@ impl TunnelManager {
}
pub async fn stop(&self, clear_auto_start: bool) {
// Only Lapstone tunnel is currently supported
lapstone::stop(self.lapstone_handle.clone()).await;
*self.state.write().await = TunnelState::Idle;