diff --git a/pkg/transports/connecting/dtls/dnat.go b/pkg/transports/connecting/dtls/dnat.go index a08770b7..9f789d50 100644 --- a/pkg/transports/connecting/dtls/dnat.go +++ b/pkg/transports/connecting/dtls/dnat.go @@ -47,19 +47,15 @@ func newDNAT() (*dnat, error) { flags := IFF_TUN | IFF_NO_PI binary.LittleEndian.PutUint16(ifreq[0x10:], uint16(flags)) - fmt.Printf("fd: %v\n", tun.Fd()) _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, tun.Fd(), uintptr(TUNSETIFF), uintptr(unsafe.Pointer(&ifreq[0]))) if errno != 0 { tun.Close() return nil, errno } - fmt.Printf("fd after tun: %v\n", tun.Fd()) // Get the interface name name := string(ifreq[:bytes.IndexByte(ifreq[:], 0)]) - fmt.Println("Interface Name:", name) - // Bring the interface up err = setUp(tun, name) if err != nil { diff --git a/pkg/transports/connecting/dtls/dtls.go b/pkg/transports/connecting/dtls/dtls.go index 43d40ed5..e856b1ea 100644 --- a/pkg/transports/connecting/dtls/dtls.go +++ b/pkg/transports/connecting/dtls/dtls.go @@ -20,7 +20,6 @@ const listenPort = 41245 type Transport struct { dnat *dnat dtlsListener *dtls.Listener - unregLogger func(*net.IP) logDialSuccess func(*net.IP) logListenSuccess func(*net.IP) } @@ -56,9 +55,10 @@ func NewTransport(logAuthFail func(*net.IP), logOtherFail func(*net.IP), logDial } return &Transport{ - dnat: dnat, - dtlsListener: listener, - unregLogger: logAuthFail, + dnat: dnat, + dtlsListener: listener, + logDialSuccess: logDialSuccess, + logListenSuccess: logListenSuccess, }, nil }