tailscale network

This commit is contained in:
2026-08-06 11:17:15 +08:00
parent 4df556a175
commit 81470ffea7
2 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
"identifier": "com.lineup.client", "identifier": "com.lineup.client",
"build": { "build": {
"beforeDevCommand": "npm run dev", "beforeDevCommand": "npm run dev",
"devUrl": "http://127.0.0.1:1420", "devUrl": "http://192.168.3.13:1420",
"beforeBuildCommand": "npm run build", "beforeBuildCommand": "npm run build",
"frontendDist": "../dist" "frontendDist": "../dist"
}, },
+9 -6
View File
@@ -41,12 +41,15 @@ declare global {
} }
// 这是登录表单首次显示时使用的本地默认地址;用户提交后的地址会保存到 localStorage。 // 这是登录表单首次显示时使用的本地默认地址;用户提交后的地址会保存到 localStorage。
// `0.0.0.0` is a server bind address, never a browser destination. When the // `0.0.0.0` is a server bind address, never a browser destination.
// Web Host is opened locally use loopback; when it is opened through the // 打包后的 TauriAndroid + macOS)都通过 Tailscale 访问远程 AppServer
// trusted Tailscale Host use the matching reachable AppServer address. // 不能用 loopback(手机/沙盒里 127.0.0.1 指向自己),所以走 100.121.118.116。
const DEFAULT_API = location.hostname === "127.0.0.1" || location.hostname === "localhost" // 仅浏览器本地 dev 模式(`http://127.0.0.1:1420` / `http://localhost:1420`)才回退到 loopback。
? "http://127.0.0.1:8090" const DEFAULT_API = "__TAURI_INTERNALS__" in window
: "http://100.121.118.116:8090"; ? "http://100.121.118.116:8090"
: location.hostname === "127.0.0.1" || location.hostname === "localhost"
? "http://127.0.0.1:8090"
: "http://100.121.118.116:8090";
// 这些状态对象属于当前可信 Host 的装配层:Runtime 负责会话、消息和可靠性, // 这些状态对象属于当前可信 Host 的装配层:Runtime 负责会话、消息和可靠性,
// 它们负责将 Surface、Capability、Artifact 和执行进度投影到当前页面。 // 它们负责将 Surface、Capability、Artifact 和执行进度投影到当前页面。