Packaging tor in a go project

huangapple go评论83阅读模式
英文:

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.)

huangapple
  • 本文由 发表于 2016年10月30日 21:08:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/40329462.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定