Skip to content

Commit 783edd0

Browse files
committed
decoy-reg: replace functions to gen new
1 parent 3d1392a commit 783edd0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/registrars/decoy-registrar/decoy-registrar.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ type DecoyRegistrar struct {
5858
FspKey, FspIv, VspKey, VspIv, NewMasterSecret []byte
5959
}
6060

61+
func NewDecoyRegistrar() *DecoyRegistrar {
62+
return &DecoyRegistrar{
63+
logger: td.Logger(),
64+
}
65+
}
66+
67+
func NewDecoyRegistrarWithDialer(dialer DialFunc) *DecoyRegistrar {
68+
return &DecoyRegistrar{
69+
dialContex: dialer,
70+
logger: td.Logger(),
71+
}
72+
}
73+
6174
func (r *DecoyRegistrar) setTCPToDecoy(tcprtt *uint32) {
6275
r.m.Lock()
6376
defer r.m.Unlock()

0 commit comments

Comments
 (0)