ghking6
V2EX  ›  Windows

VibeCoding 了个 无需后台服务的 Windows 极简防火墙 netblock

  •  
  •   ghking6 · May 26 · 448 views

    特性介绍

    AI 友好的命令行接口 直接使用 Windows 底层接口,无需后台服务 不依赖 windows 防火墙,即使防火墙是关的也能生效

    使用方法

    C:\Windows\System32>netblock.exe -h

    netblock <command> [options]
    
    Commands:
      add    Add a blocking/filtering rule
      del    Delete rule(s)
      list   List all rules managed by netblock
    
    Options for 'add':
      -n <name>         Rule name (for later management; default: auto-generated UUID)
      -p <path>         Program absolute path (include .exe; default: all programs)
      -a <ip/cidr>      Remote IP address (IPv4/IPv6, e.g. 192.168.1.1 or 2001:db8::/32)
      -l <port|range>   Local port (e.g. 80; 8000-9000; 81,82,83; 81,82-85; default: all)
      -r <port|range>   Remote port (same format as -l; default: all)
      -e <block|allow>  Action (default: block)
      -d <in|out|both>  Traffic direction (default: both)
      -t                Set as temporary rule (default: persistent)
    
    Options for 'del':
      -n <name>         Delete by rule name (recommended)
      -p <path>         Delete all rules matching this program path (batch)
    
    Note: 'add' requires at least one filter condition (-p, -a, -l, or -r).
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5862 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 03:33 · PVG 11:33 · LAX 20:33 · JFK 23:33
    ♥ Do have faith in what you're doing.