Documentation
¶
Index ¶
- Variables
- func CheckConnectivity(ip string, port int)
- func CheckSingBoxInstalled() bool
- func GenerateBasicSingBoxServerConfig(dataDir string) (*option.Options, error)
- func GenerateSingBoxConnectConfig(dataDir, publicIP, username string) ([]byte, error)
- func GetPublicIP() (string, error)
- func GetShadowsocksInboundConfig(singBoxServerConfig *option.Options) (*option.ShadowsocksInboundOptions, error)
- func ReadSingBoxServerConfig(dataDir string) (*option.Options, error)
- func RestartSingBox() error
- func RevokeUser(dataDir, username string) error
- func WriteSingBoxServerConfig(dataDir string, opt *option.Options) error
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var AdminExpirationTime = time.Date(2900, 1, 1, 0, 0, 0, 0, time.UTC)
Functions ¶
func CheckConnectivity ¶
func CheckSingBoxInstalled ¶
func CheckSingBoxInstalled() bool
func GetPublicIP ¶
func GetShadowsocksInboundConfig ¶
func GetShadowsocksInboundConfig(singBoxServerConfig *option.Options) (*option.ShadowsocksInboundOptions, error)
func ReadSingBoxServerConfig ¶
func RestartSingBox ¶
func RestartSingBox() error
func RevokeUser ¶
Types ¶
type ServerConfig ¶
type ServerConfig struct {
IP string `json:"ip"`
Port int `json:"port"`
AccessToken string `json:"access_token"`
HMACSecret []byte `json:"hmac_secret"`
}
func GenerateServerConfig ¶
func GenerateServerConfig(dataDir string) (*ServerConfig, error)
func ReadServerConfig ¶
func ReadServerConfig(dataDir string) (*ServerConfig, error)
func (*ServerConfig) GetNewServerURL ¶
func (c *ServerConfig) GetNewServerURL() string
func (*ServerConfig) GetQR ¶
func (c *ServerConfig) GetQR() string
Click to show internal directories.
Click to hide internal directories.