diff --git a/SCopilot/templates/SCopilot.html b/SCopilot/templates/SCopilot.html
index eb25f0d..bf73092 100644
--- a/SCopilot/templates/SCopilot.html
+++ b/SCopilot/templates/SCopilot.html
@@ -446,7 +446,8 @@
const host = window.location.hostname;
const t = new URLSearchParams(window.location.search).get('host');
- const socket = new WebSocket(`ws://${host}:9088/ws?host=${t}`);
+ const port = "{{ .webPort }}";
+ const socket = new WebSocket(`ws://${host}:${port}/ws?host=${t}`);
socket.addEventListener('message', (event) => {
var toastElList = [].slice.call(document.querySelectorAll('.toast'))
diff --git a/SCopilot/templates/index.html b/SCopilot/templates/index.html
index 2229da4..33eab22 100644
--- a/SCopilot/templates/index.html
+++ b/SCopilot/templates/index.html
@@ -130,7 +130,8 @@ 清空所有数据