最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to protect source code of chrome packaged app? - Stack Overflow

programmeradmin2浏览0评论

If a chrome app can work offline it means that source code is downloaded somewhere.

My question is how to protect it?

The only thing that es to my mind is minification of javascript code. Is there anything else?

If a chrome app can work offline it means that source code is downloaded somewhere.

My question is how to protect it?

The only thing that es to my mind is minification of javascript code. Is there anything else?

Share Improve this question edited Jan 29, 2014 at 9:07 Liath 10.2k10 gold badges54 silver badges82 bronze badges asked Jan 29, 2014 at 9:06 QvatraQvatra 3,8577 gold badges52 silver badges81 bronze badges 3
  • 1 Javascript is downloaded to the client machine (and can be manipulated there) for this reason it can never be secure or secret. As you say the best you can hope for is obfuscation. – Liath Commented Jan 29, 2014 at 9:08
  • @Liath, it seems to be an answer - post it. btw do you know where a source code located on the client machine? – Qvatra Commented Jan 29, 2014 at 9:22
  • @Qvarta JS is going to be down to the browser in question - I'm afraid I don't know enough about chrome extensions to be able to tell you any more. Different question! – Liath Commented Jan 29, 2014 at 9:25
Add a ment  | 

4 Answers 4

Reset to default 5

You could try to put most of your app's functionality into a NaCL module. Good luck with that :-)

There is nothing to protect it as all in the web.

But you can add a license text ;)

––––– Update: you can try to use snapshot if you use the nw.js

Javascript is downloaded to the client machine (and can be manipulated there) for this reason it can never be secure or secret. As you say the best you can hope for is obfuscation.

From google developers FAQ

Can I sell a packaged app?
Yes, but there are risks in doing so. Specifically, it is easy for motivated people to bypass payments for packaged apps. This holds true even if you have used our Licensing API in your locally stored packaged app, since locally stored content is not secure and can be modified (including calls to the Licensing API). If you’d like to have the option of blocking access to your app by unauthorized users, selling a packaged app may not be the right solution for you. An alternative to consider is moving to a hosted app model with a server-side licensing check.

发布评论

评论列表(0)

  1. 暂无评论