Quick Start: GitHub via Tor

    I suggest using Tor to access sites that do not have direct access.


    The Tor network is a proxy system that allows you to establish an anonymous network connection. Using Tor, you can anonymously connect to regular servers and host unheard servers on the Tor network itself.

    Here's a couple of ways to connect to Github via Tor.

    Method 1: Torsocks (not for Windows)

    On Debian and Ubuntu, just install the tor package:

    # apt-get install tor

    The tor package includes torsocks. If you assign torsocks to a program start command (for example, git), then its network activity (including domain resolution) will go through Tor. Network activity that cannot be passed through Tor will be clipped (for example, UDP).

    torsocks git push
    torsocks git pull

    Method 2: Proxy SSH via Tor

    $ cat ~/.ssh/config
    Host github
    Hostname github.com
    User git
    ProxyCommand /bin/nc -X 5 -x localhost:9050 %h %p
    $ git clone github:starius/lapis.git

    (Note the use of github instead of git@github.com in the git command. If you use a Tor browser instead of the tor system service, the port will be 9150 instead of 9050.)

    This method requires netcat-openbsd. If another netcat is used, problems may occur. In this case, you need to install the netcat-openbsd package.

    UPD . This method works on Windows (Cygwin). You need to install the git, openssh and nc packages. You can use Tor as part of the Tor browser (then the SOCKS5 port will be 9150).

    Method 3. Specify proxies in the Git configuration (not SSH)

    $ git config --global http.proxy socks5://localhost:9050
    $ git config --global https.proxy socks5://localhost:9050

    (If you use a Tor browser instead of the tor system service, the port will be 9150 instead of 9050.)

    After that, you can work with Github in normal mode, but only through http and https:

    $ git clone https://github.com/leafo/lapis

    This method works on Linux, Mac, Windows (most likely it will work wherever there is a torus and git).

    Why Tor, Not I2P?

    1. I2P is primarily intended for connections within the hidden network itself (with hidden sites). Going out of the hidden network to the good old Internet is Tor's main purpose, and for I2P it is an additional application. Yes, and Tor capacities on Exit nodes are many times greater than the power of one Exit-proxy node, which is in I2P. The download speed through Tor I have is in the range of 500-1000 kilobytes per second.
    2. Access to Tor cannot be blocked thanks to meek (in the picture, to attract attention, a screenshot of the tor browser connecting via azure). Meek is based on the principle of connecting through sites too large to block: google, azure, amazon. If google.com is available via https, then tor is available! About meek . UPD In China, google is still blocked .
    3. Tor is easier to raise than I2P. The tor browser includes everything you need and even a child can download and run it, and the debian has long had a tor package. I2P in this sense loses a lot.

    You can help the Tor network!

    1. Launch Tor Network Server
    2. Make a donation
    3. Other Ways To Help Tor

    PS. Inspired by the publication “ Quick Start Guide: GitHub via I2P ”. I wanted to write a detailed comment, but the material accumulated on a separate post. I wonder why there is an I2P hub on the hub, but there is no Tor hub.

    Also popular now: