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

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

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