Documentation ¶
Index ¶
- Constants
- func BindPort() error
- func CreateSSLCertificate(owner Organization, years int) (caPEMBytes, certPEMBytes, certPrivKeyPEMBytes []byte, expires time.Time, ...)
- func CreateSSLCertificateTLSConfig(owner Organization, years int) (serverTLSConf *tls.Config, clientTLSConf *tls.Config, err error)
- func CreateSSLCertificateToFilePair(owner Organization, years int, certPath, privateKeyPath string) (expires time.Time, err error)
- func DNSLookupToIP4(domain string) (string, error)
- func ForwardPortToRemote(port int, remoteAddress string) error
- func GetCurrentIPAddress() (address string, err error)
- func GetCurrentLocalIP4Address(skipLocal bool, netInterface string) (ip4 string, err error)
- func GetCurrentLocalIP4Addresses(skipLocal bool) (map[string]string, error)
- func GetCurrentLocalIPAddress() (ip16, ip4 string, err error)
- func GetIP4AddressAsParts(address string) (parts []int, err error)
- func GetIP4PartsAsAddress(parts []int) (address string, err error)
- func GetOutboundIP() (ip net.IP, err error)
- func GetSNMPVariableStr(host string, oid string) (string, error)
- func GetSNMPVariables(host string, oids ...string) (zdict.Dict, error)
- func HostAndPortFromAddress(address string) (string, int)
- func HostAndPortToAddress(host string, port int) string
- func SetEtcHostsEntries(forwards map[string]string, comment, sudoPassword string) error
- func ShowGenerateTLSCertificatesCommands(certName string)
- func StartForwardProxyTunnel(port int)
- func StripQueryAndFragment(surl string) string
- func WifiName() (name string, err error)
- type HTTPServer
- type Organization
- type SSLCertificateInfo
- type ZNetCalls
Constants ¶
View Source
const ( SNMPSysName = ".1.3.6.1.2.1.1.5.0" SNMPName = ".1.3.6.1.2.1.1.1.0" SNMPSysObjectID = ".1.3.6.1.2.1.1.2.0" )
Variables ¶
This section is empty.
Functions ¶
func CreateSSLCertificate ¶
func DNSLookupToIP4 ¶
func ForwardPortToRemote ¶
func GetCurrentIPAddress ¶
func GetCurrentLocalIP4Addresses ¶
GetCurrentLocalIP4Addresses returns a map of interface:ip4-address
func GetCurrentLocalIPAddress ¶
TODO: Consolidate with with znet.go variants
func GetIP4AddressAsParts ¶
func GetIP4PartsAsAddress ¶
func GetOutboundIP ¶
func HostAndPortFromAddress ¶
func HostAndPortToAddress ¶
func SetEtcHostsEntries ¶
SetEtcHostsEntry adds a 1.2.3.4 example.com #comment line to /etc/hosts Any line with the same comment is removed first. If ip or domain are empty, no line is added. It requires the running user to be able to sudo, and run a shell
func ShowGenerateTLSCertificatesCommands ¶
func ShowGenerateTLSCertificatesCommands(certName string)
func StartForwardProxyTunnel ¶
func StartForwardProxyTunnel(port int)
func StripQueryAndFragment ¶
Types ¶
type HTTPServer ¶
func ServeHTTPInBackground ¶
func (*HTTPServer) Shutdown ¶
func (s *HTTPServer) Shutdown(wait bool) error
type Organization ¶
type SSLCertificateInfo ¶
type SSLCertificateInfo struct { Organization YearsUntilExpiry int }
Click to show internal directories.
Click to hide internal directories.