连接到开源应用程序中的服务器

发布于 2024-10-05 23:34:15 字数 1436 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花期渐远 2024-10-12 23:34:15

您可以有一个包含该信息的文件,然后程序从那里读取,或者您可以在包含在主程序中的源代码文件中包含该信息。只要不要与其余源代码共享它们就可以了;)

e.g.
readDataFromFile("confidential.dat")
or
#include "confidential.h"
(...)

You can have a file that holds that info and then the program just reads from there, or you can have that info in a source code file that you include in the main program. Just don't share them with the rest of the source code and you're set ;)

e.g.
readDataFromFile("confidential.dat")
or
#include "confidential.h"
(...)
南笙 2024-10-12 23:34:15

这样做的方式与将 pi 转化为有理数的方式相同。您不能将分布式程序中的 IP 地址设为秘密。 'netstat' 如果没有其他任何东西会在程序连接到您的服务器后立即显示它。

You would do this the same way you would make pi into a rational number. You can't make an IP address in a distributed program a secret. 'netstat' if nothing else will reveal it as soon as the program makes a connection to your server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文