mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 桌面端内核进程使用随机端口 https://github.com/siyuan-note/siyuan/issues/4952
This commit is contained in:
parent
c61ba7b2d7
commit
2766ea6b97
3 changed files with 4 additions and 4 deletions
|
|
@ -295,7 +295,7 @@ func setFixedPort(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fixedPort := arg["fixedPort"].(bool)
|
fixedPort := arg["fixedPort"].(bool)
|
||||||
model.Conf.FixedPort = fixedPort
|
model.Conf.System.FixedPort = fixedPort
|
||||||
model.Conf.Save()
|
model.Conf.Save()
|
||||||
|
|
||||||
util.PushMsg(model.Conf.Language(42), 1000*15)
|
util.PushMsg(model.Conf.Language(42), 1000*15)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ type System struct {
|
||||||
ConfDir string `json:"confDir"`
|
ConfDir string `json:"confDir"`
|
||||||
DataDir string `json:"dataDir"`
|
DataDir string `json:"dataDir"`
|
||||||
|
|
||||||
NetworkServe bool `json:"networkServe"`
|
NetworkServe bool `json:"networkServe"` // 是否开启网络伺服
|
||||||
|
FixedPort bool `json:"fixedPort"` // 是否使用固定端口 6806
|
||||||
NetworkProxy *NetworkProxy `json:"networkProxy"`
|
NetworkProxy *NetworkProxy `json:"networkProxy"`
|
||||||
|
|
||||||
UploadErrLog bool `json:"uploadErrLog"`
|
UploadErrLog bool `json:"uploadErrLog"`
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ type AppConf struct {
|
||||||
User *conf.User `json:"-"` // 社区用户内存结构,不持久化
|
User *conf.User `json:"-"` // 社区用户内存结构,不持久化
|
||||||
Account *conf.Account `json:"account"` // 帐号配置
|
Account *conf.Account `json:"account"` // 帐号配置
|
||||||
ReadOnly bool `json:"readonly"` // 是否是以只读模式运行
|
ReadOnly bool `json:"readonly"` // 是否是以只读模式运行
|
||||||
FixedPort bool `json:"fixedPort"` // 是否使用固定端口 6806
|
|
||||||
LocalIPs []string `json:"localIPs"` // 本地 IP 列表
|
LocalIPs []string `json:"localIPs"` // 本地 IP 列表
|
||||||
AccessAuthCode string `json:"accessAuthCode"` // 访问授权码
|
AccessAuthCode string `json:"accessAuthCode"` // 访问授权码
|
||||||
System *conf.System `json:"system"` // 系统配置
|
System *conf.System `json:"system"` // 系统配置
|
||||||
|
|
@ -273,7 +272,7 @@ func InitConf() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if util.ContainerStd != util.Container {
|
if util.ContainerStd != util.Container {
|
||||||
Conf.FixedPort = true
|
Conf.System.FixedPort = true
|
||||||
}
|
}
|
||||||
|
|
||||||
Conf.LocalIPs = util.GetLocalIPs()
|
Conf.LocalIPs = util.GetLocalIPs()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue