Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Windows LAN Outgoing

一套適用於 Windows 10/11 的 IPv4 網路出口優先順序管理工具,提供圖形化介面管理實體網卡、Windows 自動計量,以及選擇性顯示 VPN/虛擬網路介面。

Application release:v1.0.6
Source code maturity:v0.9

English summary

Windows LAN Outgoing is a Windows GUI utility for managing IPv4 network-interface priority. It supports Windows automatic metrics, manual priority ordering, drag-and-drop operation, physical-adapter filtering, and optional VPN or virtual-adapter management. Version 1.0.6 uses Windows WMI and the native IP Helper API without launching PowerShell.

功能

  • 顯示網卡系統識別名稱與 IPv4 位址。
  • 啟動時讀取目前的自動計量狀態與介面計量順序。
  • 左欄顯示使用 Windows 自動計量的網卡。
  • 右欄顯示由本程式管理優先順序的網卡。
  • 支援勾選後使用左右箭頭移動網卡。
  • 支援直接拖曳網卡跨欄移動。
  • 右欄支援拖曳、上移及下移調整優先順序。
  • 支援一鍵將所有實體網卡立即恢復為 Windows 自動計量。
  • 預設隱藏 VPN、Hyper-V、WSL 等虛擬介面。
  • 可手動開啟虛擬網卡/VPN 顯示與管理功能。
  • 程式啟動時直接要求系統管理員權限。
  • 發生錯誤時,會在程式旁建立 LanOutgoing.log

下載

請前往 Releases 下載最新版本的 LanOutgoing-v1.0.6.exe

本程式目前尚未加入 Authenticode 程式碼簽章,因此 Windows 可能顯示「未知發行者」,防毒軟體也可能對新發佈且尚未建立信譽的 EXE 顯示警告。請只從本專案的 GitHub Releases 下載,並核對 Release 提供的 SHA-256。

系統需求

  • Windows 10 或 Windows 11
  • Microsoft .NET Framework 4.x
  • 系統管理員權限
  • Windows Management Instrumentation(WMI)
  • Windows IP Helper API(Iphlpapi.dll

使用方式

  1. 執行 LanOutgoing.exe
  2. Windows 顯示使用者帳戶控制(UAC)時,選擇「是」。
  3. 等待程式載入網卡、IPv4 位址與目前計量狀態。
  4. 在左右兩欄勾選網卡,使用 移動;也可直接跨欄拖曳。
  5. 在右欄用拖曳或 調整出口優先順序。
  6. 按「套用」寫入設定。

紅色的「全部恢復自動(立即執行)」按鈕會立刻將畫面中的所有網卡恢復為 Windows 自動計量,不需要再按「套用」。

左右欄的意義

Windows 自動計量

左欄網卡由 Windows 根據介面類型與連線速度自動計算介面 metric。本程式不指定其固定優先順序。

本程式排序

右欄網卡會停用 IPv4 Automatic Metric,並依畫面由上到下配置介面 metric。越上方的網卡具有越高的預設 IPv4 出口優先權。

程式以 100 為 Interface Metric 間隔,由上到下依序設定為 10、110、210、310……。本程式不修改 Route Metric。

v1.0.6 原生後端

自 v1.0.6 起,程式不再啟動 PowerShell,也不使用 EncodedCommandNetTCPIP PowerShell 命令。

  • 使用 WMI 讀取網卡識別名稱、IPv4 位址,以及實體/虛擬介面分類。
  • 使用 Windows IP Helper API GetIpInterfaceEntry 讀取 Automatic Metric、Interface Metric 與連線狀態。
  • 使用 Windows IP Helper API SetIpInterfaceEntry 設定 Automatic Metric 與 Interface Metric。

SetIpInterfaceEntry 需要提升權限,因此程式仍會在啟動時要求系統管理員權限。

VPN 與虛擬網卡

程式預設只顯示 Windows 判定為實體硬體介面的網卡。VPN、Hyper-V、WSL 及其他虛擬介面預設會被隱藏且不會修改。

如需管理虛擬介面,可開啟左上方的「顯示虛擬網卡 / VPN」選項。開啟後,虛擬介面也能在左右欄移動及套用排序。

Windows 路由選擇會先比較路由前綴長度,再比較 metric,因此 VPN 並非固定永遠位於最優先或最後。調整 VPN 介面可能影響全通道 VPN、公司內部網段或 split tunneling,請確認 VPN 的路由需求後再套用。

錯誤紀錄

若讀取或套用失敗,程式會在 EXE 所在資料夾建立:

LanOutgoing.log

回報問題時,請附上:

  • Windows 版本
  • 使用的程式版本
  • 問題發生前的操作
  • LanOutgoing.log 內容

請先移除其中可能涉及內部網路名稱或其他敏感資訊。

安全與影響範圍

本程式只會修改 Windows IPv4 網路介面的 Automatic Metric 與 Interface Metric,不會修改 Route Metric、IP 位址、DNS、預設閘道內容或 IPv6 設定。

套用網路設定可能短暫影響現有連線。遠端操作電腦時,請避免將目前使用中的管理介面移至低優先順序或停用。

AI 輔助開發聲明

本專案由專案擁有者提出需求、功能方向與操作流程,並在 AI 工具協助下完成程式設計、介面調整、文件撰寫、問題診斷及版本整理。

AI 產生或修改的內容仍可能包含錯誤、未預期行為或安全風險。使用者應自行評估程式是否適合其網路環境,並在套用網路設定前確認可能造成的連線影響。本聲明不代表任何 AI 服務提供者對本程式提供保證、背書或技術支援。

AI-assisted development statement

This project was developed from requirements, feature direction, and workflows defined by the project owner, with assistance from AI tools for programming, user-interface refinement, documentation, troubleshooting, and release preparation.

AI-generated or AI-modified content may still contain errors, unexpected behavior, or security risks. Users are responsible for evaluating whether this software is appropriate for their network environment and for understanding the potential connectivity impact before applying network changes. This statement does not imply any warranty, endorsement, or technical support from any AI service provider.

License

本專案採用 MIT License

About

Windows GUI tool for managing IPv4 network interface priority, automatic metrics, physical adapters, and optional VPN or virtual adapters.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages