Documentation ¶
Index ¶
- Variables
- func Main()
- func PipeInboundToOutbound(pp pipeParam, buffer **common.Buffer) (result error)
- func PipeOutboundToInbound(pp pipeParam) (err error)
- type BackendInfo
- type BackendsInformation
- type BackendsInformationWrapper
- type ByFailedCount
- type ByHighestLastHourBps
- type ByHighestLastMinuteBps
- type ByHighestLastSecondBps
- type ByHighestLastTenMinutesBps
- type ByLastHourBps
- type ByLastMinuteBps
- type ByLastSecondBps
- type ByLastTenMinutesBps
- type ByLatency
- type ByTotalDownload
- type ByTotalUpload
- type CommonProxyInfo
- type Connection
- type HTTPSProxyInfo
- type Report
- type SSInfo
- type SSRInfo
- type Sorter
- type Stat
- type StatisticMap
- type StatisticWrapper
- func (m *StatisticWrapper) Delete(si *BackendInfo)
- func (m *StatisticWrapper) Get(bi *BackendInfo) (s *common.Statistic, ok bool)
- func (m *StatisticWrapper) Insert(si *BackendInfo, s *common.Statistic)
- func (m *StatisticWrapper) LoadFromCache()
- func (m *StatisticWrapper) SaveToRedis()
- func (m *StatisticWrapper) UpdateBps()
- func (m *StatisticWrapper) UpdateLatency()
- func (m *StatisticWrapper) UpdateServerIP()
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRead = errors.New("Reading pipe error") ErrWrite = errors.New("Writing pipe error") ErrNoSignal = errors.New("Signal timeout error") ErrSignalFalse = errors.New("Signal false") )
View Source
var ( ErrDeniedPort = errors.New("try to access denied port") ErrNotAllowedPort = errors.New("try to access not allowed port") ErrDeniedIP = errors.New("try to access denied IP") ErrNotAllowedIP = errors.New("try to access not allowed IP") ErrLoopProxy = errors.New("try to access proxy server") )
Functions ¶
func PipeInboundToOutbound ¶
func PipeOutboundToInbound ¶
func PipeOutboundToInbound(pp pipeParam) (err error)
Types ¶
type BackendInfo ¶
type BackendInfo struct { HTTPSProxyInfo SSRInfo // contains filtered or unexported fields }
BackendInfo all fields that a backend used
type BackendsInformation ¶
type BackendsInformation []*BackendInfo
func (BackendsInformation) Len ¶
func (slice BackendsInformation) Len() int
func (BackendsInformation) Swap ¶
func (slice BackendsInformation) Swap(i, j int)
type BackendsInformationWrapper ¶
type BackendsInformationWrapper struct { sync.RWMutex BackendsInformation }
func NewBackendsInformationWrapper ¶
func NewBackendsInformationWrapper() *BackendsInformationWrapper
func (*BackendsInformationWrapper) Append ¶
func (biw *BackendsInformationWrapper) Append(bi *BackendInfo)
func (*BackendsInformationWrapper) Get ¶
func (biw *BackendsInformationWrapper) Get(i int) *BackendInfo
func (*BackendsInformationWrapper) Len ¶
func (biw *BackendsInformationWrapper) Len() int
func (*BackendsInformationWrapper) Remove ¶
func (biw *BackendsInformationWrapper) Remove(i int)
type ByFailedCount ¶
type ByFailedCount struct{ BackendsInformation }
func (ByFailedCount) Less ¶
func (slice ByFailedCount) Less(i, j int) bool
type ByHighestLastHourBps ¶
type ByHighestLastHourBps struct{ BackendsInformation }
func (ByHighestLastHourBps) Less ¶
func (slice ByHighestLastHourBps) Less(i, j int) bool
type ByHighestLastMinuteBps ¶
type ByHighestLastMinuteBps struct{ BackendsInformation }
func (ByHighestLastMinuteBps) Less ¶
func (slice ByHighestLastMinuteBps) Less(i, j int) bool
type ByHighestLastSecondBps ¶
type ByHighestLastSecondBps struct{ BackendsInformation }
func (ByHighestLastSecondBps) Less ¶
func (slice ByHighestLastSecondBps) Less(i, j int) bool
type ByHighestLastTenMinutesBps ¶
type ByHighestLastTenMinutesBps struct{ BackendsInformation }
func (ByHighestLastTenMinutesBps) Less ¶
func (slice ByHighestLastTenMinutesBps) Less(i, j int) bool
type ByLastHourBps ¶
type ByLastHourBps struct{ BackendsInformation }
func (ByLastHourBps) Less ¶
func (slice ByLastHourBps) Less(i, j int) bool
type ByLastMinuteBps ¶
type ByLastMinuteBps struct{ BackendsInformation }
func (ByLastMinuteBps) Less ¶
func (slice ByLastMinuteBps) Less(i, j int) bool
type ByLastSecondBps ¶
type ByLastSecondBps struct{ BackendsInformation }
func (ByLastSecondBps) Less ¶
func (slice ByLastSecondBps) Less(i, j int) bool
type ByLastTenMinutesBps ¶
type ByLastTenMinutesBps struct{ BackendsInformation }
func (ByLastTenMinutesBps) Less ¶
func (slice ByLastTenMinutesBps) Less(i, j int) bool
type ByLatency ¶
type ByLatency struct{ BackendsInformation }
type ByTotalDownload ¶
type ByTotalDownload struct{ BackendsInformation }
func (ByTotalDownload) Less ¶
func (slice ByTotalDownload) Less(i, j int) bool
type ByTotalUpload ¶
type ByTotalUpload struct{ BackendsInformation }
func (ByTotalUpload) Less ¶
func (slice ByTotalUpload) Less(i, j int) bool
type CommonProxyInfo ¶
type CommonProxyInfo struct {
// contains filtered or unexported fields
}
CommonProxyInfo fields that auth for http/https/socks
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
type HTTPSProxyInfo ¶
type HTTPSProxyInfo struct { CommonProxyInfo // contains filtered or unexported fields }
HTTPSProxyInfo fields that https used only
type Report ¶
type Report struct { Quote int64 TotalDownload uint64 TotalUpload uint64 CurrentUsing string StartAt time.Time Uptime string Stats }
Report type for statistics report
type SSInfo ¶
type SSInfo struct {
// contains filtered or unexported fields
}
SSInfo fields that shadowsocks/shadowsocksr used only
type SSRInfo ¶
type SSRInfo struct { SSInfo // contains filtered or unexported fields }
SSRInfo fields that shadowsocksr used only
type StatisticMap ¶
type StatisticMap map[*BackendInfo]*common.Statistic
type StatisticWrapper ¶
type StatisticWrapper struct { sync.RWMutex StatisticMap }
func NewStatisticWrapper ¶
func NewStatisticWrapper() *StatisticWrapper
func (*StatisticWrapper) Delete ¶
func (m *StatisticWrapper) Delete(si *BackendInfo)
func (*StatisticWrapper) Get ¶
func (m *StatisticWrapper) Get(bi *BackendInfo) (s *common.Statistic, ok bool)
func (*StatisticWrapper) Insert ¶
func (m *StatisticWrapper) Insert(si *BackendInfo, s *common.Statistic)
func (*StatisticWrapper) LoadFromCache ¶
func (m *StatisticWrapper) LoadFromCache()
func (*StatisticWrapper) SaveToRedis ¶
func (m *StatisticWrapper) SaveToRedis()
func (*StatisticWrapper) UpdateBps ¶
func (m *StatisticWrapper) UpdateBps()
func (*StatisticWrapper) UpdateLatency ¶
func (m *StatisticWrapper) UpdateLatency()
func (*StatisticWrapper) UpdateServerIP ¶
func (m *StatisticWrapper) UpdateServerIP()
Click to show internal directories.
Click to hide internal directories.