Golang : How to protect your source code from client, hosting company or hacker?
- client: don’t hand the sources over, but a prebuilt executable only
- hoster: self host instead
- hacker: pray that my firewall and passwords are stronger than the hackers foo
As you can see, the usual stuff.
Or, if really paranoid, only work with code on a non-connected computer, transfer binary to networked computer by sneaker net (ie. USB, SD card, etc.) .
You can also offer your code as services (web API, sites, etc).
Don’t give it to them.
Go compiles to executable binaries. The source code is not required by end users, hosting companies, etc.
How about they will decompile the binary?
You can’t do much against reverse engineering except not giving away the binary and only selling SaaS.
for hosting you can that how ?
I do not understand the question. As you hand over a binary to a client, you can handover the binary to a hoster.
for Windows you can building .exe(binary) you hand over a client
for Linux I don’t know how it works ? but i think you can build .sh (binary)
for host I don’t know how it works ?
On Linux when you build it, it will produce a executable binary without an extension, same on host if it is a Linux server.
Well, another thing is that one should actually know about how ones target system handles executable code and permissions. If you do not know how linux works, you shouldn’t deploy on linux, if you don’t know mac, don’t deploy there and if you do not know windows, don’t do it…
Some measures do deepend on the system you deploy to.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.