crash.software
Projects
Pull Requests
Issues
Builds
sing-box
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
sing-box
Files
🤬
Sign In
41e1e48a
ROOT
/
transport
/
wireguard
/
device_stack.go
Search
History
338 lines
|
ISO-8859-1
|
8 KB
Blame
Outline
2
4
8
No wrap
Soft wrap
Outline
_
:
NatDevice
defaultNIC
:
tcpip.NICID
StackDevice
stack
:
*stack.Stack
mtu
:
uint32
events
:
chan wgTun.Event
outbound
:
chan *stack.PacketBuffer
packetOutbound
:
chan *buf.Buffer
done
:
chan struct{}
dispatcher
:
stack.NetworkDispatcher
addr4
:
tcpip.Address
addr6
:
tcpip.Address
mapping
:
*tun.NatMapping
writer
:
*tun.NatWriter
NewStackDevice
(localAddresses []netip.Prefix, mtu uint32, ipRewrite bool)
:
(*StackDevice, error)
stackNatDestination
device
:
*StackDevice
session
:
tun.RouteSession
_
:
stack.LinkEndpoint
wireEndpoint
*StackDevice
NewEndpoint
()
:
(stack.LinkEndpoint, error)
DialContext
(ctx context.Context, network string, destination M.Socksaddr)
:
(net.Conn, error)
ListenPacket
(ctx context.Context, destination M.Socksaddr)
:
(net.PacketConn, error)
Inet4Address
()
:
netip.Addr
Inet6Address
()
:
netip.Addr
Start
()
:
error
File
()
:
*os.File
Read
(p []byte, offset int)
:
(n int, err error)
Write
(p []byte, offset int)
:
(n int, err error)
Flush
()
:
error
MTU
()
:
(int, error)
Name
()
:
(string, error)
Events
()
:
chan wgTun.Event
Close
()
:
error
CreateDestination
(session tun.RouteSession, conn tun.RouteContext)
:
tun.DirectDestination
*stackNatDestination
WritePacket
(buffer *buf.Buffer)
:
error
WritePacketBuffer
(buffer *stack.PacketBuffer)
:
error
Close
()
:
error
Timeout
()
:
bool
*wireEndpoint
MTU
()
:
uint32
MaxHeaderLength
()
:
uint16
LinkAddress
()
:
tcpip.LinkAddress
Capabilities
()
:
stack.LinkEndpointCapabilities
Attach
(dispatcher stack.NetworkDispatcher)
IsAttached
()
:
bool
Wait
()
ARPHardwareType
()
:
header.ARPHardwareType
AddHeader
(buffer *stack.PacketBuffer)
WritePackets
(list stack.PacketBufferList)
:
(int, tcpip.Error)
All occurrences
Please wait...
Page is in error, reload to recover