Versions in this module Expand all Collapse all v0 v0.1.1 Dec 30, 2024 v0.1.0 Dec 28, 2024 Changes in this version + type Net netTun + func CreateNetTUN(localAddresses, dnsServers []netip.Addr, mtu int) (tun.Device, *Net, error) + func (net *Net) DialContextTCP(ctx context.Context, addr *net.TCPAddr) (*gonet.TCPConn, error) + func (net *Net) DialContextTCPAddrPort(ctx context.Context, addr netip.AddrPort) (*gonet.TCPConn, error) + func (net *Net) DialPing(laddr, raddr *PingAddr) (*PingConn, error) + func (net *Net) DialPingAddr(laddr, raddr netip.Addr) (*PingConn, error) + func (net *Net) DialTCP(addr *net.TCPAddr) (*gonet.TCPConn, error) + func (net *Net) DialTCPAddrPort(addr netip.AddrPort) (*gonet.TCPConn, error) + func (net *Net) DialUDP(laddr, raddr *net.UDPAddr) (*gonet.UDPConn, error) + func (net *Net) DialUDPAddrPort(laddr, raddr netip.AddrPort) (*gonet.UDPConn, error) + func (net *Net) ListenPing(laddr *PingAddr) (*PingConn, error) + func (net *Net) ListenPingAddr(laddr netip.Addr) (*PingConn, error) + func (net *Net) ListenTCP(addr *net.TCPAddr) (*gonet.TCPListener, error) + func (net *Net) ListenTCPAddrPort(addr netip.AddrPort) (*gonet.TCPListener, error) + func (net *Net) ListenUDP(laddr *net.UDPAddr) (*gonet.UDPConn, error) + func (net *Net) ListenUDPAddrPort(laddr netip.AddrPort) (*gonet.UDPConn, error) + func (net *Net) LookupHost(host string) (addrs []string, err error) + func (net *Net) Stack() *stack.Stack + func (tnet *Net) Dial(network, address string) (net.Conn, error) + func (tnet *Net) DialContext(ctx context.Context, network, address string) (net.Conn, error) + func (tnet *Net) LookupContextHost(ctx context.Context, host string) ([]string, error) + type PingAddr struct + func PingAddrFromAddr(addr netip.Addr) *PingAddr + func (ia PingAddr) Addr() netip.Addr + func (ia PingAddr) Network() string + func (ia PingAddr) String() string + type PingConn struct + func (pc *PingConn) Close() error + func (pc *PingConn) LocalAddr() net.Addr + func (pc *PingConn) Read(p []byte) (n int, err error) + func (pc *PingConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) + func (pc *PingConn) RemoteAddr() net.Addr + func (pc *PingConn) SetDeadline(t time.Time) error + func (pc *PingConn) SetReadDeadline(t time.Time) error + func (pc *PingConn) SetWriteDeadline(t time.Time) error + func (pc *PingConn) Write(p []byte) (n int, err error) + func (pc *PingConn) WriteTo(p []byte, addr net.Addr) (n int, err error)