tools

package
v4.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IdleTimeoutCmd = &cobra.Command{
		Use:   "idle-timeout server_addr",
		Args:  cobra.ExactArgs(1),
		Short: "Probe server's idle timeout.",
		Run: func(cmd *cobra.Command, args []string) {
			if err := ProbServerTimeout(args[0]); err != nil {
				mlog.S().Fatal(err)
			}
		},
	}

	ConnReuse = &cobra.Command{
		Use:   "conn-reuse server_addr",
		Args:  cobra.ExactArgs(1),
		Short: "Check whether this server supports RFC 1035 connection reuse.",
		Run: func(cmd *cobra.Command, args []string) {
			if err := ProbServerConnectionReuse(args[0]); err != nil {
				mlog.S().Fatal(err)
			}
		},
	}

	Pipeline = &cobra.Command{
		Use:   "pipeline server_addr",
		Args:  cobra.ExactArgs(1),
		Short: "Check whether this server supports RFC 7766 query pipelining.",
		Run: func(cmd *cobra.Command, args []string) {
			if err := ProbServerPipeline(args[0]); err != nil {
				mlog.S().Fatal(err)
			}
		},
	}

	UnpackDomain = &cobra.Command{
		Use:   "unpack-domain [-o output_dir] geosite.dat",
		Args:  cobra.ExactArgs(1),
		Short: "Unpack v2ray domain data file to text files.",
		Run: func(cmd *cobra.Command, args []string) {
			if err := UnpackDomainDAT(args[0]); err != nil {
				mlog.S().Fatal(err)
			}
		},
	}

	UnpackIP = &cobra.Command{
		Use:   "unpack-ip [-o output_dir] geoip.dat",
		Args:  cobra.ExactArgs(1),
		Short: "Unpack v2ray ip data file to text files.",
		Run: func(cmd *cobra.Command, args []string) {
			if err := UnpackIPDAT(args[0]); err != nil {
				mlog.S().Fatal(err)
			}
		},
	}
)

Functions

func ProbServerConnectionReuse

func ProbServerConnectionReuse(addr string) error

func ProbServerPipeline

func ProbServerPipeline(addr string) error

func ProbServerTimeout

func ProbServerTimeout(addr string) error

func UnpackDomainDAT

func UnpackDomainDAT(v string) error

func UnpackIPDAT

func UnpackIPDAT(v string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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