【rust:tauri-app踩坑记录】dangerousRemoteDomainIpcAccess 不适用于IP地址,临时解决方案

找到一个临时解决方案:

修改依赖包的源代码

找到

C:\Users%USER_HOME%.cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-1.4.1\src\scope\ipc.rs

修改 函数 remote_access_for

将 155 行中的 matches_domain 删除掉,去掉校验

rust 复制代码
if matches_window && matches_domain && scope.is_none() {
        scope.replace(s.clone());
}

改成

rust 复制代码
if matches_window && scope.is_none() {
        scope.replace(s.clone());
}

可以临时用来解决这个问题

最后记得删除 项目中的 src-tauri/target 文件夹,重新调试或者打包即可

相关推荐
mldong7 小时前
工作流引擎的灵魂:状态机与 submitType
后端
BUG研究员_9 小时前
Runnable与LCEL
开发语言·人工智能·python
朦胧之10 小时前
Go 基础
后端·go
lun10 小时前
Agent 工具调用成长史:理清楚 Function Calling、MCP、CLI 的关系
后端
Python私教10 小时前
Codex 自动写 Commit 够安全吗?一套证据化 Git 提交流程
人工智能·git·后端
Python私教10 小时前
AI Agent 上生产要不要开写权限?我把执行链拆成 4 道闸门
人工智能·后端·python
lun10 小时前
Claude Code 多 Agent 实现:subAgent & Agent Teams
后端
牛艺翔11 小时前
C++基础
开发语言·c++
键盘会跳舞11 小时前
C++ :容器适配器stack源码级拆解
开发语言·c++··stack·先进后出
美味蛋炒饭.11 小时前
Git 版本控制(下)
开发语言·git·学习·总结·后端开发