我希望匿名地为Github上的项目做出贡献,不是为了恶作剧,而是出于匿名捐赠的精神。
在线上保持匿名的工具似乎是TOR,在浏览器中几乎可以处理任何事情。但是,在Github上做出贡献似乎需要使用命令行界面或Mac应用程序。
在这种设置下,我如何将git操作通过Tor进行传输?我如何验证实际发生的情况?
编辑: 请注意,匿名(使用无法与身份关联的IP地址)和化名(使用假电子邮件地址)之间的区别。访问Github的化名方式很简单,但我要寻找的是匿名方式。
我希望匿名地为Github上的项目做出贡献,不是为了恶作剧,而是出于匿名捐赠的精神。
在线上保持匿名的工具似乎是TOR,在浏览器中几乎可以处理任何事情。但是,在Github上做出贡献似乎需要使用命令行界面或Mac应用程序。
在这种设置下,我如何将git操作通过Tor进行传输?我如何验证实际发生的情况?
编辑: 请注意,匿名(使用无法与身份关联的IP地址)和化名(使用假电子邮件地址)之间的区别。访问Github的化名方式很简单,但我要寻找的是匿名方式。
这些答案都没有提供一个完整可用的工作流程,我想要git push
,而不是发送电子邮件!这是正确的做法,但需要进行一些设置。以下指令适用于OSX。
Download tor browser bundle AND the tor command line proxy
brew install tor
brew cask install torbrowser
1.1 In tor browser, Create a new email address ( I used hmamail).
1.2 In tor browser, Create a new github account
Create a new ssh key, only for tor with your new email address
ssh-keygen -t rsa -b 4096 -C "satoshi_2@hmamail.com"
2.1. Give it a name like: ~/.ssh/private_tor_rsa
2.2. In github, go to SSH and PGP keys and add a new SSH key, make title memorable.
2.3. In github, set Key to the public key you've just createdclip < ~/.ssh/private_tor_rsa.pub
In github, create an empty repository, let's call it ByteCoin
, don't initialise it with a readme.
Edit the ssh config file ~/.ssh/config
(create if it doesn't exist)
Host github-tor-alias
User git
HostName github.com
IdentitiesOnly yes
IdentityFile ~/.ssh/tor_only_rsa
ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p
You've created a hostname called github-tor-alias
and tells ssh to use a proxy on localhost:9050
and use the tor_only_rsa
key to authenticate.
Setup the config for your new project to use the tor proxy and credentials.
mkdir secret-project
cd secret-project
git init
git config --add user.name satoshi_2
git config --add user.email staoshi_2@hmamail.com
5.1. 注意ssh://git和github-tor-alias
git remote add origin ssh://git@github-tor-alias/staoshi_2/ByteCoin.git
Remember how you installed the tor command line proxy? start it as a service. It listens on localhost:9050
brew services start tor
Are you ready? Try pushing to github:
git push origin master
它有效了吗?请仔细检查一切,我有没有遗漏什么?请编辑这个答案!
呼吸那自由的空气,开始创作吧!
那么我们刚刚做了什么?我们创建了一个新的身份,该身份仅与tor网络相关联,就github.com而言,您是staoshi_2,可能在世界的任何地方。
tor在127.0.0.1:9050
上运行代理,因为我们在~/.ssh/config
文件中设置了ProxyCommand
,所以您的所有流量都通过tor代理进行,git使用您的新ssh密钥,因为您在~/.ssh/config
文件中添加了IdentityFile
和IdentitiesOnly
。
非常强大。
让我们再次确认您是否真正匿名。
stop tor
and try to git push
again, it had better fail!
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
8.1. If that git push succeeded well guess what, you weren't using tor, github.com knows your IP, figure out how to get it working and then start again with a new email address.
作者匿名。
ProxyCommand socat STDIO SOCKS4A:127.0.0.1:%h:%p,socksport=9050
对我来说是有效的。 - rraallvvexport GIT_SSH_COMMAND="ssh -v -F /anongit/ssh_config"
。我还在我的ssh_config
文件中包含了UserKnownHostsFile /anongit/known_hosts
。 - ngreengit diff
并使用任何匿名消息服务将补丁发送给项目所有者。Freenet 和邮政邮件都是不错的选择。git format-patch
会在输出中添加一个From:
行,其中包含您配置的全名和电子邮件地址。这可能不是您想要的。 - Wander Nauta配置git代理服务器 使git与代理服务器一起工作
如果这在TOR网络中不起作用,那么只需在虚拟机中运行git
命令,其中主机机器正在使用TOR网络连接到外部世界。
我认为这将混淆您提交的来源,但匿名电子邮件部分可能仍然很困难。
匿名电子邮件提供商时来时去,但截至2015年,Lelantos是一个提供明网电子邮件地址的TOR隐藏服务。可以使用http://www.xmr.to匿名所有比特币交易,从而以更私密的Monero网络支付比特币收据。
为什么不简单地创建一个假名电子邮件,同时在TOR中创建,从不从TOR之外访问它,并将其用于github合规性呢?
这很复杂,超出了我的能力范围。幸运的是,有一些发行版可以支持这种操作,例如Tails或Whonix。还有另外一个发行版,Attack Vector,可能带有开发工具,但它没有经过充分的验证。
在安装其中一个发行版后,你将能够通过tor浏览器访问github的界面,并且可以通过SSH或HTTPS提交,无需特殊配置。
我建议选择Whonix,因为它更容易持久化你需要的数据,并保证主机的根级别威胁不会危及你的身份。
在Linux中:
安装Tor并前往http://tormail.org/创建一个匿名电子邮件帐户。
在本地计算机上创建一个新的Linux用户,并为该用户生成一个新的SSH密钥,以便您的匿名帐户不具有与其他Github帐户相同的公钥 :-) 您将通过此用户帐户执行所有匿名工作。
接下来使用您的Tor邮箱注册Github账号并安装刚刚生成的公钥。
现在安装socat http://freecode.com/projects/socat。但是,您可能会在发行版的软件包管理器中找到它。
现在编辑 /etc/ssh/ssh_config 并添加
HOST *
ProxyCommand socat STDIO SOCKS4A:127.0.0.1:%h:%p,socksport=9050
确保您的Tor配置使用端口9050。您应该在torrc文件中看到以下内容:
SocksListenAddress 127.0.0.1
SocksPort 9050
现在,所有的SSH都将通过TOR进行,包括通过SSH协议访问Github。因此,请使用SSH协议进行克隆:git clone git@github.com:bitcoin/bitcoin.git
使用Wireshark验证没有任何直接连接到Github。
git format-patch
通过电子邮件发送提交。git send-email
。 - Greg$ git remote add tor https://github.com/yourUser/yourProject
$ torsocks git pull tor
$ torsocks git push tor
显然,您需要记住在git命令中添加tor
后缀,或者您可以配置别名:
$ alias gpushtor="torsocks git push tor"
$ alias gpulltor="torsocks git pull tor"
https://
远程服务一起使用)您可以使用 tsocks
或 torify
使任何应用程序通过 Tor 工作。