mirror of https://gogs.blitter.com/RLabs/xs
BUILDOPTS passed to client/server makes
This commit is contained in:
parent
c24529a1d4
commit
54396a4e4b
8
Makefile
8
Makefile
|
@ -1,5 +1,13 @@
|
||||||
.PHONY: lint vis clean common client server passwd subpkgs install uninstall reinstall
|
.PHONY: lint vis clean common client server passwd subpkgs install uninstall reinstall
|
||||||
|
|
||||||
|
#ifeq ($(MAKEOPTS),)
|
||||||
|
MAKEOPTS = $(MAKEOPTS)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifeq ($(BUILDOPTS),)
|
||||||
|
BUILDOPTS = $(BUILDOPTS)
|
||||||
|
#endif
|
||||||
|
|
||||||
SUBPKGS = logger spinsult hkexnet
|
SUBPKGS = logger spinsult hkexnet
|
||||||
TOOLS = hkexpasswd hkexsh hkexshd
|
TOOLS = hkexpasswd hkexsh hkexshd
|
||||||
SUBDIRS = $(LIBS) $(TOOLS)
|
SUBDIRS = $(LIBS) $(TOOLS)
|
||||||
|
|
|
@ -70,7 +70,7 @@ type (
|
||||||
|
|
||||||
// Conn is a connection wrapping net.Conn with KEX & session state
|
// Conn is a connection wrapping net.Conn with KEX & session state
|
||||||
Conn struct {
|
Conn struct {
|
||||||
kex KEXAlg // KEX/KEM propsal (client -> server)
|
kex KEXAlg // KEX/KEM proposal (client -> server)
|
||||||
m *sync.Mutex // (internal)
|
m *sync.Mutex // (internal)
|
||||||
c *net.Conn // which also implements io.Reader, io.Writer, ...
|
c *net.Conn // which also implements io.Reader, io.Writer, ...
|
||||||
immClose bool
|
immClose bool
|
||||||
|
|
|
@ -331,8 +331,8 @@ func (hc *Conn) StartServerTunnel(lport, rport uint16) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*hc.tuns)[rport].KeepAlive > 50 {
|
if (*hc.tuns)[rport].KeepAlive > 50 {
|
||||||
(*hc.tuns)[rport].Died = true
|
(*hc.tuns)[rport].Died = true
|
||||||
logger.LogDebug("[ServerTun] worker A: Client died, hanging up.")
|
logger.LogDebug("[ServerTun] worker A: Client died, hanging up.")
|
||||||
} else {
|
} else {
|
||||||
(*hc.tuns)[rport].KeepAlive += 1
|
(*hc.tuns)[rport].KeepAlive += 1
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ EXTPKGS = bytes,errors,flag,fmt,internal,io,log,net,os,path,runtime,time,strings
|
||||||
EXE = $(notdir $(shell pwd))
|
EXE = $(notdir $(shell pwd))
|
||||||
|
|
||||||
all:
|
all:
|
||||||
go build .
|
go build $(BUILDOPTS) .
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(EXE) $(EXE).exe
|
$(RM) $(EXE) $(EXE).exe
|
||||||
|
|
|
@ -4,7 +4,7 @@ EXTPKGS = binary,bytes,crypto,encoding,errors,flag,fmt,internal,io,log,net,os,pa
|
||||||
EXE = $(notdir $(shell pwd))
|
EXE = $(notdir $(shell pwd))
|
||||||
|
|
||||||
all:
|
all:
|
||||||
go build .
|
go build $(BUILDOPTS) .
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(EXE) $(EXE).exe
|
$(RM) $(EXE) $(EXE).exe
|
||||||
|
|
Loading…
Reference in New Issue