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",
"build": {
"beforeDevCommand": "npm run dev",
"devUrl": "http://127.0.0.1:1420",
"devUrl": "http://192.168.3.13:1420",
"beforeBuildCommand": "npm run build",
"frontendDist": "../dist"
},
+7 -4
View File
@@ -41,10 +41,13 @@ declare global {
}
// 这是登录表单首次显示时使用的本地默认地址;用户提交后的地址会保存到 localStorage。
// `0.0.0.0` is a server bind address, never a browser destination. When the
// Web Host is opened locally use loopback; when it is opened through the
// trusted Tailscale Host use the matching reachable AppServer address.
const DEFAULT_API = location.hostname === "127.0.0.1" || location.hostname === "localhost"
// `0.0.0.0` is a server bind address, never a browser destination.
// 打包后的 TauriAndroid + macOS)都通过 Tailscale 访问远程 AppServer
// 不能用 loopback(手机/沙盒里 127.0.0.1 指向自己),所以走 100.121.118.116。
// 仅浏览器本地 dev 模式(`http://127.0.0.1:1420` / `http://localhost:1420`)才回退到 loopback。
const DEFAULT_API = "__TAURI_INTERNALS__" in window
? "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";