libpsiphon

package
v0.0.0-...-9754f31 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Loop          = true
	DefaultConfig = &Config{
		CoreName: "psiphon-tunnel-core",
		Tunnel:   1,
		Region:   "",
		Protocols: []string{
			"FRONTED-MEEK-HTTP-OSSH",
			"FRONTED-MEEK-OSSH",
		},
		TunnelWorkers:  6,
		KuotaDataLimit: 4,
		Authorizations: make([]string, 0),
	}
	DefaultKuotaData = &KuotaData{
		Port: make(map[int]map[string]float64),
		All:  0,
	}
	ConfigPathPsiphon = libutils.GetConfigPath("brainfuck-psiphon-pro-go", "storage/psiphon")
)

Functions

func RemoveData

func RemoveData()

func Stop

func Stop()

Types

type Config

type Config struct {
	CoreName       string
	Tunnel         int
	Region         string
	Protocols      []string
	TunnelWorkers  int
	KuotaDataLimit int
	Authorizations []string
}

type Data

type Data struct {
	MigrateDataStoreDirectory string
	UpstreamProxyURL          string
	LocalSocksProxyPort       int
	SponsorId                 string
	PropagationChannelId      string
	EmitBytesTransferred      bool
	EmitDiagnosticNotices     bool
	DisableLocalHTTPProxy     bool
	EgressRegion              string
	TunnelPoolSize            int
	ConnectionWorkerPoolSize  int
	LimitTunnelProtocols      []string
	Authorizations            []string
}

type KuotaData

type KuotaData struct {
	Port map[int]map[string]float64
	All  float64
}

type Psiphon

type Psiphon struct {
	ProxyRotator    *libproxyrotator.ProxyRotator
	Config          *Config
	ProxyPort       string
	KuotaData       *KuotaData
	ListenPort      int
	TunnelConnected int
	Verbose         bool
}

func (*Psiphon) CheckKuotaDataLimit

func (p *Psiphon) CheckKuotaDataLimit(sent float64, received float64) bool

func (*Psiphon) GetAuthorizations

func (p *Psiphon) GetAuthorizations() []string

func (*Psiphon) LogInfo

func (p *Psiphon) LogInfo(message string, color string)

func (*Psiphon) LogVerbose

func (p *Psiphon) LogVerbose(message string, color string)

func (*Psiphon) Start

func (p *Psiphon) Start()

Jump to

Keyboard shortcuts

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