Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 桌面端内核进程使用随机端口 https://github.com/siyuan-note/siyuan/issues/4952

Liang Dingd1d9b7a3b25b
diff --git a/app/electron/main.js b/app/electron/main.js
index 4ba960405b..1000b980de 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -603,10 +603,6 @@ const initKernel = (initData) => {
}
const getKernelPort = async () => {
- if (isDevEnv) {
- return kernelPort
- }
-
await sleep(200)
let gotPort = false
let count = 0
diff --git a/kernel/util/path.go b/kernel/util/path.go
index 9f3d6bd4a1..04dd913d68 100644
--- a/kernel/util/path.go
+++ b/kernel/util/path.go
@@ -34,7 +34,7 @@ var (
)
const (
- ServerPort = "6806" // HTTP/WebSocket 端口
+ ServerPort = "0" // HTTP/WebSocket 端口
AliyunServer = "https://siyuan-sync.b3logfile.com" // 云端服务地址,阿里云负载均衡,用于接口,数据同步文件上传、下载会走七牛云 OSS http://siyuan-data.b3logfile.com
BazaarStatServer = "http://bazaar.b3logfile.com" // 集市包统计服务地址,直接对接 Bucket 没有 CDN 缓存
BazaarOSSServer = "https://oss.b3logfile.com" // 云端对象存储地址,七牛云,仅用于读取集市包