libredsocks

package module
v0.0.0-...-2030c81 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Loop          = true
	DefaultConfig = &Config{
		LogInfo:      "off",
		LogDebug:     "off",
		LogOutput:    libutils.RealPath("redsocks.log"),
		LocalHost:    "0.0.0.0",
		LocalPort:    "9680",
		Host:         "127.0.0.1",
		Port:         "9693",
		Type:         "socks5",
		Username:     "",
		Password:     "",
		ConfigOutput: libutils.RealPath("redsocks.conf"),
	}
)

Functions

func Stop

func Stop(r *Redsocks)

Types

type Config

type Config struct {
	LogInfo      string
	LogDebug     string
	LogOutput    string
	LocalHost    string
	LocalPort    string
	Host         string
	Port         string
	Type         string
	Username     string
	Password     string
	ConfigOutput string
}

type Redsocks

type Redsocks struct {
	Config    *Config
	IsEnabled bool
}

func (*Redsocks) CheckIsEnabled

func (r *Redsocks) CheckIsEnabled() bool

func (*Redsocks) Execute

func (r *Redsocks) Execute(command string) error

func (*Redsocks) ForceExecute

func (r *Redsocks) ForceExecute(command string) error

func (*Redsocks) GenerateConfig

func (r *Redsocks) GenerateConfig() error

func (*Redsocks) RuleDirectAdd

func (r *Redsocks) RuleDirectAdd(host string)

func (*Redsocks) RuleDirectCheck

func (r *Redsocks) RuleDirectCheck(host string) bool

func (*Redsocks) Start

func (r *Redsocks) Start()

func (*Redsocks) Stop

func (r *Redsocks) Stop()

Jump to

Keyboard shortcuts

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