<p dir="auto">Hello Everyone!</p>
<p dir="auto">I was wondering if it would be possible to implement a method so that users who develop Electron-based apps could bundle their applications with the electron executable as to help obscure their source code further.</p>
<p dir="auto">As it currently stands, it's rather simple for someone to obtain the source code of your application regardless of whether or not you bundle it into an .asar file.</p>
<p dir="auto">Although not entirely secure, as it currently stands NW.JS has a method for bundling their .nw files (which is basically a ZIP File renamed) with their executable. I can't quite remember exactly how it was done (because it's been a while since I've used electron or nw.js), but I explain it briefly in this other Github post for Electron-packager.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="110585480" data-permission-text="Title is private" data-url="https://github.com/electron/electron-packager/issues/152" data-hovercard-type="issue" data-hovercard-url="/electron/electron-packager/issues/152/hovercard" href="https://github.com/electron/electron-packager/issues/152">electron/electron-packager#152</a></p>
<p dir="auto">Here is the command line tool for bundling .nw files into an executable with Node-Webkit</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="copy /B nw.exe+app.nw app.exe"><pre class="notranslate"><code class="notranslate">copy /B nw.exe+app.nw app.exe
</code></pre></div>
<p dir="auto">The only issue with this is that even if electron adopted this kind of method it would still not be entirely secure. There are still ways that you could get the source code.</p>
<p dir="auto">The only way I see this working is if someone built a tool to create a custom version of electron that had a sort of encryption key in it that would decrypt the .asar file and run it's contents that way. Because other than that I see no other way of doing this..</p>
<p dir="auto">Any suggestions?</p>
<p dir="auto">If I've missed something, please let me know. I'm just getting back into electron after a long while of doing other things.</p>
<p dir="auto">Thanks</p>
<p dir="auto">It appears to have been a while since the last discussions on source code protection with snapshots. NW.js and enclosejs have found ways to do snapshots without including the source code. I was wondering if this could be looked at again, thank you!</p>