跳到主要內容

從 eBPF 看 Linux 核心網路封包路徑:XDP 零拷貝過濾與安全防禦實戰 / Linux Packet Path via eBPF & XDP Zero-Copy Filtering

daily-tech:2026-12-02

現象:延續上一篇我們討論 Linux OOM Killer 與記憶體壓力時看到的系統雪崩問題,其實在網路邊緣閘道或高併發 API 主機上,還有一種非常常見的「還沒進應用程式就先卡死」情境。假設你的 Linux 伺服器突然遭遇大量異常 UDP 或 TCP SYN 封包洪水,你立刻在 nftables 或 iptables 的 PREROUTING 鏈加上丟棄規則,卻發現 top 畫面裡的軟中斷(SoftIRQ,%si)與 ksoftirqd 核心執行緒依然飆高,正常的 SSH 連線和 API 請求開始出現明顯延遲。明明防火牆已經把惡意封包全數 DROP 了,為什麼 CPU 和核心記憶體仍然喘不過氣?

Symptom: Continuing from our previous breakdown of Linux OOM Killer and memory pressure, edge gateways and high-concurrency API servers often hit another frustrating wall where the machine stalls before user-space code even runs. Suppose your Linux host is hit by a flood of malformed UDP or TCP SYN packets: you add a DROP rule in the nftables or iptables PREROUTING chain, yet top still shows SoftIRQ (%si) and ksoftirqd spiking while legitimate SSH and API traffic slows to a crawl. If the firewall is already dropping those packets, why are CPU cycles and kernel memory still getting crushed?

答案不在防火牆規則寫得不夠早,而在於 Linux 傳統網路協定堆疊「太早把封包包裝成重型物件」。只要一個網路訊框從網卡驅動一路走到 Netfilter(Linux 核心的封包過濾框架),核心就必須先配置一份欄位龐大的 struct sk_buff(俗稱 skb,核心用來描述單一封包的通用緩衝區結構),接著經過 VLAN 判斷、封包抓包掛點(ptype_all)與流量控制入口(TC Ingress),最後才輪到 ip_rcv 裡的 NF_INET_PRE_ROUTING 檢查。換句話說,在防火牆說「丟掉它」之前,最耗費 CPU 快取與 Slab 記憶體配置的工作其實都已經做完了。

The bottleneck is not your firewall syntax—it is that the traditional Linux networking stack wraps every packet in a heavy metadata structure too early. Before a frame ever reaches Netfilter (the kernel's packet-filtering framework), the kernel allocates and initializes a struct sk_buff (the general-purpose socket buffer descriptor), runs VLAN untagging, checks packet taps (ptype_all), and traverses Traffic Control (TC) ingress hooks, only then hitting NF_INET_PRE_ROUTING inside IPv4 receive handling. By the time your firewall rejects the packet, the most expensive CPU cache and kernel slab allocation work has already been paid.

原創技術架構圖:Linux 核心網路封包接收路徑,對照 Native XDP、Generic XDP、TC Ingress 與 Netfilter 攔截點與 sk_buff 配置時機
圖 1|原創架構示意圖(非產品截圖,依 Linux 6.18.55 與 linux-next 原始碼整理):封包自網卡 DMA 進入後,Native XDP 在配置 sk_buff 之前即可執行 XDP_DROP/XDP_TX/XDP_REDIRECT,而 Generic XDP、TC 與 Netfilter 皆位於 sk_buff 誕生之後。 / Figure 1 | Original architecture diagram (not a product screenshot, derived from Linux 6.18.55 and linux-next): Native XDP can drop, bounce, or redirect frames before sk_buff allocation, whereas Generic XDP, TC ingress, and Netfilter all execute afterward.

機制一:Native XDP 如何在 sk_buff 誕生前完成零拷貝裁決 / Mechanism 1: Zero-Allocation Verdicts in Native XDP

為了把高速過濾推到整個網路路徑的最前線,Linux 核心引入了 XDP(eXpress Data Path,高速資料路徑),它把通過安全驗證的 eBPF(擴充柏克萊封包過濾器,一種可在核心沙箱內執行的位元組碼機制)程式,直接掛載在網卡驅動的 NAPI(New API,中斷結合輪詢的收包機制)接收迴圈中。我們直接查核本機 Linux 6.18.55 原始碼的 include/net/xdp.h(第 86–107 行與第 689–703 行),可以看到驅動程式並不需要配置 sk_buff,而是在堆疊上填寫一份極輕量的 struct xdp_buff,僅紀錄原始分頁的 data、data_end、data_meta 與 data_hard_start 指標,隨即交給 bpf_prog_run_xdp() 裁決:

To push packet filtering to the earliest software boundary, Linux introduced XDP (eXpress Data Path), attaching verified eBPF (extended Berkeley Packet Filter, a sandboxed in-kernel bytecode runtime) programs directly inside a NIC driver's NAPI (interrupt-mitigated polling) receive loop. Inspecting our local Linux 6.18.55 tree in include/net/xdp.h (lines 86–107 and 689–703), the driver skips sk_buff allocation altogether, populates a lightweight stack-resident struct xdp_buff with raw page pointers (data, data_end, data_meta, data_hard_start), and invokes bpf_prog_run_xdp() directly:

/* 來源查核:Linux 6.18.55 (include/net/xdp.h: L86-100, L689-703) */
struct xdp_buff {
    void *data;
    void *data_end;
    void *data_meta;
    void *data_hard_start;
    struct xdp_rxq_info *rxq;
    struct xdp_txq_info *txq;
    u32 frame_sz;
    u32 flags;
};

static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,
                                            struct xdp_buff *xdp)
{
    /* 驅動 XDP 掛點位於單次 NAPI poll 週期與 local_bh_disable() 保護內,
     * 直接具備讀取 eBPF Map 所需的 RCU 保護。 */
    u32 act = __bpf_prog_run(prog, xdp, BPF_DISPATCHER_FUNC(xdp));

    if (static_branch_unlikely(&bpf_master_redirect_enabled_key)) {
        if (act == XDP_TX && netif_is_bond_slave(xdp->rxq->dev))
            act = xdp_master_redirect(xdp);
    }
    return act;
}

比對最新追蹤的 linux-next(版本 7.3.0-rc6)同一檔案 include/net/xdp.h(第 109–112 行與第 694–708 行),核心架構保持高度穩定,並額外新增了 xdp_reinit_buff() 內聯輔助函式專門將 xdp->flags 歸零,方便網卡驅動在同一輪 NAPI 輪詢中重複使用堆疊上的 xdp_buff 而不殘留上一筆多片段(multi-buffer)旗標。至於 eBPF 程式能回傳的動作,在 include/uapi/linux/bpf.h(6.18.55 第 6513–6519 行;linux-next 第 6705–6711 行)中清楚定義了五種 enum xdp_action:XDP_ABORTED(異常丟棄並觸發追蹤事件)、XDP_DROP(直接丟棄並原地回收 RX 分頁)、XDP_PASS(放行交給傳統網路堆疊建構 sk_buff)、XDP_TX(從同一張網卡零拷貝送回,常用於 L4 負載平衡或反射測試)以及 XDP_REDIRECT(轉送到其他網卡、CPU 佇列或 AF_XDP 使用者空間 Socket)。在 drivers/net/veth.c(6.18.55 第 647–679 行)就能看到標準驅動如何針對這五種回傳值直接分流。

Comparing against our local linux-next tree (7.3.0-rc6, include/net/xdp.h lines 109–112 and 694–708), the core interface remains stable while adding an inline xdp_reinit_buff() helper that explicitly resets xdp->flags = 0, making it safer for drivers to reuse a stack xdp_buff across frames within a NAPI loop without leaking multi-buffer flags. As defined in include/uapi/linux/bpf.h (6.18.55 lines 6513–6519; linux-next lines 6705–6711), every XDP program returns one of five enum xdp_action verdicts: XDP_ABORTED (error drop with tracepoint), XDP_DROP (immediate drop and RX page recycling), XDP_PASS (hand off to the standard stack for sk_buff creation), XDP_TX (hairpin back out the same NIC), or XDP_REDIRECT (forward to another NIC, CPU map, or user-space AF_XDP socket), exactly as dispatched in drivers/net/veth.c (6.18.55 lines 647–679).

你可以把 Native XDP 想像成大樓一樓大廳的警衛,直接拿著名單把垃圾傳單在門口回收桶處理掉,根本不用替每張傳單填寫掛號信簽收單(sk_buff)再搭電梯送到十樓警衛室(Netfilter)。不過這個比喻有個重要邊界:大廳警衛為了維持極速,只能看手邊這張原始頁面裡的資料,不能去翻十樓的歷史訪客連線狀態表(conntrack),而且每一次讀取 Ethernet、IP 或 UDP 標頭前,都必須顯式寫出 data + 標頭長度 > data_end 的邊界判斷,才能通過 Linux eBPF Verifier(載入前的靜態安全驗證器),確保程式碼絕不會越界讀取核心記憶體或陷入無窮迴圈。

Think of Native XDP as a lobby guard discarding junk flyers at the front door instead of logging each one onto a registered-mail manifest (sk_buff) and riding the elevator to the tenth-floor security desk (Netfilter). The analogy has a clear technical boundary, though: to stay ultra-fast, XDP operates strictly on raw packet bytes in the current RX buffer rather than full stateful connection tracking (conntrack). Furthermore, before dereferencing any Ethernet, IP, or UDP header field, the program must explicitly check data + header_len > data_end so the eBPF Verifier can statically prove memory safety and loop termination at load time.

原創技術圖解:struct xdp_buff 記憶體分頁佈局、256 Bytes Headroom、eBPF Verifier 邊界檢查與 Native XDP 和 Generic XDP 的核心執行差異
圖 2|原創結構對照圖(非產品截圖,依 include/net/xdp.h 與 net/core/dev.c 整理):上圖標示 RX 頁面中 XDP_PACKET_HEADROOM(256 Bytes)與 Verifier 邊界檢查;下圖對照 Native XDP 與 Generic XDP 在 sk_buff 開銷與線性化風險上的關鍵差異。 / Figure 2 | Original structure comparison (not a product screenshot, derived from include/net/xdp.h and net/core/dev.c): top illustrates RX page pointers, 256-byte headroom, and verifier bounds checks; bottom contrasts Native XDP against Generic XDP overhead and skb linearization risk.

機制二:別把 Generic XDP 當成抗洪主防線 / Mechanism 2: Why Generic XDP Is Not Your High-Load Shield

實務上最常踩到的效能陷阱,是工程師以為只要把程式掛上 XDP 就自動獲得「零拷貝免 sk_buff」加速,卻沒注意到網卡驅動不支援原生模式,悄悄退回了 Generic XDP(xdpgeneric / SKB 模式)。翻開 Linux 6.18.55 的 net/core/dev.c,會發現 Generic XDP 根本不在驅動裡,而是掛在 __netif_receive_skb_core()(第 5937–5949 行,linux-next 為第 6139–6151 行)呼叫 do_xdp_generic()。此時 sk_buff 早就配置完成了!更關鍵的是,在 netif_receive_generic_xdp()(6.18.55 第 5513–5525 行;linux-next 第 5720–5732 行)裡,核心為了滿足與原生 XDP 相同的 XDP_PACKET_HEADROOM(256 Bytes,定義於 include/uapi/linux/bpf.h 第 6506 行)規範,只要偵測到封包被複製(skb_cloned)、非線性分片(skb_is_nonlinear)或前置空間不足 256 位元組,就會呼叫 netif_skb_check_for_xdp() 重新展開或複製記憶體。

A classic operational pitfall is assuming any XDP attachment automatically delivers zero-allocation speed, when an unsupported NIC driver silently falls back to Generic XDP (xdpgeneric / SKB mode). Checking net/core/dev.c in Linux 6.18.55 shows Generic XDP does not run inside the driver at all—it is invoked via do_xdp_generic() inside __netif_receive_skb_core() (lines 5937–5949; linux-next lines 6139–6151), after sk_buff allocation has already occurred. Worse still, inside netif_receive_generic_xdp() (6.18.55 lines 5513–5525; linux-next lines 5720–5732), the kernel enforces the same 256-byte XDP_PACKET_HEADROOM guarantee (include/uapi/linux/bpf.h line 6506): if the skb is cloned, non-linear, or short on headroom, netif_skb_check_for_xdp() must linearize or expand it, adding extra memory copy overhead.

/* 來源查核:Linux 6.18.55 (net/core/dev.c: L5517-5528, L5937-5949) */
/* 1. Generic XDP 在 __netif_receive_skb_core() 內執行,此時 sk_buff 已存在 */
if (static_branch_unlikely(&generic_xdp_needed_key)) {
    migrate_disable();
    ret2 = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), &skb);
    migrate_enable();
    if (ret2 != XDP_PASS) {
        ret = NET_RX_DROP;
        goto out;
    }
}

/* 2. netif_receive_generic_xdp() 檢查 Headroom 與線性化條件 */
if (skb_cloned(skb) || skb_is_nonlinear(skb) ||
    skb_headroom(skb) < XDP_PACKET_HEADROOM) {
    if (netif_skb_check_for_xdp(pskb, xdp_prog))
        goto do_drop;
}

至於後續路徑的順序,在同一份 net/core/dev.c 中也一目了然:__netif_receive_skb_core() 先經過 Generic XDP(第 5941 行)與封包抓包掛點(第 5963–5972 行),再呼叫 sch_handle_ingress() 執行 TC Ingress/tcx_ingress(第 5982 行),最後送進 L3 協定處理函式,在 net/ipv4/ip_input.c(第 573 與 642 行)才真正抵達 Netfilter 的 NF_INET_PRE_ROUTING。所以 Generic XDP 非常適合在筆電或雲端虛擬機上做功能開發與規則驗證,但如果要扛住真實線上的高頻封包洪水,部署前務必確認網卡處於原生 xdpdrv(或硬體卸載 xdpoffload)模式。

The remaining ingress order in net/core/dev.c is equally clear: after Generic XDP (line 5941) and packet taps (lines 5963–5972), the stack calls sch_handle_ingress() for TC / tcx_ingress hooks (line 5982), and only after passing into L3 IPv4 processing does net/ipv4/ip_input.c (lines 573 and 642) invoke Netfilter's NF_INET_PRE_ROUTING. Generic XDP is therefore ideal for functional prototyping and unit testing in virtual environments, but for genuine high-rate flood mitigation in production, always verify that the NIC runs in Native xdpdrv (or NIC-offloaded xdpoffload) mode.

影響與取捨:XDP 與傳統防火牆的分工邊界 / Impact & Trade-Offs: Dividing Duties Between XDP and Netfilter

理解這條封包路徑後,系統架構上的分工就變得非常務實。XDP 的強項在於「極早期、無狀態、高頻率」的過濾與導流:例如依 eBPF Hash/LPM Trie Map 封鎖惡意來源網段、丟棄異常 UDP 放大攻擊封包、在 L4 做無狀態 SYN Cookie 前置防護,或是搭配核心官方文件說明的 AF_XDP(Documentation/networking/af_xdp.rst)將特定流量的原始訊框以零拷貝方式送進使用者空間的封包分析器或邊緣 AI 感測管線。更重要的是,當邊緣主機同時跑著對記憶體敏感的推論服務(例如前篇提到的端側 LLM)時,把無效封包擋在 sk_buff 配置之前,能同時減少核心 Slab(如 skbuff_head_cache)與軟中斷 CPU 的爭搶。

Once you see the exact ingress sequence, architectural boundaries become straightforward. XDP shines at earliest-stage, stateless, high-rate filtering and forwarding: dropping blocklisted prefixes via eBPF Hash or LPM Trie maps, shedding volumetric UDP floods, front-ending stateless SYN defenses, or steering raw frames straight to user-space packet analyzers and edge AI telemetry pipelines via AF_XDP (as documented in Documentation/networking/af_xdp.rst). Crucially, on edge nodes running memory-sensitive workloads such as the on-device LLMs discussed in our previous post, dropping junk before sk_buff allocation spares both SoftIRQ CPU cycles and kernel slab memory (skbuff_head_cache).

反過來說,XDP 並不適合拿來硬寫複雜的有狀態防火牆或 L7 應用層解析。由於原生 XDP 發生在 IP 重組、TCP 連線狀態追蹤與 Socket 路由之前,若強行在 XDP 裡重造一套完整的 TCP 狀態機,不只容易觸碰 eBPF Verifier 複雜度上限,也會讓除錯與維運成本大幅上升。實務上最穩健的做法是「分層協同」:讓 Native XDP 在最外層把明顯異常、黑名單與超限流量以極低代價清掉,再透過 XDP_PASS 把乾淨流量交給 tcx 與 nftables 處理 NAT、有狀態連線追蹤與細緻的服務策略。此外也別忘了,被 XDP_DROP 直接丟掉的封包在抵達 ptype_all 之前就消失了,因此傳統 tcpdump 會看不到它們——除錯時必須透過 eBPF Map 計數器或 xdp_monitor 追蹤丟包統計,否則很容易誤以為「封包沒送到網卡」。

Conversely, XDP is a poor fit for complex stateful firewalls or deep L7 payload inspection. Because Native XDP executes before IP defragmentation, TCP connection tracking, and socket routing, rebuilding full stateful logic inside XDP quickly collides with verifier complexity limits and raises maintenance overhead. A layered defense works far better in practice: let Native XDP shed malformed frames and blocklisted floods at the door, then return XDP_PASS so tcx and nftables handle NAT, stateful conntrack, and granular policy rules. One operational gotcha to keep in mind: packets dropped via XDP_DROP vanish before reaching ptype_all, meaning tcpdump will not see them—always instrument drop counters in an eBPF per-CPU map so you never mistake XDP drops for upstream packet loss.

可操作小步驟:先唯讀觀察,再於隔離環境驗證 / Actionable Steps: Read-Only Inspection First, Safe Validation Second

以下步驟適用於一般 Linux 主機(建議核心 5.15 以上,本文原始碼查核基準為 Linux 6.18.55/linux-next 7.3.0-rc6),步驟 1 與步驟 2 全程為唯讀觀察,不會改動任何網路設定或中斷連線:

The steps below apply to modern Linux systems (kernel 5.15+ recommended; source citations verified against Linux 6.18.55 and linux-next 7.3.0-rc6). Steps 1 and 2 are strictly read-only and will not alter routing or drop active connections:

# 步驟 1(唯讀):檢查指定網卡目前是否已掛載 XDP,並辨識模式 (xdp / xdpgeneric / xdpoffload)
# 請將 eth0 替換為你的實際網卡名稱;部分系統查詢 bpftool 需具備 CAP_BPF 或 sudo 權限
ip -details link show dev eth0
sudo bpftool net show

# 步驟 2(唯讀):觀察各 CPU 核心的軟中斷收包積壓與網卡硬體統計
# /proc/net/softnet_stat 第 1 欄為處理總數、第 2 欄為時間耗盡或佇列滿載丟包數(十六進位)
cat /proc/net/softnet_stat
ethtool -S eth0 | grep -iE "xdp|drop|rx_missed"

若你想進一步編寫與測試自己的 XDP 程式,下方的精簡 C 骨架(僅作機制說明範例,未在本文執行的主機上實測跑分)展示了 eBPF Verifier 強制要求的雙層指標邊界檢查:只要封包長度不足以容納 Ethernet 標頭,就安全退回 XDP_PASS;確認屬於特定規則時才回傳 XDP_DROP。

If you plan to write and test an XDP filter, the minimal C skeleton below (illustrative example only—no unverified benchmark claims) demonstrates the mandatory verifier bounds check: if the packet cannot hold a full Ethernet header, safely return XDP_PASS; otherwise apply your filter logic before deciding to return XDP_DROP.

/* 教學骨架範例:展示 XDP 指標邊界檢查與裁決邏輯(須以 clang -O2 -target bpf 編譯) */
#include <linux/bpf.h>
#include <linux/if_ether.h>
#include <bpf/bpf_helpers.h>

SEC("xdp")
int xdp_drop_demo(struct xdp_md *ctx)
{
    void *data     = (void *)(long)ctx->data;
    void *data_end = (void *)(long)ctx->data_end;

    struct ethhdr *eth = data;
    /* Verifier 必備邊界檢查:絕不可省略,否則載入時會被核心拒絕 */
    if ((void *)(eth + 1) > data_end)
        return XDP_PASS;

    /* 實務上可在此解析 IP/UDP 標頭並查詢 BPF_MAP_TYPE_HASH 黑名單決定 XDP_DROP */
    return XDP_PASS;
}
char _license[] SEC("license") = "GPL";

寫入操作影響與安全提醒:日後若要在測試機實際掛載或卸載 XDP 程式,請先用 ip netns 與 veth 建立隔離網路命名空間驗證,不要直接在遠端正式主機的主要 SSH 網卡上實驗,以免邏輯誤判導致所有封包被 XDP_DROP 而鎖死遠端連線。在測試介面掛載時,sudo ip link set dev veth0 xdpdrv obj prog.o sec xdp 會啟用驅動原生模式(若驅動不支援將報錯,可改用 xdpgeneric 做功能測試),卸載則以 sudo ip link set dev veth0 xdp off 恢復原本收包路徑。

Write-Operation Impact & Safety Warning: When you later attach or detach an XDP program on a test machine, always validate inside an isolated ip netns + veth pair first instead of attaching directly to a remote production host's SSH interface—a buggy XDP_DROP rule will immediately lock you out. On a test interface, sudo ip link set dev veth0 xdpdrv obj prog.o sec xdp enforces native driver mode (failing explicitly if unsupported, whereas xdpgeneric works for functional testing), and sudo ip link set dev veth0 xdp off restores the standard receive path.

總結回顧:回到一開始終端機裡 %si 飆高的場景,現在你已經能準確分辨問題出在哪一層——不是 nftables 規則沒生效,而是封包走到 Netfilter 前早已付出 sk_buff 配置與核心收包堆疊的代價。先用 ip -details link 與 /proc/net/softnet_stat 看清現況,確認網卡支援原生 xdpdrv,再把無狀態過濾交給 XDP、有狀態策略留給 Netfilter,才能讓 Linux 主機在高壓流量下依然保住 CPU 與記憶體餘裕。

Takeaway: Returning to that spiking %si terminal screen, you can now pinpoint the real bottleneck: nftables is not failing to drop packets—the stack simply paid for sk_buff allocation long before Netfilter ran. Inspect first with ip -details link and /proc/net/softnet_stat, verify native xdpdrv support, and pair stateless XDP shedding with stateful Netfilter rules to preserve CPU and memory headroom under flood conditions.

工程師桌面選品 工作站與除錯桌面好物:線材整理、人體工學與實用周邊

長時間追蹤 Linux 核心原始碼、排查網路封包與壓測邊緣設備,整齊穩定的桌面收納與舒適周邊能讓除錯更專注順手。有需要整理工作站裝備時,可透過下方連結前往蝦皮查看熱門選品。

※ 利益揭露:本卡片包含蝦皮分潤合作連結,若您透過連結成立有效訂單,本站可能獲得微薄分潤收益以支持持續撰寫原創技術拆解;商品價格與庫存請以蝦皮賣場頁面為準。

導流與延伸閱讀 / Related Articles

參考資料與官方文獻 / References

  1. Linux Kernel Source Tree (v6.18.55):include/uapi/linux/bpf.h(L6506, L6513–6519)、include/net/xdp.h(L74–107, L689–703)、drivers/net/veth.c(L647–679)、net/core/dev.c(L4422–4433, L5500–5612, L5901–6018)、net/ipv4/ip_input.c(L573, L642)。本機原始碼查核日期:2026-12-02 (Asia/Taipei)。
  2. Linux Kernel linux-next Source Tree (v7.3.0-rc6):include/uapi/linux/bpf.h(L6698, L6705–6711)、include/net/xdp.h(L86–112 新增 xdp_reinit_buff(), L694–708)、net/core/dev.c(L5707–5819, L6103–6155)。本機原始碼查核日期:2026-12-02 (Asia/Taipei)。
  3. The Linux Kernel Documentation:BPF Documentation(查核日期:2026-12-02)。
  4. The Linux Kernel Documentation:AF_XDP(查核日期:2026-12-02)。
  5. The Linux Kernel Documentation:XDP RX Metadata(查核日期:2026-12-02)。
  6. Linux man-pages:ip-link(8) — network device configuration (xdp/xdpdrv/xdpgeneric)(查核日期:2026-12-02)。
  7. eBPF Foundation:What is eBPF?(查核日期:2026-12-02)。

留言

這個網誌中的熱門文章

kimiflare:將 Moonshot Kimi-K2.6 直接部署於 Cloudflare 的終端 AI 編碼助手 | kimiflare: A Terminal Coding Agent Powered by Moonshot Kimi-K2.6 on Cloudflare

無需中繼,在你的 Cloudflare 帳戶中直接運行強大的 Kimi 終端編碼智能體。 | No middleman, run the powerful Kimi terminal coding agent directly on your own Cloudflare account. 🔎 工具速覽 / AT A GLANCE Category AI Coding Agent / Developer Tool Pricing Free (Open-weight model / Cloudflare Workers AI pricing) BestFor Developers seeking a private, high-context terminal AI assistant with direct infrastructure control. GitHub Stars ⭐ 36 🚀 引言 / Introduction kimiflare 是一款為開發者量身打造的終端編碼智能體,它將 Moonshot 的 1 兆參數開源模型 Kimi-K2.6 與 Cloudflare Workers AI 完美結合。不同於傳統 AI 工具,kimiflare 讓流量直接在你的 Cloudflare 帳戶中流動,徹底擺脫第三方代理或 AI 閘道的束縛,實現最高等級的控制力與隱私。 | kimiflare is a terminal coding agent tailored for developers, seamlessly combining Moonshot's 1T-parameter open-source model Kimi-K2.6 with Cloudflare Workers AI. Unlike traditional AI tools, kimiflare routes traffic directly through your Cloudflare account, eliminating the n...

text-to-cad: 讓 AI 驅動的參數化 CAD 建模成為現實 / text-to-cad: Bringing AI-Driven Parametric CAD Modeling to Reality

一個讓 AI 代理能生成、預覽並迭代 3D CAD 模型的開源框架 / An open-source harness for AI agents to generate, preview, and iterate 3D CAD models. 🔎 工具速覽 / AT A GLANCE Category AI-Powered CAD Tooling / AI 驅動 CAD 工具 Pricing Free (Open Source) / 免費(開源) BestFor Robotics engineers and product designers using AI coding agents / 使用 AI 程式碼代理的機器人工程師與產品設計師 GitHub Stars ⭐ 93 🚀 引言 / Introduction text-to-cad 是一個強大的開源框架,旨在填補大型語言模型(LLM)與專業 3D 建模之間的鴻溝。它允許開發者利用 Claude Code 或 Codex 等 AI 代理,透過程式碼生成精確的參數化幾何模型,並提供即時預覽與迭代能力。 text-to-cad is a powerful open-source harness designed to bridge the gap between Large Language Models (LLMs) and professional 3D modeling. It enables developers to leverage AI agents like Claude Code or Codex to generate precise parametric geometry via code, providing real-time preview and iteration capabilities. 🛠️ 核心功能 / Key Features 與 Codex 或 Claude Code 等代理...

Orca Skills: 開源賦能,加速雲安全工作流

加速雲安全工作流 - Orca Skills 整合多種工具與插件,打造高效安全環境 | Accelerate Cloud Security Workflows with Orca Skills, a Suite of Tools and Plugins 🔎 工具速覽 / AT A GLANCE Category 开源安全工具 Pricing 开源免费 BestFor 雲安全团队、DevSecOps工程师 GitHub Stars ⭐ 33 🚀 引言 / Introduction 在雲端環境中,確保安全不僅是一種技術挑戰,更是對工作效率的一場考驗。Orca Skills 是一款專為加速 Orca 云平台安全工作流而設計的开源插件工具包。透過整合多種工具和插件,幫助我們在複雜的安全環境下保持高效率。 🛠️ 核心功能 / Key Features Orca Skills 提供了一系列功能強大的安全工作流工具,包括警報處理、影響分析、配置源頭追溯等。這些工具不僅能夠幫助我們快速定位問題,還能確保在解決問題時避免造成不必要的後續問題。 💡 技術亮點 / Tech Highlights Orca Skills 真正的亮點在于其開放性與兼容性。它不僅支持Anthropic Claude Code、Cursor 和 Codex,還能夠與 MCP(Orca Security)集成,為安全團隊提供全面的支持。 📦 快速上手 / Quick Start 要快速開始使用 Orca Skills,首先需要安裝所需環境和工具。接下來,配置 MCP 以實現與 Orca Cloud Platform 的集成。最後,測試各個技能插件以確保其正常運行。 中英文對照: 要快速開始使用 Orca Skills 首先需要安裝所需環境和工具 接著配置 MCP 以實現與 Orca 云平台的集成 最...