-
Notifications
You must be signed in to change notification settings - Fork 751
i18n(zh-cn):translate concept/Inter-Process Communication/isolation.md #3347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for tauri-v2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
隔离模式在设计时考虑的最大的威胁模型是**开发威胁**(Development Threats)。除了许多前端构建时工具所包括的数十(甚至数百)个通常是深度嵌套的依赖,一个复杂的应用也还可能捆绑大量(通常也是深度嵌套的)依赖到最终输出。 | ||
## 何时需要 | ||
|
||
Tauri 强烈推荐只要有可能就使用隔离模式。因为隔离应用程序截获来自前端的***所有***信息,它*始终*可以被使用。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方的 所有
在原文中是加粗斜体,需要用 _ ** ** _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我一开始使用的是_** **_
,但是发现这样必须让两边空一格,问了一下AI,它告诉我***也可以实现加粗斜体。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那可能是markdown标准不太一样
|
||
Tauri 同时也强烈推荐在使用外部 Tauri API 时加强应用的安全性。作为开发者,你可以使用安全隔离应用程序尝试验证 IPC 输入,以确保它们在某些预期参数范围内。例如,你可能需要检查读取或写入文件的调用是否尝试访问应用程序预期位置之外的路径。另一个例子是确保 Tauri API 的 HTTP 获取调用仅将 Origin 标头设置为应用程序预期的值。 | ||
|
||
也就是说,它会拦截来自前端的***所有***消息,因此它甚至可以与始终在线的 API(例如 [事件] ) 配合使用。由于某些事件可能会导致你自己的 Rust 代码执行操作,因此可以对它们使用相同类型的验证技术。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方也是一样的
|
||
```javascript | ||
window.__TAURI_ISOLATION_HOOK__ = (payload) => { | ||
// let's not verify or modify anything, just print the content from the hook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码块中的英文注释也需要翻译
你提 pr 要在新的分支里提 commit ,如果在之前提 pr 的分支里交新的 commit ,会让之前的 pr 更新。而你需要提一个新的 pr ,而不是在原来的 pr 上修改。这个 pr 最好改回原来的标题,然后 close ,后面的 commit 再新分支里提交。 |
您的意思是说每次提交一个新文件时开一个新的pr吗?我之前的pr好像被合并了,本来想让这个文件也提交到上一个pr里的。 |
是的,你的上一个 pr 被合并了,本来应该是关闭的。但是你又在上一个 pr 里添加了新的东西,导致它没有关闭。对于已经合并的 pr,我的建议是让它关闭,你需要将你新提交的文件新开一个 pr。通常我们是在所有修改完成后再打开 pr,当 review 通过并合并后该 pr 就自然关闭。不太建议你隔一段时间追加一个新的修改,至少你需要在 pr 中声明还有需要追加的修改,否则仓库维护者无法判断是否应当合并。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you peeps! 😁
Description