Documentation
¶
Index ¶
- Constants
- func Command(name string, arg ...string) (string, error)
- func CommandContext(ctx context.Context, name string, arg ...string) (string, error)
- func CurrentDir() string
- func DirFileList(dir string) ([]string, error)
- func EncodeHTTP2Header(frameType FrameType, flag uint8, rawDataLen int, dst []byte) (header []byte, padSize byte)
- func FileExists(path string) (bool, error)
- func HasPad(header []byte) bool
- func IsDataFrame(header []byte) bool
- func IsIP(ip string) bool
- func IsIPV6(ip string) bool
- func IsLoopbackIP(ip string) bool
- func IsNeedACK(header []byte) bool
- func IsPingFrame(header []byte) bool
- func IsPrivateIP(ip string) bool
- func IsRSTACKFrame(header []byte) bool
- func IsRSTFINFrame(header []byte) bool
- func IsTCPProto(header []byte) bool
- func IsUDPProto(header []byte) bool
- func LogFilePath() string
- func PayloadLen(header []byte) int
- func RandomBetween(min, max int64) int64
- func ReadFileLines(file string) ([]string, error)
- func ReadFileLinesMap(file string) (map[string]struct{}, error)
- func SetLogFileHook(logDir string)
- func SetSysDNS(v []string) error
- func SysDNS() ([]string, error)
- func SysGatewayAndDevice() (gw string, dev string, err error)
- func SysPowershellMajorVersion() int
- func SysSupportPowershell() bool
- func WriteToTemp(filename string, content []byte) (namePath string, err error)
- type FrameType
Constants ¶
View Source
const ( LogMaxAge = 1 // one day LogMaxBackups = 1 // one backup LogMaxSize = 10 // 10Mb LogFileName = "easyss.log" )
View Source
const ( Http2HeaderLen = 9 PaddingSize = 64 MaxPaddingSize = 255 MinPaddingSize = 64 )
View Source
const ( FlagTCP uint8 = 1 << iota FlagUDP FlagICMP FlagPad FlagNeedACK FlagFIN FlagACK )
View Source
const FlagDefault uint8 = 0
Variables ¶
This section is empty.
Functions ¶
func CommandContext ¶
func CurrentDir ¶
func CurrentDir() string
func DirFileList ¶
func EncodeHTTP2Header ¶
func FileExists ¶
func HasPad ¶
HasPad returns true if http2 header frame has pad field, panic if header's length not equals Http2HeaderLen
func IsDataFrame ¶
func IsLoopbackIP ¶
func IsPingFrame ¶
func IsPrivateIP ¶
func IsRSTACKFrame ¶
func IsRSTFINFrame ¶
func IsTCPProto ¶
func IsUDPProto ¶
func LogFilePath ¶
func LogFilePath() string
func PayloadLen ¶
PayloadLen returns payload length in http2 header frame, panic if header's length not equals Http2HeaderLen
func RandomBetween ¶
func ReadFileLines ¶
func ReadFileLinesMap ¶
func SetLogFileHook ¶
func SetLogFileHook(logDir string)
func SysGatewayAndDevice ¶
func SysPowershellMajorVersion ¶
func SysPowershellMajorVersion() int
func SysSupportPowershell ¶
func SysSupportPowershell() bool
Types ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.