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

推荐订阅源

Google DeepMind News
Google DeepMind News
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
A
About on SuperTechFans
WordPress大学
WordPress大学
B
Blog
Martin Fowler
Martin Fowler
Jina AI
Jina AI
I
InfoQ
P
Proofpoint News Feed
小众软件
小众软件
S
SegmentFault 最新的问题
V
V2EX
B
Blog RSS Feed
量子位
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
美团技术团队

Show HN

The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code. GitHub - tamerh/enju: Coordinating Humans, AI Agents, and Compute as Peers on a Shared Workflow Graph
GitHub - networkmanager-rs/nmrs: Rust bindings for Networ...
cachebag · 2026-06-16 · via 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