×
win10系统中编译github网站上的go项目(以lunnel-0.1.6为例)
  • 分类:笔记
  • 发表:2020-11-03

1、安装go1.15.3.windows-amd64,环境变量:GOROOT=C:\Go、GOPATH=C:\mygopath
2、安装goland-2020.2.3.exe,利用其Terminal窗口代替windows命令行 cmd
3、安装mingw5.1.6,修改环境变量:用户变量Path中增加C:\MinGW\bin
并将C:\MinGW\bin\mingw32-make.exe复制、粘贴、改名为make.exe
4、Go设置代理环境(便于无障碍下载github网站上的go项目):
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io,direct
5、在goland的Terminal窗口下载go项目lunnel-0.1.6
go get -u github.com/longXboy/lunnel
(get加上-u可以利用网络来更新已有的代码包及其依赖包)
C:\>go get -u github.com/longXboy/lunnel
go: downloading github.com/longXboy/lunnel v0.1.6
go: github.com/longXboy/lunnel upgrade => v0.1.6
下载后lunnel所在的文件夹为
C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6
6、编译go项目lunnel
运行
cd C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6
make
结果如下:
C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6>make
go build -o bin/server/lunnelSer ./cmd/lunnelSer
go: cannot find main module, but found Gopkg.lock in C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6
        to create a module there, run:
        go mod init
make: *** [lunelSer] Error 1

出错处理:
1)按照提示输入:
go mod init github.com/longXboy/lunnel
得到
C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6>go mod init github.com/longXboy/lunnel
go: creating new go.mod: module github.com/longXboy/lunnel
go: copying requirements from Gopkg.lock
go: converting Gopkg.lock: stat github.com/yvasiyarov/newrelic_platform_go@9c099fbc30e90de5bb5c5f94aa5fd08f2daeaacd: git init --bare in C:\mygopath\pkg\
mod\cache\vcs\6d9c244fe338a1b204ac92d7c867b100adbad56a4f562639d0ffe34e2de5a1f9: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/xtaci/kcp-go@046e70a5d264539b9a176766f2535c1828b10606: git init --bare in C:\mygopath\pkg\mod\cache\vcs\1b488
1e5089a17519bd6f7f8e60704c119229bda6c506c0b37b14019b8a59727: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/klauspost/reedsolomon@5abf0ee302ccf4834e84f63ff74eca3e8b88e4e2: git init --bare in C:\mygopath\pkg\mod\cache\
vcs\26871bfe5c3d52ea5abd32affeabc22890fced4af761fe9fdf32b708b6c5e0cf: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/Sirupsen/logrus@v0.11.5: git init --bare in C:\mygopath\pkg\mod\cache\vcs\7ba5f22b7e61796c21265ec71d60ba7d8bf
a96f0025884ac5038bd90abb04fff: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/klauspost/cpuid@09cded8978dc9e80714c4d85b0322337b0a1e5e0: git init --bare in C:\mygopath\pkg\mod\cache\vcs\7d
314923ef34c8dcc5ae2aed0a0aa313627e4cf88db142be752f8f42a2dd7b17: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/certifi/gocertifi@a9c833d2837d3b16888d55d5aafa9ffe9afb22b0: git init --bare in C:\mygopath\pkg\mod\cache\vcs\
b1268f269359ab8a0140dcc908ac00d767d7cf95d6064a9fa5feec6d8cb2a1af: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/longXboy/smux@e3fa4fcc3f033962e39fad06942e48552f8312c2: git init --bare in C:\mygopath\pkg\mod\cache\vcs\97c9
3bc2a403c67d44fbaa810ecf11b9931ec1e69c50bff9d79f162fce1a1146: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/e-dard/netbug@e64d308a0b205c901264e88a10e70d64acb1810d: git init --bare in C:\mygopath\pkg\mod\cache\vcs\4619
c573f1b89bf79b92f0d92bb5dc34e5287b0b005c98962863e66b52cbded9: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/satori/go.uuid@v1.1.0: git init --bare in C:\mygopath\pkg\mod\cache\vcs\c0b9f4175d353667d06a1a3aba510d10e374f
e0856d048b3b7438b9c6528e421: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/gin-gonic/gin@v1.1.3: git init --bare in C:\mygopath\pkg\mod\cache\vcs\a923aa3ae357f66c754ef34c3358c689f5d969
293b012aef737373496ea3eef3: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/klauspost/compress@e80ca55b53e5e6f53deed5c7842e7b7da95e1dc7: git init --bare in C:\mygopath\pkg\mod\cache\vcs
\989396631dc2da7a05f26cf7f05a74670d605da0b4e34ab1200ad21a02c635aa: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/yvasiyarov/go-metrics@c25f46c4b94079672242ec48a545e7ca9ebe3aec: git init --bare in C:\mygopath\pkg\mod\cache\
vcs\ee7be657aeaaae6f262b697d3b48f7475dd2214709c743a4275b39a55af2bd11: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/getsentry/raven-go@4fa2ac0d29f801e79a063c0da82d37b5ff2873b2: git init --bare in C:\mygopath\pkg\mod\cache\vcs
\b75cd244ed93b82cecc713d279fbc665e99557edc633eefe7f5b79d3dc8b6d79: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/mattn/go-isatty@v0.0.2: git init --bare in C:\mygopath\pkg\mod\cache\vcs\bdb8c6288a8e64a77296034f2952a351f8e8
7de621b3ba63a03bc5f4151e39b1: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/golang/protobuf@7a211bcf3bce0e3f1d74f9894916e6f116ae83b4: git init --bare in C:\mygopath\pkg\mod\cache\vcs\6e
18cbff36266c74e48dd81b4b672026ac74fb69c838ddb6240f256bb8edf590: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/manucorporat/sse@ee05b128a739a0fb76c7ebd3ae4810c1de808d6d: git init --bare in C:\mygopath\pkg\mod\cache\vcs\b
bde5de09e1d9964f2349c731010c8127fee1c490fa4841ae24bca1e5d711a15: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/yvasiyarov/gorelic@ae09aa139a2b7f638e2412baceaceebd41eff115: git init --bare in C:\mygopath\pkg\mod\cache\vcs
\db4fe34ed1e627139d37d5c910f357294d5f0a851bc8ab1e564e8fe9c7be564d: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/pkg/errors@c605e284fe17294bda444b34710735b29d1a9d90: git init --bare in C:\mygopath\pkg\mod\cache\vcs\6d82bc6
342f8104a35e27089637bd09e9cdb9402f044a75aeb6d5a73e50dad6c: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat gopkg.in/yaml.v2@cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b: git init --bare in C:\mygopath\pkg\mod\cache\vcs\748bced43cf7
672b862fbc52430e98581510f4f2c34fb30c0064b7102a68ae2c: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat gopkg.in/go-playground/validator.v8@v8.18.1: git init --bare in C:\mygopath\pkg\mod\cache\vcs\235362ddb722e85e6832095f1e
6d45d892dc268d11cba9e7849a97368178a73e: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat gopkg.in/gin-gonic/gin.v1@v1.1.4: git init --bare in C:\mygopath\pkg\mod\cache\vcs\257ceaf06d0f1fc51019cb84c2f169dc2fc82
d566f2ca4a83623b705ecc84920: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat golang.org/x/net@7dcfb8076726a3fdd9353b6b8a1f1b6be6811bd6: unrecognized import path "golang.org/x/net": https fetch: Get
 "https://golang.org/x/net?go-get=1": dial tcp: lookup golang.org: getaddrinfow: This is usually a temporary error during hostname resolution and means
that the local server did not receive a response from an authoritative server.
go: converting Gopkg.lock: stat golang.org/x/sys@a55a76086885b80f79961eacb876ebd8caf3868d: unrecognized import path "golang.org/x/sys": https fetch: Get
 "https://golang.org/x/sys?go-get=1": dial tcp: lookup golang.org: getaddrinfow: This is usually a temporary error during hostname resolution and means
that the local server did not receive a response from an authoritative server.
go: converting Gopkg.lock: stat golang.org/x/crypto@7e9105388ebff089b3f99f0ef676ea55a6da3a7e: unrecognized import path "golang.org/x/crypto": https fetc
h: Get "https://golang.org/x/crypto?go-get=1": dial tcp: lookup golang.org: getaddrinfow: This is usually a temporary error during hostname resolution a
nd means that the local server did not receive a response from an authoritative server.
自动生成go.mod文件。
删除go.mod,连上VPN,再次运行
go mod init github.com/longXboy/lunnel
得到
C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6>go mod init github.com/longXboy/lunnel
go: creating new go.mod: module github.com/longXboy/lunnel
go: copying requirements from Gopkg.lock
go: converting Gopkg.lock: stat github.com/yvasiyarov/newrelic_platform_go@9c099fbc30e90de5bb5c5f94aa5fd08f2daeaacd: git init --bare in C:\mygopath\pkg\
mod\cache\vcs\6d9c244fe338a1b204ac92d7c867b100adbad56a4f562639d0ffe34e2de5a1f9: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/longXboy/smux@e3fa4fcc3f033962e39fad06942e48552f8312c2: git init --bare in C:\mygopath\pkg\mod\cache\vcs\97c9
3bc2a403c67d44fbaa810ecf11b9931ec1e69c50bff9d79f162fce1a1146: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/e-dard/netbug@e64d308a0b205c901264e88a10e70d64acb1810d: git init --bare in C:\mygopath\pkg\mod\cache\vcs\4619
c573f1b89bf79b92f0d92bb5dc34e5287b0b005c98962863e66b52cbded9: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/xtaci/kcp-go@046e70a5d264539b9a176766f2535c1828b10606: git init --bare in C:\mygopath\pkg\mod\cache\vcs\1b488
1e5089a17519bd6f7f8e60704c119229bda6c506c0b37b14019b8a59727: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/klauspost/reedsolomon@5abf0ee302ccf4834e84f63ff74eca3e8b88e4e2: git init --bare in C:\mygopath\pkg\mod\cache\
vcs\26871bfe5c3d52ea5abd32affeabc22890fced4af761fe9fdf32b708b6c5e0cf: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/certifi/gocertifi@a9c833d2837d3b16888d55d5aafa9ffe9afb22b0: git init --bare in C:\mygopath\pkg\mod\cache\vcs\
b1268f269359ab8a0140dcc908ac00d767d7cf95d6064a9fa5feec6d8cb2a1af: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/Sirupsen/logrus@v0.11.5: git init --bare in C:\mygopath\pkg\mod\cache\vcs\7ba5f22b7e61796c21265ec71d60ba7d8bf
a96f0025884ac5038bd90abb04fff: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/klauspost/cpuid@09cded8978dc9e80714c4d85b0322337b0a1e5e0: git init --bare in C:\mygopath\pkg\mod\cache\vcs\7d
314923ef34c8dcc5ae2aed0a0aa313627e4cf88db142be752f8f42a2dd7b17: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/gin-gonic/gin@v1.1.3: git init --bare in C:\mygopath\pkg\mod\cache\vcs\a923aa3ae357f66c754ef34c3358c689f5d969
293b012aef737373496ea3eef3: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/satori/go.uuid@v1.1.0: git init --bare in C:\mygopath\pkg\mod\cache\vcs\c0b9f4175d353667d06a1a3aba510d10e374f
e0856d048b3b7438b9c6528e421: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/klauspost/compress@e80ca55b53e5e6f53deed5c7842e7b7da95e1dc7: git init --bare in C:\mygopath\pkg\mod\cache\vcs
\989396631dc2da7a05f26cf7f05a74670d605da0b4e34ab1200ad21a02c635aa: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/yvasiyarov/go-metrics@c25f46c4b94079672242ec48a545e7ca9ebe3aec: git init --bare in C:\mygopath\pkg\mod\cache\
vcs\ee7be657aeaaae6f262b697d3b48f7475dd2214709c743a4275b39a55af2bd11: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/getsentry/raven-go@4fa2ac0d29f801e79a063c0da82d37b5ff2873b2: git init --bare in C:\mygopath\pkg\mod\cache\vcs
\b75cd244ed93b82cecc713d279fbc665e99557edc633eefe7f5b79d3dc8b6d79: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/mattn/go-isatty@v0.0.2: git init --bare in C:\mygopath\pkg\mod\cache\vcs\bdb8c6288a8e64a77296034f2952a351f8e8
7de621b3ba63a03bc5f4151e39b1: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/golang/protobuf@7a211bcf3bce0e3f1d74f9894916e6f116ae83b4: git init --bare in C:\mygopath\pkg\mod\cache\vcs\6e
18cbff36266c74e48dd81b4b672026ac74fb69c838ddb6240f256bb8edf590: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/manucorporat/sse@ee05b128a739a0fb76c7ebd3ae4810c1de808d6d: git init --bare in C:\mygopath\pkg\mod\cache\vcs\b
bde5de09e1d9964f2349c731010c8127fee1c490fa4841ae24bca1e5d711a15: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/yvasiyarov/gorelic@ae09aa139a2b7f638e2412baceaceebd41eff115: git init --bare in C:\mygopath\pkg\mod\cache\vcs
\db4fe34ed1e627139d37d5c910f357294d5f0a851bc8ab1e564e8fe9c7be564d: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat github.com/pkg/errors@c605e284fe17294bda444b34710735b29d1a9d90: git init --bare in C:\mygopath\pkg\mod\cache\vcs\6d82bc6
342f8104a35e27089637bd09e9cdb9402f044a75aeb6d5a73e50dad6c: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat golang.org/x/net@7dcfb8076726a3fdd9353b6b8a1f1b6be6811bd6: git init --bare in C:\mygopath\pkg\mod\cache\vcs\ed42bd05533f
d84ae290a5d33ebd3695a0a2b06131beebd5450825bee8603aca: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat golang.org/x/crypto@7e9105388ebff089b3f99f0ef676ea55a6da3a7e: git init --bare in C:\mygopath\pkg\mod\cache\vcs\f72f7a6f2
67d2fe79b1e174efab21a591b07c84ef53364f65b8281fda7000b49: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat golang.org/x/sys@a55a76086885b80f79961eacb876ebd8caf3868d: git init --bare in C:\mygopath\pkg\mod\cache\vcs\da0444fc0003
f84a590bd6521553c0531086778bca13ec63ace9e0dd258f4b51: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat gopkg.in/go-playground/validator.v8@v8.18.1: git init --bare in C:\mygopath\pkg\mod\cache\vcs\235362ddb722e85e6832095f1e
6d45d892dc268d11cba9e7849a97368178a73e: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat gopkg.in/yaml.v2@cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b: git init --bare in C:\mygopath\pkg\mod\cache\vcs\748bced43cf7
672b862fbc52430e98581510f4f2c34fb30c0064b7102a68ae2c: exec: "git": executable file not found in %PATH%
go: converting Gopkg.lock: stat gopkg.in/gin-gonic/gin.v1@v1.1.4: git init --bare in C:\mygopath\pkg\mod\cache\vcs\257ceaf06d0f1fc51019cb84c2f169dc2fc82
d566f2ca4a83623b705ecc84920: exec: "git": executable file not found in %PATH%

2)安装Git-2.29.2-64-bit.exe,修改环境变量:用户变量Path中增加C:\Program Files\Git\bin
重启goland,使环境变量修改生效
删除go.mod,连上VPN,再次运行
cd C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6
go mod init github.com/longXboy/lunnel
得到
C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6>go mod init github.com/longXboy/lunnel
go: creating new go.mod: module github.com/longXboy/lunnel
go: copying requirements from Gopkg.lock
生成的go.mod文件如下
module github.com/longXboy/lunnel

go 1.15

require (
 github.com/Sirupsen/logrus v0.11.5
 github.com/certifi/gocertifi v0.0.0-20170417193930-a9c833d2837d
 github.com/e-dard/netbug v0.0.0-20151029172837-e64d308a0b20
 github.com/getsentry/raven-go v0.0.0-20170524220422-4fa2ac0d29f8
 github.com/gin-gonic/gin v1.1.3
 github.com/golang/protobuf v0.0.0-20170523065751-7a211bcf3bce
 github.com/klauspost/compress v1.2.2-0.20170402140618-e80ca55b53e5
 github.com/klauspost/cpuid v0.0.0-20160302075316-09cded8978dc
 github.com/klauspost/reedsolomon v0.0.0-20170219101322-5abf0ee302cc
 github.com/longXboy/smux v1.0.6-0.20170522135849-e3fa4fcc3f03
 github.com/manucorporat/sse v0.0.0-20160126180136-ee05b128a739
 github.com/mattn/go-isatty v0.0.2
 github.com/pkg/errors v0.8.1-0.20170505043639-c605e284fe17
 github.com/satori/go.uuid v1.1.0
 github.com/xtaci/kcp-go v2.0.4-0.20170522045253-046e70a5d264+incompatible
 github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940
 github.com/yvasiyarov/gorelic v0.0.7-0.20160616105035-ae09aa139a2b
 github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9
 golang.org/x/crypto v0.0.0-20170523101029-7e9105388ebf
 golang.org/x/net v0.0.0-20170525011637-7dcfb8076726
 golang.org/x/sys v0.0.0-20170524191247-a55a76086885
 gopkg.in/gin-gonic/gin.v1 v1.1.4
 gopkg.in/go-playground/validator.v8 v8.18.1
 gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e
)
3)再次make,结果如下:
C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6>make
go build -o bin/server/lunnelSer ./cmd/lunnelSer
go: downloading github.com/e-dard/netbug v0.0.0-20151029172837-e64d308a0b20
go: downloading github.com/yvasiyarov/gorelic v0.0.7-0.20160616105035-ae09aa139a2b
go: downloading gopkg.in/yaml.v2 v2.0.0-20170407172122-cd8b52f8269e
go: downloading github.com/getsentry/raven-go v0.0.0-20170524220422-4fa2ac0d29f8
go: downloading golang.org/x/net v0.0.0-20170525011637-7dcfb8076726
go: downloading github.com/pkg/errors v0.8.1-0.20170505043639-c605e284fe17
go: downloading gopkg.in/gin-gonic/gin.v1 v1.1.4
go: downloading github.com/klauspost/compress v1.2.2-0.20170402140618-e80ca55b53e5
go: downloading github.com/xtaci/kcp-go v2.0.4-0.20170522045253-046e70a5d264+incompatible
go: downloading github.com/Sirupsen/logrus v0.11.5
go: downloading github.com/satori/go.uuid v1.1.0
go: downloading github.com/longXboy/smux v1.0.6-0.20170522135849-e3fa4fcc3f03
go: downloading golang.org/x/crypto v0.0.0-20170523101029-7e9105388ebf
go: downloading github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940
go: downloading github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9
go: downloading github.com/certifi/gocertifi v0.0.0-20170417193930-a9c833d2837d
go: downloading github.com/klauspost/reedsolomon v0.0.0-20170219101322-5abf0ee302cc
go: downloading github.com/mattn/go-isatty v0.0.2
go: downloading github.com/gin-gonic/gin v1.1.3
go: downloading gopkg.in/go-playground/validator.v8 v8.18.1
go: downloading github.com/manucorporat/sse v0.0.0-20160126180136-ee05b128a739
go: downloading github.com/golang/protobuf v0.0.0-20170523065751-7a211bcf3bce
go: downloading github.com/klauspost/cpuid v0.0.0-20160302075316-09cded8978dc
process_begin: CreateProcess(NULL, cp ./cmd/lunnelSer/config-example.yml ./bin/server, ...) failed.
make (e=2): 系统找不到指定的文件。
make: *** [lunelSer] Error 2
修改Makefile
去掉只读属性,删除文件中@cp相关部分,变成
export PATH := $(GOPATH)/bin:$(PATH)
export GO15VENDOREXPERIMENT := 1

build: lunelSer lunelCli

lunelCli:
 go build -o bin/client/lunnelCli ./cmd/lunnelCli


lunelSer:
 go build -o bin/server/lunnelSer ./cmd/lunnelSer
testAll:
 go test -v ./util/...
 go test -v ./transport/kcp/...
 go test -v ./crypto/...
 go test -v ./test/...
再次make,顺利通过编译。结果如下:
C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6>make
go build -o bin/server/lunnelSer ./cmd/lunnelSer
go build -o bin/client/lunnelCli ./cmd/lunnelCli

C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6>
在C:\mygopath\pkg\mod\github.com\long!xboy\lunnel@v0.1.6\bin可以找到client和server两个文件夹
将里面的lunnelCli和lunnelSer文件改为lunnelCli.exe和 lunnelSer.exe即可使用。

Top