caddy

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2021 License: MulanPSL-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func AppendConfigOnlyV2rayToSystem(host string, useTls bool, v2rayPort int, path string) error

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

func AppendConfigV2rayAndHTTP2ToSystem(host string, useTls bool, v2rayPort int, path string) error

AppendConfigV2rayAndHTTP2ToSystem 添加V2ray的配置与HTTP2到系统

func Enable

func Enable() error

Enable 设置为开机启动

func GetDownloadUrl

func GetDownloadUrl(goos, goArch, version string) (string, error)

GetDownloadUrl 获取版本的下载链接

func GetLastReleaseVersion

func GetLastReleaseVersion() (string, error)

GetLastReleaseVersion 获取Caddy最后一个版本的版本号

func Install

func Install(goos, goArch, version, installTo, configPath, systemdPath string) error

Install 安装Caddy

func InstallLastRelease

func InstallLastRelease() error

InstallLastRelease 安装最新版本

func IsInstall

func IsInstall() (bool, error)

IsInstall 检查是否已安装Caddy

func IsRunning

func IsRunning() (bool, error)

IsRunning 检查Caddy是否在运行状态

func Start

func Start() error

Start 启动Caddy服务

func Stop

func Stop() error

Stop 停止Caddy服务

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL