Documentation ¶
Index ¶
- func GetBinaryName() string
- func GetBinaryPath() string
- func GetConfigPath() string
- func GetGeoipPath() string
- func GetGeositePath() string
- type Config
- type Controller
- type InboundConfig
- type Process
- func (p *Process) GetAPIPort() int
- func (p *Process) GetConfig() *Config
- func (p Process) GetErr() error
- func (p Process) GetResult() string
- func (p Process) GetTraffic(reset bool) ([]*Traffic, error)
- func (p Process) GetVersion() string
- func (p Process) IsRunning() bool
- func (p Process) Start() (err error)
- func (p Process) Stop() error
- type Traffic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBinaryName ¶
func GetBinaryName() string
func GetBinaryPath ¶
func GetBinaryPath() string
func GetConfigPath ¶
func GetConfigPath() string
func GetGeoipPath ¶
func GetGeoipPath() string
func GetGeositePath ¶
func GetGeositePath() string
Types ¶
type Config ¶
type Config struct { LogConfig json.RawMessage `json:"log"` RouterConfig json.RawMessage `json:"routing"` DNSConfig json.RawMessage `json:"dns"` InboundConfigs []InboundConfig `json:"inbounds"` OutboundConfigs json.RawMessage `json:"outbounds"` Transport json.RawMessage `json:"transport"` Policy json.RawMessage `json:"policy"` API json.RawMessage `json:"api"` Stats json.RawMessage `json:"stats"` Reverse json.RawMessage `json:"reverse"` FakeDNS json.RawMessage `json:"fakeDns"` }
type Controller ¶
type Controller struct { Conn *grpc.ClientConn HsClient handlerService.HandlerServiceClient SsClient statsService.StatsServiceClient LsClient loggerService.LoggerServiceClient RsClient routingService.RoutingServiceClient }
type InboundConfig ¶
type InboundConfig struct { Listen json.RawMessage `json:"listen"` // listen 不能为空字符串 Port int `json:"port"` Protocol string `json:"protocol"` Settings json.RawMessage `json:"settings"` StreamSettings json.RawMessage `json:"streamSettings"` Tag string `json:"tag"` Sniffing json.RawMessage `json:"sniffing"` }
func (*InboundConfig) Equals ¶
func (c *InboundConfig) Equals(other *InboundConfig) bool
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func NewProcess ¶
func (*Process) GetAPIPort ¶
func (Process) GetTraffic ¶
func (Process) GetVersion ¶
func (p Process) GetVersion() string
Click to show internal directories.
Click to hide internal directories.