mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-22 08:00:53 +00:00
feat: support fxplay resource URLs (#12558)
This commit is contained in:
@@ -3,6 +3,7 @@ base:
|
||||
mode: dev
|
||||
is_demo: false
|
||||
is_offline: false
|
||||
is_fxplay: false
|
||||
|
||||
log:
|
||||
level: debug
|
||||
|
||||
@@ -8,6 +8,7 @@ type ServerConfig struct {
|
||||
|
||||
type Base struct {
|
||||
Port string `mapstructure:"port"`
|
||||
IsFxplay bool `mapstructure:"is_fxplay"`
|
||||
Edition string `mapstructure:"edition"` // [ cn / intl]
|
||||
Version string `mapstructure:"version"`
|
||||
EncryptKey string `mapstructure:"encrypt_key"`
|
||||
|
||||
@@ -42,18 +42,27 @@ var (
|
||||
)
|
||||
|
||||
func RepoURL() string {
|
||||
if CONF.Base.IsFxplay {
|
||||
return "https://resource.fit2cloud.com/1panel/package/fusionxplay"
|
||||
}
|
||||
if CONF.Base.Edition != "intl" {
|
||||
return "https://resource.fit2cloud.com/1panel/package/v2"
|
||||
}
|
||||
return "https://resource.1panel.pro/v2"
|
||||
}
|
||||
func ResourceURL() string {
|
||||
if CONF.Base.IsFxplay {
|
||||
return "https://resource.fit2cloud.com/1panel/resource/fusionxplay"
|
||||
}
|
||||
if CONF.Base.Edition != "intl" {
|
||||
return "https://resource.fit2cloud.com/1panel/resource/v2"
|
||||
}
|
||||
return "https://resource.1panel.pro/v2/resource"
|
||||
}
|
||||
func AppRepoURL() string {
|
||||
if CONF.Base.IsFxplay {
|
||||
return "https://apps-assets.fit2cloud.com"
|
||||
}
|
||||
if CONF.Base.Edition != "intl" {
|
||||
return "https://apps-assets.fit2cloud.com"
|
||||
}
|
||||
|
||||
@@ -36,18 +36,27 @@ var (
|
||||
type DBOption func(*gorm.DB) *gorm.DB
|
||||
|
||||
func RepoURL() string {
|
||||
if CONF.Base.IsFxplay {
|
||||
return "https://resource.fit2cloud.com/1panel/package/fusionxplay"
|
||||
}
|
||||
if CONF.Base.Edition != "intl" {
|
||||
return "https://resource.fit2cloud.com/1panel/package/v2"
|
||||
}
|
||||
return "https://resource.1panel.pro/v2"
|
||||
}
|
||||
func ResourceURL() string {
|
||||
if CONF.Base.IsFxplay {
|
||||
return "https://resource.fit2cloud.com/1panel/resource/fusionxplay"
|
||||
}
|
||||
if CONF.Base.Edition != "intl" {
|
||||
return "https://resource.fit2cloud.com/1panel/resource/v2"
|
||||
}
|
||||
return "https://resource.1panel.pro/v2/resource"
|
||||
}
|
||||
func AppRepoURL() string {
|
||||
if CONF.Base.IsFxplay {
|
||||
return "https://apps-assets.fit2cloud.com"
|
||||
}
|
||||
if CONF.Base.Edition != "intl" {
|
||||
return "https://apps-assets.fit2cloud.com"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user