Documentation
¶
Index ¶
- func ReplaceGlobal(t *Tunnel) func()
- type Tunnel
- func (t *Tunnel) Close()
- func (t *Tunnel) Dialer() proxy.Dialer
- func (t *Tunnel) HandleTCP(conn adapter.TCPConn)
- func (t *Tunnel) HandleUDP(conn adapter.UDPConn)
- func (t *Tunnel) ProcessAsync()
- func (t *Tunnel) SetDialer(dialer proxy.Dialer)
- func (t *Tunnel) SetUDPTimeout(timeout time.Duration)
- func (t *Tunnel) TCPIn() chan<- adapter.TCPConn
- func (t *Tunnel) UDPIn() chan<- adapter.UDPConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceGlobal ¶
func ReplaceGlobal(t *Tunnel) func()
ReplaceGlobal replaces the global Tunnel, and returns a function to restore the original values. It's safe for concurrent use.
Types ¶
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
func T ¶
func T() *Tunnel
T returns the global Tunnel, which can be reconfigured with ReplaceGlobal. It's safe for concurrent use.
func (*Tunnel) ProcessAsync ¶
func (t *Tunnel) ProcessAsync()
ProcessAsync can be safely called multiple times, but will only be effective once.
func (*Tunnel) SetUDPTimeout ¶
Click to show internal directories.
Click to hide internal directories.