Documentation
¶
Index ¶
- func NewNat() *nat
- type Option
- func With4(natIP net.IP, listenIP net.IP, listenPort uint16) Option
- func With6(natIP net.IP, listenIP net.IP, listenPort uint16) Option
- func WithDns(dnsDispatcher dns.DnsConn, dnsAddress []mynet.Destination) Option
- func WithHandler(h i.Handler) Option
- func WithRejector(rejector inboundcommon.Rejector) Option
- func WithTag(tag string) Option
- func WithTun(tun tunDevice) Option
- func WithUdpRejector(rejector inboundcommon.Rejector) Option
- type SrcDst
- type TunSystemInbound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*TunSystemInbound)
func WithHandler ¶
func WithRejector ¶
func WithRejector(rejector inboundcommon.Rejector) Option
func WithUdpRejector ¶
func WithUdpRejector(rejector inboundcommon.Rejector) Option
type TunSystemInbound ¶
type TunSystemInbound struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) *TunSystemInbound
func (*TunSystemInbound) Close ¶
func (t *TunSystemInbound) Close() error
func (*TunSystemInbound) Start ¶
func (ti *TunSystemInbound) Start() error
func (*TunSystemInbound) Tag ¶
func (t *TunSystemInbound) Tag() string
func (*TunSystemInbound) WritePacket ¶
func (t *TunSystemInbound) WritePacket(p *udp.Packet) error
Click to show internal directories.
Click to hide internal directories.