英文:
Packaging tor in a go project
问题
我正在研究使用Tor(在Go语言中)进行各种操作的方法,到目前为止,我所见到的唯一方法是通过连接到127.0.0.1:9050
作为SOCKS5代理并通过该代理进行通信。
然而,在最终用户接收到的程序中,这将要求他们自己设置Tor。
是否有一种方式可以将Tor与项目打包在一起,以便在运行时自动临时设置Tor?
英文:
I was researching ways of doing various things over Tor (in go), and the only way so far that I've seen is by connecting to 127.0.0.1:9050
as a SOCKS5 proxy and talking over that.
However, in a program that end-users would receive, this would require them setting up tor on their own.
Is there some way of packaging it with the project so that when run, it automatically sets up tor - temporarily - on its own?
答案1
得分: 1
在Linux上,我建议在分发软件包时将Tor指定为依赖项。可以通过Arch Linux的pkgbuild
dependencies来查看示例。
如果用户想要手动检查你的代码并进行构建,你只需告诉他们安装Tor(通过README文件,并在程序执行时检测到Tor未安装时报错)。
英文:
On Linux I recommend you specify Tor as a dependency when distributing your package. An example of this can be seen with Arch Linux's pkgbuild
dependencies.
If people want manually check out your code and build on it, you will just have to tell them to install Tor. (Via a README, and a hard error upon execution of your program, where Tor is not installed.)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论