flora

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION     = "0.1.1"
	SOCKS_PORT  = 1080
	RULE_REJECT = "REJECT"
	RULE_DIRECT = "DIRECT"
)

Variables

View Source
var ProxyServers struct {
	ListenAddress  string
	LocalSocksPort int
	SrvCipher      map[string]*ProxyServerCipher
	SrvCipherGroup map[string][]*ProxyServerCipher
	GetCipher      func(name string) *ProxyServerCipher
	FailCipher     func(name string) int
	// contains filtered or unexported fields
}

Functions

func GeoIP

func GeoIP(ip net.IP) string

func GeoIPString

func GeoIPString(ipaddr string) string

func GeoIPs

func GeoIPs(ips []net.IP) string

func LoadConfig

func LoadConfig(cfgFile string, geoFile string)

func ResetAllProxys

func ResetAllProxys()

func SetProxyBypassDomains

func SetProxyBypassDomains(domains []string)

func SetSocksFirewallProxy

func SetSocksFirewallProxy()

Types

type HostRule

type HostRule struct {
	Match  string
	Action string
}

func RuleOfHost

func RuleOfHost(host string) *HostRule

type ProxyConfig

type ProxyConfig struct {
	Name              string
	Type              string
	ShadowSocksConfig []string
}

type ProxyServerCipher

type ProxyServerCipher struct {
	ProxyType         string
	Server            string
	Effective         bool
	ShadowSocksCipher *ss.Cipher
}

type SyncMap

type SyncMap struct {
	// contains filtered or unexported fields
}

func NewSyncMap

func NewSyncMap() *SyncMap

func (*SyncMap) Check

func (m *SyncMap) Check(k interface{}) bool

Returns true if k is exist in the map.

func (*SyncMap) Delete

func (m *SyncMap) Delete(k interface{})

func (*SyncMap) Get

func (m *SyncMap) Get(k interface{}) interface{}

Get from maps return the k's value

func (*SyncMap) Set

func (m *SyncMap) Set(k interface{}, v interface{}) bool

Maps the given key and value. Returns false if the key is already in the map and changes nothing.

Jump to

Keyboard shortcuts

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