feat: Expose remote destination (udp proxy maybe domain of node)
This commit is contained in:
20
transport/gun/transport.go
Normal file
20
transport/gun/transport.go
Normal file
@ -0,0 +1,20 @@
|
||||
package gun
|
||||
|
||||
import (
|
||||
"golang.org/x/net/http2"
|
||||
"net"
|
||||
)
|
||||
|
||||
type TransportWrap struct {
|
||||
*http2.Transport
|
||||
remoteAddr net.Addr
|
||||
localAddr net.Addr
|
||||
}
|
||||
|
||||
func (tw *TransportWrap) RemoteAddr() net.Addr {
|
||||
return tw.remoteAddr
|
||||
}
|
||||
|
||||
func (tw *TransportWrap) LocalAddr() net.Addr {
|
||||
return tw.localAddr
|
||||
}
|
Reference in New Issue
Block a user