专有网络组件
假设我们有一些专为特定公司需求而设计和开发的专有 Web 组件。
我们能否保护我们的网络组件不被他人使用?如果可以,如何保护?
注意:我并不是在谈论其他开发人员修改组件,我只是首先考虑其他人立即使用它们。
Let's say we have some proprietary web components which were designed and developed for a specific company needs.
Can we safeguard our web components from being used by others? If yes, how?
Note: I am not talking about other developers modifying the component, I am only thinking about others using them straight away in the first place.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这只是JS。你能做的就是拖延黑客的攻击。
您最多可以使用 JSObfuscator 和 JSFuck 等工具来使您的代码尽可能不可读。但当然,经验丰富的黑客也有工具……
然后我突然意识到;这一切都是为了增加额外的障碍,而且还有一个障碍我们可以采取行动。
我写了一篇关于使用 URI 编码 Web 组件的书呆子 DEV.to 博客文章
基本上可以归结为不要像混淆器那样将字典放入文件本身;
但将编码字典放在 URI 中(域路径更好!):
并执行:
It is just JS. All you can do is delay hackers.
The most you can do is use tools like JSObfuscator and JSFuck to make your code as unreadable as possible. But ofcourse experienced hackers have tools also...
Then it dawned me; it is all about adding extra hurdles, and there is one more hurdle we can call to action.
I wrote a nerdy DEV.to blog post about using the URI to encode your Web Components
Basically boils down to NOT putting the Dictionary in the file itself, like Obfuscators do;
but placing the encoding dictionary in the URI (Domain Path even better!):
And executing: