Versions in this module Expand all Collapse all v0 v0.4.0 Sep 4, 2024 v0.3.6 Sep 2, 2024 Changes in this version + const ACOpenCompensationTime + const BlockAddrExpireTime + const BlockAddrRefreshRate + const DefaultACConnectionTimeoutMs + const DefaultAgentConnectionTimeoutMs + const DefaultIpOpenTime + const HttpTransactionTimeout + const MaxConcurrentConnection + const OverloadConnectionThreshold + const PacketQueueSizePerConnection + const PreCheckThreatCountBeforeBlock + var ExeDirPath string + func LoadFilesRecursively(g *gin.Engine, dir string) + type ACConn struct + ACId string + ACPeer *nhp.UdpPeer + Apps []string + ConnData *nhp.ConnectionData + ServiceId string + type BlockAddr struct + type Config struct + DisableAgentValidation bool + Hostname string + ListenIp string + ListenPort int + LogLevel int + PrivateKeyBase64 string + type HttpConfig struct + EnableHttp bool + EnableTLS bool + HttpListenIp string + TLSCertFile string + TLSKeyFile string + type HttpServer struct + func (hs *HttpServer) FindPluginHandler(aspId string) plugins.PluginHandler + func (hs *HttpServer) IsRunning() bool + func (hs *HttpServer) NewHttpServerHelper() *plugins.HttpServerPluginHelper + func (hs *HttpServer) Start(us *UdpServer, hc *HttpConfig) error + func (hs *HttpServer) Stop() + type Peers struct + ACs []*nhp.UdpPeer + Agents []*nhp.UdpPeer + type UdpConn struct + ConnData *nhp.ConnectionData + func (c *UdpConn) Close() + type UdpServer struct + func (s *UdpServer) AddACPeer(acPeer *nhp.UdpPeer) + func (s *UdpServer) AddAddressAssociation(srcIp string, addrs []*common.NetAddress) + func (s *UdpServer) AddAgentPeer(agent *nhp.UdpPeer) + func (s *UdpServer) AddAuthService(aspData *common.AuthServiceProviderData) error + func (s *UdpServer) AddBlockAddr(addr *net.UDPAddr) + func (s *UdpServer) AddResource(res *common.ResourceData) error + func (s *UdpServer) BlockAddrRefreshRoutine() + func (s *UdpServer) ClosePlugins() + func (s *UdpServer) FindAuthSvcProvider(aspId string) *common.AuthServiceProviderData + func (s *UdpServer) HandleACOnline(ppd *nhp.PacketParserData) (err error) + func (s *UdpServer) HandleKnockRequest(ppd *nhp.PacketParserData) (err error) + func (s *UdpServer) HandleListRequest(ppd *nhp.PacketParserData) (err error) + func (s *UdpServer) HandleOTPRequest(ppd *nhp.PacketParserData) (err error) + func (s *UdpServer) HandleRegisterRequest(ppd *nhp.PacketParserData) (err error) + func (s *UdpServer) IsBlockAddr(addr *net.UDPAddr) bool + func (s *UdpServer) IsRunning() bool + func (s *UdpServer) LoadPlugin(pluginId string, h plugins.PluginHandler) error + func (s *UdpServer) RefreshBlockAddr() + func (s *UdpServer) RemoveAddressAssociation(srcIp string) + func (s *UdpServer) SendPacket(pkt *nhp.UdpPacket, conn *UdpConn) (n int, err error) + func (s *UdpServer) Start(dirPath string, logLevel int) (err error) + func (s *UdpServer) Stop() + func (s *UdpServer) StopConfigWatch() + func (s *UdpServer) ValidatePlugin(h plugins.PluginHandler) bool + func (us *UdpServer) FindPluginHandler(aspId string) plugins.PluginHandler + func (us *UdpServer) NewNhpServerHelper(ppd *nhp.PacketParserData) *plugins.NhpServerPluginHelper