Documentation
¶
Index ¶
Constants ¶
View Source
const ( Blocked = "Blocked" OpenInternet = "Open Internet" FullCone = "Full Cone" SymmetricUDPFirewall = "Symmetric UDP Firewall" RestricNAT = "Restric NAT" RestricPortNAT = "Restric Port NAT" SymmetricNAT = "Symmetric NAT" )
Variables ¶
This section is empty.
Functions ¶
func NewAttrChangeRequest ¶
func NewAttrChangeRequest() attrChangeRequest
Types ¶
type Config ¶
type Config struct {
Server string
Verbose bool
MappingLocal string
FilteringLocal string
Net *vnet.Net
}
Config has config parameters for NewNATS.
type DiscoverResult ¶
type DiscoverResult struct {
IsNatted bool `json:"isNatted"`
MappingBehavior EndpointDependencyType `json:"mappingBehavior"`
FilteringBehavior EndpointDependencyType `json:"filteringBehavior"`
PortPreservation bool `json:"portPreservation"`
NATType string `json:"natType"`
ExternalIP string `json:"externalIP"`
ExternalPort string `json:"externalPort"`
}
DiscoverResult contains a set of results from Discover method.
type EndpointDependencyType ¶
type EndpointDependencyType uint8
EndpointDependencyType ...
const ( // EndpointIndependent means the behavior is independent of the endpoint's address or port EndpointIndependent EndpointDependencyType = iota // EndpointAddrDependent means the behavior is dependent on the endpoint's address EndpointAddrDependent // EndpointAddrPortDependent means the behavior is dependent on the endpoint's address and port EndpointAddrPortDependent // EndpointUndefined ... EndpointUndefined )
func (EndpointDependencyType) String ¶
func (t EndpointDependencyType) String() string
type NATS ¶
type NATS struct {
// contains filtered or unexported fields
}
NATS a class supports NAT type discovery feature.
type STUNServer ¶
type STUNServer struct {
// contains filtered or unexported fields
}
func NewSTUNServer ¶
func NewSTUNServer(config *STUNServerConfig) (*STUNServer, error)
func (*STUNServer) Close ¶
func (s *STUNServer) Close() error
func (*STUNServer) Start ¶
func (s *STUNServer) Start() error
func (*STUNServer) StartListenServer ¶
func (s *STUNServer) StartListenServer()
Click to show internal directories.
Click to hide internal directories.