mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
all: add client id preference config param
So client can chose how client id is generated.
This commit is contained in:
committed by
Cuong Manh Le
parent
c3ff8182af
commit
7591a0ccc6
@@ -67,6 +67,7 @@ func (p *prog) serveDNS(listenerNum string) error {
|
||||
reqId := requestID()
|
||||
remoteIP, _, _ := net.SplitHostPort(w.RemoteAddr().String())
|
||||
ci := p.getClientInfo(remoteIP, m)
|
||||
ci.ClientIDPref = p.cfg.Service.ClientIDPref
|
||||
stripClientSubnet(m)
|
||||
remoteAddr := spoofRemoteAddr(w.RemoteAddr(), ci)
|
||||
fmtSrcToDest := fmtRemoteToLocal(listenerNum, remoteAddr.String(), w.LocalAddr().String())
|
||||
|
||||
Reference in New Issue
Block a user