cfg_proxy

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	Addr     string `json:"addr" yaml:"addr" ini:"addr"`
	Account  string `json:"account" yaml:"account" ini:"account"`
	Password string `json:"password" yaml:"password" ini:"password"`
	// contains filtered or unexported fields
}

func (*Proxy) AutoDialer

func (p *Proxy) AutoDialer() (proxy.Dialer, error)

func (*Proxy) Dialer

func (p *Proxy) Dialer() proxy.Dialer

func (*Proxy) GetProxyUrl

func (p *Proxy) GetProxyUrl() *url.URL

func (*Proxy) HttpProxy

func (p *Proxy) HttpProxy() func(r *http.Request) (*url.URL, error)

func (*Proxy) ProxyType

func (p *Proxy) ProxyType() ProxyTypes

func (*Proxy) Valid

func (p *Proxy) Valid() error

type ProxyTypes

type ProxyTypes string
const (
	ProxyNone    ProxyTypes = "none"    // 无代理
	ProxyHttp    ProxyTypes = "http"    // http 代理
	ProxyHttps   ProxyTypes = "https"   // https 代理
	ProxySocks5  ProxyTypes = "socks5"  // socks 代理
	ProxyUnknown ProxyTypes = "unknown" // 无效的代理类型
)

Jump to

Keyboard shortcuts

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