macronut / ghostcp

GhosTCP is a program for Windows that protects the TCP connections from being interfered.
GNU Lesser General Public License v3.0
837 stars 164 forks source link

how to build it #42

Closed NatsumiXD closed 1 year ago

NatsumiXD commented 1 year ago

how to build it

NatsumiXD commented 1 year ago

我使用 go build main.go编译成功 但是运行main.exe时报出以下错误

panic: Failed to load WinDivert.dll: The specified module could not be found.

goroutine 1 [running]:
syscall.(*LazyProc).mustFind(...)
        D:/Program Files/Go/src/syscall/dll_windows.go:293
syscall.(*LazyProc).Call(0xc00010d890, {0xc000010760, 0x4, 0x4})
        D:/Program Files/Go/src/syscall/dll_windows.go:309 +0x65
github.com/macronut/godivert.WinDivertOpen({0xc000010720?, 0x1e?}, 0x0, 0x1, 0x0)
        C:/Users/Natsumi/go/pkg/mod/github.com/macronut/godivert@v0.0.0-20200223163208-e0ee08361ab9/windivert.go:95 +0xad
github.com/macronut/ghostcp/header.TCPDaemon({0x435112, 0x4}, 0x0)
        D:/Users/Natsumi/Documents/GitHub/GhostTCP-SUTO-CONF/bin/header/tcp.go:501 +0x30b
main.StartService()
        D:/Users/Natsumi/Documents/GitHub/GhostTCP-SUTO-CONF/bin/main.go:63 +0x35d
main.main()
        D:/Users/Natsumi/Documents/GitHub/GhostTCP-SUTO-CONF/bin/main.go:175 +0x554

如何才能正确编译它

ghost commented 1 year ago

The log says WinDivert.dll is not found, you can download WinDivert.dll from here: https://github.com/basil00/Divert/releases/v1.4.3

NatsumiXD commented 1 year ago

The log says WinDivert.dll is not found, you can download WinDivert.dll from here: https://github.com/basil00/Divert/releases/v1.4.3

我解决了,另一个问题是,我应该如何才能编译 runas administrator 的EXE程序

yfdyh000 commented 1 year ago

The log says WinDivert.dll is not found, you can download WinDivert.dll from here: https://github.com/basil00/Divert/releases/v1.4.3

我解决了,另一个问题是,我应该如何才能编译 runas administrator 的EXE程序

go build tcpioneer.syso与UAC相关

NatsumiXD commented 1 year ago

解决了