Documentation ¶
Index ¶
Constants ¶
View Source
const ( SYNOPKG_DSM_VERSION_MAJOR = "7" //系统的主版本 SYNOPKG_DSM_VERSION_MINOR = "2" //系统的次版本 SYNOPKG_DSM_VERSION_BUILD = "64570" //系统的编译版本 SYNOPKG_PKGNAME = "pan-xunlei-com" //包名 SYNOPKG_PKGROOT = "/var/packages/" + SYNOPKG_PKGNAME //包安装目录 SYNOPKG_PKGDEST = SYNOPKG_PKGROOT + "/target" //包安装目录 PID_FILE = SYNOPKG_PKGDEST + "/var/" + SYNOPKG_PKGNAME + ".pid" //进程文件 PAN_XUNLEI_VER = SYNOPKG_PKGDEST + "/bin/bin/version" //版本文件 PAN_XUNLEI_CLI = SYNOPKG_PKGDEST + "/bin/bin/xunlei-pan-cli-launcher." + runtime.GOARCH //启动器 LAUNCHER_LISTEN_PATH = SYNOPKG_PKGDEST + "/var/pan-xunlei-com-launcher.sock" //启动器监听地址 DRIVE_LISTEN_PATH = SYNOPKG_PKGDEST + "/var/pan-xunlei-com.sock" //主程序监听地址 PATH_SYNO_INFO_CONF = "/etc/synoinfo.conf" //synoinfo.conf 文件路径 PATH_SYNO_AUTHENTICATE_CGI = "/usr/syno/synoman/webman/modules/authenticate.cgi" //syno...authenticate.cgi 文件路径 UPDATE_URL = "/webman/3rdparty/" + SYNOPKG_PKGNAME + "/version" )
Variables ¶
View Source
var ( SYNO_PLATFORM = lod.Iif(runtime.GOARCH == "amd64", "geminilake", "rtd1296") //平台 SYNO_MODEL = lod.Iif(runtime.GOARCH == "amd64", "DS920+", "DS220j") //平台 OS_VERSION = SYNO_PLATFORM + " dsm " + SYNOPKG_DSM_VERSION_MAJOR + "." + SYNOPKG_DSM_VERSION_MINOR + "-" + SYNOPKG_DSM_VERSION_BUILD //系统版本 )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Port uint16 `flag:"dashboard_port,p" env:"XL_DASHBOARD_PORT" usage:"网页访问的端口"` Ip net.IP `flag:"dashboard_ip,i" env:"XL_DASHBOARD_IP" usage:"网页访问绑定IP,默认绑定所有IP"` DashboardUsername string `flag:"dashboard_username,u" env:"XL_DASHBOARD_USERNAME,XL_BA_USER" usage:"网页访问的用户名"` DashboardPassword string `flag:"dashboard_password,k" env:"XL_DASHBOARD_PASSWORD,XL_BA_PASSWORD" usage:"网页访问的密码"` DirDownload flags.PathList `` /* 147-byte string literal not displayed */ DirData string `` /* 188-byte string literal not displayed */ Uid uint32 `flag:"uid" env:"XL_UID,UID" usage:"运行迅雷的用户ID"` Gid uint32 `flag:"gid" env:"XL_GID,GID" usage:"运行迅雷的用户组ID"` PreventUpdate bool `flag:"prevent_update" env:"XL_PREVENT_UPDATE" default:"true" usage:"阻止更新"` Chroot string `` /* 169-byte string literal not displayed */ Debug bool `flag:"debug" env:"XL_DEBUG" usage:"是否开启调试日志"` }
Config 配置
func ConfigDefault ¶
func ConfigDefault() (cfg Config)
func (*Config) SetDefault ¶
func (cfg *Config) SetDefault()
SetDefault 默认配置端口2345,下载保存文件夹 /xunlei/downloads, 数据文件夹 /xunlei/data
Click to show internal directories.
Click to hide internal directories.