Documentation
¶
Index ¶
- Constants
- func AppendConfig(configPath, host string, useTls bool, v2rayPort int, path string, ...) error
- func AppendConfigOnlyV2rayToSystem(host string, useTls bool, v2rayPort int, path string) error
- func AppendConfigV2rayAndCloudreveToSystem(host string, useTls bool, v2rayPort int, path string) error
- func AppendConfigV2rayAndHTTP2AndCloudreveToSystem(host string, useTls bool, v2rayPort int, path string) error
- func AppendConfigV2rayAndHTTP2ToSystem(host string, useTls bool, v2rayPort int, path string) error
- func Enable() error
- func GetDownloadUrl(goos, goArch, version string) (string, error)
- func GetLastReleaseVersion() (string, error)
- func Install(goos, goArch, version, installTo, configPath, systemdPath string) error
- func InstallLastRelease() error
- func IsInstall() (bool, error)
- func IsRunning() (bool, error)
- func Start() error
- func Stop() error
Constants ¶
View Source
const ConfigPath = "/etc/caddy/Caddyfile"
View Source
const InstallTo = "/usr/local/bin"
View Source
const SystemdPath = "/etc/systemd/system/caddy.service"
Variables ¶
This section is empty.
Functions ¶
func AppendConfig ¶
func AppendConfig(configPath, host string, useTls bool, v2rayPort int, path string, cloudreve, cusTls bool) error
AppendConfig 添加Caddy的配置
func AppendConfigOnlyV2rayToSystem ¶
AppendConfigOnlyV2rayToSystem 只添加V2ray的配置到系统
func AppendConfigV2rayAndCloudreveToSystem ¶
func AppendConfigV2rayAndCloudreveToSystem(host string, useTls bool, v2rayPort int, path string) error
AppendConfigV2rayAndCloudreveToSystem 添加V2ray与Cloudreve的配置到系统
func AppendConfigV2rayAndHTTP2AndCloudreveToSystem ¶
func AppendConfigV2rayAndHTTP2AndCloudreveToSystem(host string, useTls bool, v2rayPort int, path string) error
AppendConfigV2rayAndHTTP2AndCloudreveToSystem 添加V2ray的HTTP2模式与Cloudreve两个配置到系统
func AppendConfigV2rayAndHTTP2ToSystem ¶
AppendConfigV2rayAndHTTP2ToSystem 添加V2ray的配置与HTTP2到系统
func GetDownloadUrl ¶
GetDownloadUrl 获取版本的下载链接
func GetLastReleaseVersion ¶
GetLastReleaseVersion 获取Caddy最后一个版本的版本号
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.