mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-06-25 01:34:50 +03:00
hickory_resolver's TokioResolver only consults /etc/resolv.conf and queries upstream DNS servers — which means it can't see /etc/hosts, mDNS (Avahi/Bonjour), NetBIOS, or anything else in the system's full name-resolution stack. On a typical home LAN there's no DNS server that knows about peer machine names, so users had to fall back to typing IP addresses, which broke the moment they moved their setup to a different network. Swap to tokio::net::lookup_host, which calls getaddrinfo (or GetAddrInfoEx on Windows). That walks /etc/nsswitch.conf on Linux (picking up Avahi-resolved .local names, /etc/hosts, and DNS), uses Bonjour for .local on macOS, and the full Windows resolver on Windows. A Bonjour hostname like "JKMBP-M4-Max.local" now resolves on every modern network without explicit configuration; the user can carry their two machines between LANs and the connection still finds them. Drop the hickory-resolver dependency entirely — it's no longer needed. ServiceError::Dns also goes away; lookup failures surface as io::Error which is already covered by ServiceError::Io. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
100 lines
2.6 KiB
TOML
100 lines
2.6 KiB
TOML
[workspace]
|
|
members = [
|
|
"input-capture",
|
|
"input-emulation",
|
|
"input-event",
|
|
"lan-mouse-ipc",
|
|
"lan-mouse-cli",
|
|
"lan-mouse-gtk",
|
|
"lan-mouse-proto",
|
|
]
|
|
|
|
[package]
|
|
name = "lan-mouse"
|
|
description = "Software KVM Switch / mouse & keyboard sharing software for Local Area Networks"
|
|
version = "0.11.0"
|
|
edition = "2021"
|
|
license = "GPL-3.0-or-later"
|
|
repository = "https://github.com/feschber/lan-mouse"
|
|
|
|
[profile.release]
|
|
codegen-units = 1
|
|
lto = "fat"
|
|
strip = true
|
|
panic = "abort"
|
|
|
|
[build-dependencies]
|
|
shadow-rs = "1.2.0"
|
|
|
|
[dependencies]
|
|
input-event = { path = "input-event", version = "0.4.0" }
|
|
input-emulation = { path = "input-emulation", version = "0.4.0", default-features = false }
|
|
input-capture = { path = "input-capture", version = "0.4.0", default-features = false }
|
|
lan-mouse-cli = { path = "lan-mouse-cli", version = "0.3.0" }
|
|
lan-mouse-gtk = { path = "lan-mouse-gtk", version = "0.3.0", optional = true }
|
|
lan-mouse-ipc = { path = "lan-mouse-ipc", version = "0.3.0" }
|
|
lan-mouse-proto = { path = "lan-mouse-proto", version = "0.3.0" }
|
|
shadow-rs = { version = "1.2.0", features = ["metadata"] }
|
|
|
|
toml = "0.8"
|
|
toml_edit = { version = "0.22", features = ["serde"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
log = "0.4.20"
|
|
env_logger = "0.11.3"
|
|
serde_json = "1.0.107"
|
|
tokio = { version = "1.32.0", features = [
|
|
"io-util",
|
|
"io-std",
|
|
"macros",
|
|
"net",
|
|
"process",
|
|
"rt",
|
|
"sync",
|
|
"signal",
|
|
] }
|
|
futures = "0.3.28"
|
|
clap = { version = "4.4.11", features = ["derive"] }
|
|
slab = "0.4.9"
|
|
thiserror = "2.0.0"
|
|
tokio-util = "0.7.11"
|
|
local-channel = "0.1.5"
|
|
webrtc-dtls = { version = "0.12.0", features = ["pem"] }
|
|
webrtc-util = "0.11.0"
|
|
rustls = { version = "0.23.12", default-features = false, features = [
|
|
"std",
|
|
"ring",
|
|
] }
|
|
rcgen = "0.13.1"
|
|
sha2 = "0.10.8"
|
|
notify = "8.2.0"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2.148"
|
|
|
|
[features]
|
|
default = [
|
|
"gtk",
|
|
"layer_shell_capture",
|
|
"x11_capture",
|
|
"libei_capture",
|
|
"wlroots_emulation",
|
|
"libei_emulation",
|
|
"rdp_emulation",
|
|
"x11_emulation",
|
|
]
|
|
gtk = ["dep:lan-mouse-gtk"]
|
|
layer_shell_capture = ["input-capture/layer_shell"]
|
|
x11_capture = ["input-capture/x11"]
|
|
libei_capture = ["input-event/libei", "input-capture/libei"]
|
|
libei_emulation = ["input-event/libei", "input-emulation/libei"]
|
|
wlroots_emulation = ["input-emulation/wlroots"]
|
|
x11_emulation = ["input-emulation/x11"]
|
|
rdp_emulation = ["input-emulation/remote_desktop_portal"]
|
|
|
|
[package.metadata.bundle]
|
|
name = "Lan Mouse"
|
|
icon = ["target/icon.icns"]
|
|
identifier = "de.feschber.LanMouse"
|
|
osx_info_plist_exts = ["build-aux/macos-lsui-element.plist"]
|
|
resources = ["target/menubar-template.png"]
|