feat: support fxplay resource URLs (#12558)

This commit is contained in:
ssongliu
2026-04-22 03:01:00 +00:00
committed by GitHub
parent a714d5a84e
commit 8c4ea85d02
4 changed files with 20 additions and 0 deletions
+1
View File
@@ -3,6 +3,7 @@ base:
mode: dev
is_demo: false
is_offline: false
is_fxplay: false
log:
level: debug
+1
View File
@@ -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"`
+9
View File
@@ -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"
}
+9
View File
@@ -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"
}