github.com/kelleygo/clashcore@v1.0.2/transport/gun/transport.go (about)

     1  package gun
     2  
     3  import (
     4  	"golang.org/x/net/http2"
     5  	"net"
     6  )
     7  
     8  type TransportWrap struct {
     9  	*http2.Transport
    10  	remoteAddr net.Addr
    11  	localAddr  net.Addr
    12  }
    13  
    14  func (tw *TransportWrap) RemoteAddr() net.Addr {
    15  	return tw.remoteAddr
    16  }
    17  
    18  func (tw *TransportWrap) LocalAddr() net.Addr {
    19  	return tw.localAddr
    20  }