Documentation ¶
Index ¶
- Constants
- Variables
- func BenchmarkNode() error
- func ChangeMode(mode string) error
- func ChangeNode(nodeName string) error
- func DisableService() error
- func DisableTun() error
- func Download() error
- func EditNodeConfigWithVi() error
- func EnableService() error
- func EnableTun() error
- func GetProxyPort() (int, int, error)
- func InstallService() error
- func IsCoreInstalled() (bool, error)
- func IsNotRunning(err error) bool
- func IsServiceInstalled() (bool, error)
- func IsTunEnabled() (bool, error)
- func ListNodes() error
- func ModifyAPISecret(on bool, secret string) error
- func Purge() error
- func Restart() (int, error)
- func ShowLog() error
- func ShowLogFollow() error
- func Start() (int, error)
- func Status() (int, error)
- func Stop() error
- func UninstallService() error
- type ConfigRestfulResponse
- type DelayTestResponse
- type Node
- type ProxyRestfulResponse
- type ProxySelectorResponse
Constants ¶
View Source
const ( AUTO_SELECT_PROXY_NAME = "自动选择" FALLBACK_PROXY_NAME = "故障转移" )
Variables ¶
View Source
var (
ErrNotAdmin = errors.New("please run as admin or root, do not use sudo")
)
View Source
var (
ErrNotLinux = errors.New("only support linux currently")
)
View Source
var (
ErrNotRunning = fmt.Errorf("cyber core is not running")
)
Functions ¶
func BenchmarkNode ¶
func BenchmarkNode() error
func ChangeMode ¶
func ChangeNode ¶
func DisableService ¶ added in v1.0.4
func DisableService() error
func DisableTun ¶ added in v1.0.3
func DisableTun() error
func EditNodeConfigWithVi ¶ added in v1.0.4
func EditNodeConfigWithVi() error
func EnableService ¶ added in v1.0.4
func EnableService() error
func GetProxyPort ¶
func InstallService ¶ added in v1.0.4
func InstallService() error
func IsCoreInstalled ¶ added in v1.0.4
func IsNotRunning ¶ added in v1.0.3
func IsServiceInstalled ¶ added in v1.0.4
func IsTunEnabled ¶ added in v1.0.3
func ModifyAPISecret ¶ added in v1.0.4
func ShowLogFollow ¶ added in v1.0.3
func ShowLogFollow() error
func UninstallService ¶ added in v1.0.4
func UninstallService() error
Types ¶
type ConfigRestfulResponse ¶
type ConfigRestfulResponse struct { Port int `json:"port"` SocksPort int `json:"socks-port"` RedirPort int `json:"redir-port"` TproxyPort int `json:"tproxy-port"` MixedPort int `json:"mixed-port"` Authentication []interface{} `json:"authentication"` AllowLan bool `json:"allow-lan"` BindAddress string `json:"bind-address"` Mode string `json:"mode"` LogLevel string `json:"log-level"` Ipv6 bool `json:"ipv6"` }
func GetConfigs ¶
func GetConfigs() (*ConfigRestfulResponse, error)
type DelayTestResponse ¶
type ProxyRestfulResponse ¶
Click to show internal directories.
Click to hide internal directories.