Documentation ¶
Index ¶
- Constants
- func BinaryWrite(raw *bytes.Buffer, v ...string)
- func ChangeHostAndHeader(r *http.Request, host string, header string, addr string)
- func CheckAuth(r *http.Request, user, passwd string) bool
- func CopyBuffer(dst io.Writer, src io.Reader) (written int64, err error)
- func DomainCheck(domain string) bool
- func FileExists(name string) bool
- func FormatAddress(s string) string
- func GetAppPath() string
- func GetBoolByStr(s string) bool
- func GetCompressType(compress string) (int, int)
- func GetHostByName(hostname string) string
- func GetInstallPath() string
- func GetIntNoErrByStr(str string) int
- func GetIpByAddr(addr string) string
- func GetLogPath() string
- func GetPorts(p string) []int
- func GetRunPath() string
- func GetStrByBool(b bool) string
- func GetTmpPath() string
- func Getverifyval(vkey string) string
- func InIntArr(arr []int, val int) bool
- func InStrArr(arr []string, val string) bool
- func IsPort(p string) bool
- func IsWindows() bool
- func ReadAllFromFile(filePath string) ([]byte, error)
- func TestTcpPort(port int) bool
- func TestUdpPort(port int) bool
Constants ¶
View Source
const ( CONN_DATA_SEQ = "*#*" COMPRESS_NONE_ENCODE = iota COMPRESS_NONE_DECODE COMPRESS_SNAPY_ENCODE COMPRESS_SNAPY_DECODE VERIFY_EER = "vkey" VERIFY_SUCCESS = "sucs" WORK_MAIN = "main" WORK_CHAN = "chan" WORK_SEND_STATUS = "sdst" WORK_CONFIG = "conf" WORK_REGISTER = "rgst" WORD_SECRET = "sert" WORK_STATUS = "stus" RES_SIGN = "sign" RES_MSG = "msg0" RES_CLOSE = "clse" NEW_CONN = "conn" //新连接标志 NEW_TASK = "task" //新连接标志 NEW_CONF = "conf" //新连接标志 NEW_HOST = "host" //新连接标志 CONN_TCP = "tcp" CONN_UDP = "udp" Content-Type: text/plain; charset=utf-8 WWW-Authenticate: Basic realm="easyProxy" 401 Unauthorized` IO_EOF = "PROXYEOF" ConnectionFailBytes = `HTTP/1.1 404 Not Found ` )
Variables ¶
This section is empty.
Functions ¶
func BinaryWrite ¶
Write length and individual byte data Length prevents sticking # Characters are used to separate data
func ChangeHostAndHeader ¶
Change headers and host of request
func CopyBuffer ¶ added in v0.0.16
func FileExists ¶
FileExists reports whether the named file or directory exists.
func FormatAddress ¶ added in v0.0.15
func GetHostByName ¶
Get the corresponding IP address through domain name
func GetInstallPath ¶
func GetInstallPath() string
Different systems get different installation paths
func GetIpByAddr ¶ added in v0.0.15
func GetRunPath ¶
func GetRunPath() string
Get the currently selected configuration file directory For non-Windows systems, select the /etc/nps as config directory if exist, or select ./ windows system, select the C:\Program Files\nps as config directory if exist, or select ./
func ReadAllFromFile ¶
Read file content by file path
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.