The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
e9f0accf08912a27

大家有使用过 go 的 go-ole 库操作 windows 防火墙规则修改和禁用么

  •  
  •   e9f0accf08912a27 · Dec 8, 2023 · 1903 views
    This topic created in 888 days ago, the information mentioned may be changed or developed.

    大家有使用过 go 的 go-ole 库操作 windows 防火墙规则修改和禁用么 搞了很久实现不了,不知道有没大佬写过这样的需求

    8 replies    2023-12-13 18:12:16 +08:00
    Curtion
        1
    Curtion  
       Dec 8, 2023
    我是直接调用的 netsh 命令行来操作防火墙
    czyt
        2
    czyt  
       Dec 8, 2023
    tailscale 有
    sky96111
        3
    sky96111  
       Dec 8, 2023 via Android
    换个思路,调用 PowerShell 操作防火墙可以吗
    vopsoft
        4
    vopsoft  
       Dec 8, 2023
    禁用防火墙 netsh advfirewall set allprofiles state off
    e9f0accf08912a27
        5
    e9f0accf08912a27  
    OP
       Dec 8, 2023
    @Curtion 现有是这种方式,现在想通过 api 或 com 组件操作
    e9f0accf08912a27
        6
    e9f0accf08912a27  
    OP
       Dec 8, 2023
    @sky96111 PowerShell 执行效率不如 cmd 命令
    e9f0accf08912a27
        7
    e9f0accf08912a27  
    OP
       Dec 8, 2023
    当前用 https://github.com/iamacarpet/go-win64api 实现了一部分功能
    auuuny4
        8
    auuuny4  
       Dec 13, 2023
    直接调 win32 api 开搞
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4642 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 00:11 · PVG 08:11 · LAX 17:11 · JFK 20:11
    ♥ Do have faith in what you're doing.