Hey all,
I want to add a Minimap into my Sample Game and publish it as a browser game so people can try it out instantly but the Minimap is a paid one. Hence, I want to obfuscate and domain-lock it using
https://obfuscator.io/. But is it safe? Googling for a few seconds I easily found websites that claim they can de-obfuscate JS codes.
Best regards
Aero
If your main goal is to prevent people from easily reading your code, then the obfuscation can help with that. But I'm assuming that your main goal in this situation is to stop people from using the plugin at all.
If it's the latter, then you're more interested in the domain locking, and the obfuscation is moreso just a means to protect the domain locking? If that's the case, then I'm afraid that it's not really very strong protection.
The thing is, a person could simply spoof their domain, and then they don't have to be able to read/edit your code in order to defeat the domain locking. Somewhere in the obfuscated mess of code, it's going to read the browser's
document.domain property, in order to determine whether or not you're on the correct domain... so a person could just re-write the
document.domain getter to always return the correct value, and then your domain locking code will always be happy. You could obfuscate the code all day, and it wouldn't matter.
I can think of a couple other cute ways to get around it as well, but it's probably better not to go into too much detail about these types of things here. The point is, a clever enough person could still steal your plugin.