alpaca

package module
v0.0.0-...-7f30f7a Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 8 Imported by: 0

README

alpaca

Proxy Auto-Configuration file interpreter

implement functions

Predefined JavaScript Functions for FindProxyforURL
  • isPlainHostName
  • dnsDomainIs
  • localHostOrDomainIs
  • isResolvable
  • isInNet
  • dnsResolve
  • convert_addr
  • myIpAddress
  • dnsDomainLevels
  • shExpMatch
  • weekdayRange
  • dateRange
  • timeRange
  • alert
Predefined JavaScript Functions for FindProxyforURLEx
  • isResolveEx
  • isInNetEx
  • myIpAddressEx
  • sortIpAddresList
  • getClientVersion

Reference

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNotString = errors.New("return value not string")
)

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Type ProxyType
	Host string
}

type Engine

type Engine interface {
	FindProxyForURL(url.URL) ([]Endpoint, error)
}

func NewEngine

func NewEngine(pacfile []byte) (Engine, error)

type ProxyType

type ProxyType int
const (
	Direct ProxyType = iota
	Proxy
	Socks
	Http
	Https
	Socks4
	Socks6
)

func ParseProxyType

func ParseProxyType(s string) (ProxyType, error)

func (ProxyType) String

func (p ProxyType) String() string

Jump to

Keyboard shortcuts

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