Documentation
¶
Overview ¶
Package server orchestrates a shadowgate server: it owns the shared router (tun device + routing table) and starts the enabled transports (TCP, UDP, or both), which all route through that single router so clients on different transports can reach each other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
TCPListen string // TCP listen address; empty disables TCP
UDPListen string // UDP listen address; empty disables UDP
Password []byte
Compress bool // TCP: Snappy-compress the stream
Padding int // UDP: maximum random padding bytes per datagram
Gateway net.IP // client tunnel address to route otherwise-unroutable egress through; nil disables
Timeout time.Duration
}
Config selects which transports the server listens on and how they behave.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) TCPAddress ¶
TCPAddress reports the TCP listen address, or nil if TCP is disabled.
func (*Server) UDPAddress ¶
UDPAddress reports the UDP listen address, or nil if UDP is disabled.
Click to show internal directories.
Click to hide internal directories.