惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
U
Unit 42
人人都是产品经理
人人都是产品经理
罗磊的独立博客
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
GbyAI
GbyAI
Blog — PlanetScale
Blog — PlanetScale
I
InfoQ
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
B
Blog RSS Feed
WordPress大学
WordPress大学
腾讯CDC
H
Help Net Security
博客园 - Franky
博客园 - 【当耐特】
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
B
Blog
Vercel News
Vercel News
博客园 - 司徒正美

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - networkmanager-rs/nmrs: Rust bindings for Networ...
cachebag · 2026-06-16 · via Hacker News: Show HN

Crates.io Discord Documentation User Guide CI License

An async-first Rust API for NetworkManager over D-Bus. The goal is to provide a safe and simple high-level API for managing Wi-Fi connections on Linux systems, built on zbus for reliable D-Bus communication.

Documentation

Getting Started

Please consider joining the Discord. It's a welcoming community to both developers who want to contribute and/or learn about and discuss nmrs as well as users that would like to be engaged with the development process.

The best way to get started with nmrs is the User Guide, which includes comprehensive tutorials and examples. For detailed API information, see the API documentation.

Sample usage

We'll create a simple example that scans for available networks and connects to one. Note that these examples require NetworkManager to be running on your Linux system with D-Bus access, obviously.

Listing Networks

Scan for and display available Wi-Fi networks:

use nmrs::NetworkManager;

#[tokio::main]
async fn main() -> nmrs::Result<()> {
    let nm = NetworkManager::new().await?;
    
    // Scan for networks
    let networks = nm.list_networks(None).await?;
    
    for net in networks {
        println!(
            "{} - Signal: {}%, Security: {:?}",
            net.ssid,
            net.strength.unwrap_or(0),
            net.security
        );
    }
    
    Ok(())
}

Now let's connect to a network...

Connect to a WPA-PSK protected network:

use nmrs::{NetworkManager, WifiSecurity};

#[tokio::main]
async fn main() -> nmrs::Result<()> {
    let nm = NetworkManager::new().await?;
    
    // Connect to a network
    nm.connect("MyNetwork", None, WifiSecurity::WpaPsk {
        psk: "password123".into()
    }).await?;
    
    // Check current connection
    if let Some(ssid) = nm.current_ssid().await {
        println!("Connected to: {}", ssid);
    }
    
    Ok(())
}

Error Handling

All operations return Result<T, ConnectionError> with specific error variants:

use nmrs::{NetworkManager, WifiSecurity, ConnectionError};

#[tokio::main]
async fn main() -> nmrs::Result<()> {
    let nm = NetworkManager::new().await?;
    
    match nm.connect("MyNetwork", None, WifiSecurity::WpaPsk {
        psk: "wrong_password".into()
    }).await {
        Ok(_) => println!("Connected successfully"),
        Err(ConnectionError::AuthFailed) => eprintln!("Authentication failed - wrong password"),
        Err(ConnectionError::NotFound) => eprintln!("Network not found or out of range"),
        Err(ConnectionError::Timeout) => eprintln!("Connection timed out"),
        Err(e) => eprintln!("Error: {}", e),
    }
    
    Ok(())
}

To follow and/or discuss the development of nmrs, you can join the public Discord channel.

Roadmap / Implementation Status

If something is missing that you'd like to see, please file a PR or issue, adding it to this roadmap.

Wi-Fi

  • Scan and list Wi-Fi networks
  • List individual access points with BSSID, frequency, signal, and security flags
  • Per-interface Wi-Fi scoping with nm.wifi("wlan0")
  • Open networks
  • WPA-PSK personal networks
  • WPA-EAP PEAP/MSCHAPv2
  • WPA-EAP TTLS/PAP
  • EAP-TLS with certificate/key paths or blobs
  • WPA3-Enterprise 192-bit mode
  • Hidden networks
  • BSSID-specific connection
  • Race-free try_connect / try_connect_to_bssid
  • Wi-Fi P2P connection management

Wired, Bluetooth, And VLAN

  • Ethernet DHCP connections
  • Bluetooth PAN/DUN device discovery and connection
  • VLAN profile builder and validation
  • Loopback device detection
  • Bond profile builder
  • Bridge profile builder
  • TUN/TAP profile builder
  • MACVLAN / MACsec / VRF / VXLAN profile builders

VPN

  • WireGuard profile builder and connection support
  • OpenVPN profile builder
  • .ovpn import support
  • Saved VPN discovery for WireGuard and plugin VPNs
  • Connect/disconnect saved VPNs by UUID or name
  • Active VPN listing and connection details
  • Generic plugin VPN detection (OpenConnect, strongSwan, PPTP, L2TP, etc.)
  • Builders/importers for non-OpenVPN plugin VPN profiles

Profiles, Radio, And Connectivity

  • Saved connection listing, raw access, decoded summaries, update, delete, and reload
  • Profile reuse for saved Wi-Fi and Ethernet connections
  • Secret agent for NetworkManager credential prompts
  • Real-time network and device monitoring
  • Wi-Fi, WWAN, Bluetooth, and aggregate airplane-mode radio state
  • Connectivity state, forced connectivity checks, and captive-portal URL detection
  • IPv4, IPv6, DHCPv4, and DHCPv6 settings

Device And D-Bus Surface

  • NetworkManager facade
  • Device enumeration and typed device models for Ethernet, Wi-Fi, Bluetooth, VLAN, Loopback, and Wi-Fi P2P
  • Device metadata registry for Bond, Bridge, TUN, WireGuard, and other known NetworkManager type codes
  • Access Point
  • Active Connection
  • Settings
  • Settings Connection
  • Agent Manager
  • VPN Connection
  • Checkpoint
  • DNS Manager
  • PPP
  • Modem / WWAN connection management
  • WiMAX NSP

Contributing

Contributions are welcome. Please read CONTRIBUTING.md for guidelines.

Requirements

  • Rust: 1.90.0+
  • NetworkManager: Running and accessible via D-Bus
  • Linux: This library is Linux-specific

License

This project is dual-licensed under either of the following licenses, at your option:

  • MIT License
  • Apache License, Version 2.0

You may use, copy, modify, and distribute this software under the terms of either license.

See the following files for full license texts:

Contributors

Thank you to everyone who has helped build, test, document, and review nmrs.

cachebag
cachebag
stoutes
stoutes
pluiee
pluiee
JonnieCache
JonnieCache
tristanmsct
tristanmsct
Rifat-R
Rifat-R
of-the-stars
of-the-stars
okhsunrog
okhsunrog
ruthwik-01
ruthwik-01
joncorv
joncorv
AK78gz
AK78gz
pwsandoval
pwsandoval
ritiek
ritiek
shubhsingh5901
shubhsingh5901
cinnamonstic
cinnamonstic
tuned-willow
tuned-willow
dandiggas
dandiggas