From f8e68ae1014ea6a7c22cb32fba46511aeff5f3d6 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Tue, 20 Aug 2019 17:21:35 +0100 Subject: [PATCH] Add string method to tunnel --- tunnel/default.go | 4 ++++ tunnel/tunnel.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tunnel/default.go b/tunnel/default.go index 0c0ae43c..e727a11b 100644 --- a/tunnel/default.go +++ b/tunnel/default.go @@ -606,3 +606,7 @@ func (t *tun) Listen(addr string) (Listener, error) { // return the listener return tl, nil } + +func (t *tun) String() string { + return "mucp" +} diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index 3c84c7eb..9388c296 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -19,6 +19,8 @@ type Tunnel interface { Dial(addr string) (Conn, error) // Accept connections Listen(addr string) (Listener, error) + // Name of the tunnel implementation + String() string } // The listener provides similar constructs to the transport.Listener