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: 5 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址