Skip to content

Commit 8a5e60d

Browse files
committed
support fxplay resource URLs
1 parent cc0ac8c commit 8a5e60d

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

agent/cmd/server/conf/app.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ base:
33
mode: dev
44
is_demo: false
55
is_offline: false
6+
is_fxplay: false
67

78
log:
89
level: debug

agent/global/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type ServerConfig struct {
88

99
type Base struct {
1010
Port string `mapstructure:"port"`
11+
IsFxplay bool `mapstructure:"is_fxplay"`
1112
Edition string `mapstructure:"edition"` // [ cn / intl]
1213
Version string `mapstructure:"version"`
1314
EncryptKey string `mapstructure:"encrypt_key"`

agent/global/global.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,27 @@ var (
4242
)
4343

4444
func RepoURL() string {
45+
if CONF.Base.IsFxplay {
46+
return "https://resource.fit2cloud.com/1panel/package/fusionxplay"
47+
}
4548
if CONF.Base.Edition != "intl" {
4649
return "https://resource.fit2cloud.com/1panel/package/v2"
4750
}
4851
return "https://resource.1panel.pro/v2"
4952
}
5053
func ResourceURL() string {
54+
if CONF.Base.IsFxplay {
55+
return "https://resource.fit2cloud.com/1panel/resource/fusionxplay"
56+
}
5157
if CONF.Base.Edition != "intl" {
5258
return "https://resource.fit2cloud.com/1panel/resource/v2"
5359
}
5460
return "https://resource.1panel.pro/v2/resource"
5561
}
5662
func AppRepoURL() string {
63+
if CONF.Base.IsFxplay {
64+
return "https://apps-assets.fit2cloud.com"
65+
}
5766
if CONF.Base.Edition != "intl" {
5867
return "https://apps-assets.fit2cloud.com"
5968
}

core/global/global.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,27 @@ var (
3636
type DBOption func(*gorm.DB) *gorm.DB
3737

3838
func RepoURL() string {
39+
if CONF.Base.IsFxplay {
40+
return "https://resource.fit2cloud.com/1panel/package/fusionxplay"
41+
}
3942
if CONF.Base.Edition != "intl" {
4043
return "https://resource.fit2cloud.com/1panel/package/v2"
4144
}
4245
return "https://resource.1panel.pro/v2"
4346
}
4447
func ResourceURL() string {
48+
if CONF.Base.IsFxplay {
49+
return "https://resource.fit2cloud.com/1panel/resource/fusionxplay"
50+
}
4551
if CONF.Base.Edition != "intl" {
4652
return "https://resource.fit2cloud.com/1panel/resource/v2"
4753
}
4854
return "https://resource.1panel.pro/v2/resource"
4955
}
5056
func AppRepoURL() string {
57+
if CONF.Base.IsFxplay {
58+
return "https://apps-assets.fit2cloud.com"
59+
}
5160
if CONF.Base.Edition != "intl" {
5261
return "https://apps-assets.fit2cloud.com"
5362
}

0 commit comments

Comments
 (0)