如何保护电子项目中的源代码 [英] How to protect source code in electron project

查看:16
本文介绍了如何保护电子项目中的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我构建了我的第一个电子应用程序,但现在我想知道如何保护源代码以供其他开发人员查看.

I build my first electron app but now I wonder how to protect the source code to be view by other developers.

官方文档说:

为了保护您的应用的资源和源代码不被用户发现,您可以选择将您的应用程序打包到一个 asar 存档中更改您的源代码.

To protect your app's resources and source code from the users, you can choose to package your app into an asar archive with little changes to your source code.

到目前为止,我能想到的最好的方法是 uglyfy 源代码并将其打包到 asar 文件中,但是 asar 文件只是一个存档,可以很容易地提取.我不明白这如何使您的代码不受用户影响"

So far the best I can think of is uglyfy the source-code and package it into a asar file, but the asar file is just an archive and can be easily be extracted. I don't see how having that make your code "protected from the user"

有什么想法吗?

推荐答案

目前没有官方的方法来复制保护你的代码,抱歉 - 如果你想这样做,你必须发明你自己的方法(或者只是不担心)

There is no official way to copy-protect your code at the moment, sorry - if you want to do this, you'll have to invent your own way (or just not worry about it)

这篇关于如何保护电子项目中的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆