Documentation
¶
Index ¶
- func ConnectDestination(ctx context.Context, logger logger.ContextLogger, controlFunc control.Func, ...) (tun.DirectRouteDestination, error)
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) IsClosed() bool
- func (c *Conn) ReadICMP(buffer *buf.Buffer) error
- func (c *Conn) ReadIP(buffer *buf.Buffer) error
- func (c *Conn) SetLocalAddr(addr netip.Addr)
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) WriteICMP(buffer *buf.Buffer) error
- func (c *Conn) WriteIP(buffer *buf.Buffer) error
- type ContextDestinationWriter
- type Destination
- type DestinationWriter
- type SourceRewriter
- type UnprivilegedConn
- func (c *UnprivilegedConn) Close() error
- func (c *UnprivilegedConn) LocalAddr() net.Addr
- func (c *UnprivilegedConn) Read(b []byte) (n int, err error)
- func (c *UnprivilegedConn) ReadMsg(b []byte, oob []byte) (n, oobn int, addr netip.Addr, err error)
- func (c *UnprivilegedConn) RemoteAddr() net.Addr
- func (c *UnprivilegedConn) SetDeadline(t time.Time) error
- func (c *UnprivilegedConn) SetReadDeadline(t time.Time) error
- func (c *UnprivilegedConn) SetWriteDeadline(t time.Time) error
- func (c *UnprivilegedConn) Write(b []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) SetLocalAddr ¶
type ContextDestinationWriter ¶
type ContextDestinationWriter struct {
tun.DirectRouteContext
// contains filtered or unexported fields
}
func NewContextDestinationWriter ¶
func NewContextDestinationWriter(context tun.DirectRouteContext, destination netip.Addr) *ContextDestinationWriter
func (*ContextDestinationWriter) WritePacket ¶
func (w *ContextDestinationWriter) WritePacket(packet []byte) error
type Destination ¶
type Destination struct {
// contains filtered or unexported fields
}
func (*Destination) Close ¶
func (d *Destination) Close() error
func (*Destination) IsClosed ¶
func (d *Destination) IsClosed() bool
func (*Destination) WritePacket ¶
func (d *Destination) WritePacket(packet *buf.Buffer) error
type DestinationWriter ¶
type DestinationWriter struct {
tun.DirectRouteDestination
// contains filtered or unexported fields
}
func NewDestinationWriter ¶
func NewDestinationWriter(routeDestination tun.DirectRouteDestination, destination netip.Addr) *DestinationWriter
func (*DestinationWriter) WritePacket ¶
func (w *DestinationWriter) WritePacket(packet *buf.Buffer) error
type SourceRewriter ¶
type SourceRewriter struct {
// contains filtered or unexported fields
}
func NewSourceRewriter ¶
func NewSourceRewriter(ctx context.Context, logger logger.ContextLogger, inet4Address netip.Addr, inet6Address netip.Addr) *SourceRewriter
func (*SourceRewriter) CreateSession ¶
func (m *SourceRewriter) CreateSession(session tun.DirectRouteSession, context tun.DirectRouteContext)
func (*SourceRewriter) DeleteSession ¶
func (m *SourceRewriter) DeleteSession(session tun.DirectRouteSession)
func (*SourceRewriter) RewritePacket ¶
func (m *SourceRewriter) RewritePacket(packet []byte)
type UnprivilegedConn ¶
type UnprivilegedConn struct {
// contains filtered or unexported fields
}
func (*UnprivilegedConn) Close ¶
func (c *UnprivilegedConn) Close() error
func (*UnprivilegedConn) LocalAddr ¶
func (c *UnprivilegedConn) LocalAddr() net.Addr
func (*UnprivilegedConn) RemoteAddr ¶
func (c *UnprivilegedConn) RemoteAddr() net.Addr
func (*UnprivilegedConn) SetDeadline ¶
func (c *UnprivilegedConn) SetDeadline(t time.Time) error
func (*UnprivilegedConn) SetReadDeadline ¶
func (c *UnprivilegedConn) SetReadDeadline(t time.Time) error
func (*UnprivilegedConn) SetWriteDeadline ¶
func (c *UnprivilegedConn) SetWriteDeadline(t time.Time) error
Click to show internal directories.
Click to hide internal directories.