util

package
v0.0.0-...-3d9a477 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllResidualDetected []ResidualDetected

Functions

func ConnectNormally

func ConnectNormally(addr string, port int) (net.Conn, error)

ConnectNormally Connect to the address normally

func ConnectViaProxy

func ConnectViaProxy(addr string, port int, connectType string) (net.Conn, error)

ConnectViaProxy Connect to the address through the proxy

func DetectResidual

func DetectResidual(ip string, port int, component string) (int, float64)

func FetchISP

func FetchISP() error

func FetchProxy

func FetchProxy(path string) ([][]string, error)

func GetTestDomains

func GetTestDomains(countryCode string) ([]string, error)

func ParseAuth

func ParseAuth() string

func ParseEcho

func ParseEcho() string

func ParseProxy

func ParseProxy() string

func ParseSOCKS5ProxyFull

func ParseSOCKS5ProxyFull(remoteDNS bool) string

func PrintError

func PrintError(domain string, err error)

func PrintInfo

func PrintInfo(domain string, info string)

func ReadCsvFile

func ReadCsvFile(filePath string) ([][]string, error)

func RemoveDuplicateStr

func RemoveDuplicateStr(strSlice []string) []string

func Repeat

func Repeat(s string, n int) string

func ResetResidualDetector

func ResetResidualDetector()

func ResolveIPLocally

func ResolveIPLocally(domain string) (string, error)

func ResumeTLSSession

func ResumeTLSSession(conn net.Conn, request string, sess TLSSession) (*http.Response, error)

ResumeTLSSession

func Reverse

func Reverse(s string) string

func SendHTTPSTraffic

func SendHTTPSTraffic(conn net.Conn, request string, utlsConfig *utls.Config,
	extensions []utls.TLSExtension, chloID utls.ClientHelloID) (*http.Response, error)

SendHTTPSTraffic Send HTTP GET request with TLS and get response

func SendHTTPTraffic

func SendHTTPTraffic(conn net.Conn, request string) (*http.Response, error)

SendHTTPTraffic Send HTTP GET request and get response

func SetProxy

func SetProxy(ip string, port int, username string, password string, proxyType string)

Types

type ResidualDetected

type ResidualDetected struct {
	// contains filtered or unexported fields
}

type Response

type Response struct {
	IP      string `json:"ip"`
	Country string `json:"country"`
	ASN     struct {
		ASNum   int    `json:"asnum"`
		OrgName string `json:"org_name"`
	} `json:"asn"`
	Geo struct {
		City       string  `json:"city"`
		Region     string  `json:"region"`
		RegionName string  `json:"region_name"`
		PostalCode string  `json:"postal_code"`
		Latitude   float64 `json:"latitude"`
		Longitude  float64 `json:"longitude"`
		TimeZone   string  `json:"tz"`
		LumCity    string  `json:"lum_city"`
		LumRegion  string  `json:"lum_region"`
	} `json:"geo"`
}

type TLSSession

type TLSSession struct {
	ID []byte
	// contains filtered or unexported fields
}

func GetNewTLSSession

func GetNewTLSSession(conn net.Conn, request string, utlsConfig *utls.Config) (*TLSSession, error)

GetNewTLSSession

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL