As you may know, I have recently received a PINE64 1GB board where I run ubuntu 16.04 xenial and one of the reason for which I wanted to own a PINE64 was to run a Tor relay, dedicating at least 200Mb bandwidth.

If you are interested on running a Tor node (non exit) compiling it from sources on a similar setup as mine, these are the steps you need to follow:

# tar zxvf tor-
  • cd into the Tor directory and compile the source code
# cd tor-
# ./configure && make

The compiling process will take about 20 minutes to complete

  • Move and edit the torrc file (Tor config file):
# sudo cp src/config/torrc /usr/local/etc/tor/torrc
# sudo vim /usr/local/etc/tor/torrc

You need to remove the hash in front of the following lines:

# RunAsDaemon 1 (if you want to run it as a deamon)
# ORPort 443 (I personally run it on port 443)
# Nickname (choose your favourite nickname)
# RelayBandwidthRate 10000 KBytes (This value depend on your internet connection capabilities)
# ContactInfo 0xFFFFFFFF mane  (It is good to specify contact details)
# ExitPolicy reject *:* (if you want the relay to run as a non-exit)
  • You are ready to start your Tor relay
# src/or/tor

You should get an output similar to this:

Mar 09 22:04:30.769 [notice] Tor v0.2.7.6 running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.2g and Zlib 1.2.8.
Mar 09 22:04:30.769 [notice] Tor can't help you if you use it wrong! Learn how to be safe at httpss://
Mar 09 22:04:30.770 [notice] Read configuration file "/usr/local/etc/tor/torrc".
Mar 09 22:04:30.778 [notice] Based on detected system memory, MaxMemInQueues is set to 733 MB. You can override this by setting MaxMemInQueues by hand.
Mar 09 22:04:30.781 [notice] Opening Socks listener on
Mar 09 22:04:30.782 [notice] Opening Control listener on
Mar 09 22:04:30.782 [notice] Opening OR listener on

Enjoy your Tor node!

I’ve been playing around with .onion domain names for a while, tried various hash generator tools and get, more or less, custom domain names.

There are multiple tools out there to hash generate but the one that works better for me is, with no doubt, scallion.

Scallion lets you create vanity GPG keys and .onion addresses (for Tor’s hidden services) using OpenCL.

What are valid characters?

  • Tor .onion addresses use Base32, consisting of all letters and the digits 2 through 7, inclusive. They are case-insensitive.
  • GPG fingerprints use hexadecimal, consisting of the digits 0-9 and the letters A-F.

The main reason for preferring scallion to other tools is basically because it is GPU-based, obviously under Windows (linux has several issues with graphic card drivers).

If you are interested on generating your own .onion domain name, you can follow these simple steps:

  • Download scallion
  • Unzip the file
  • Download and install Visual Studio Express
  • Download and intall mono
  • Open ‘scallion.sln’ in Visual Studio Express
  • Build the solution, I did everything in debug mode.

Once all the above steps are completed, open a terminal and use these commands:

  • List devices:
$ mono scallion/bin/Debug/scallion.exe -l
  • Generate a hash:
$ mono C:\path\scallion.exe name_you_want_to_generate

SHA1 hashing is done on the GPU. The hashrates for several GPUs that have been tested are below:

GPU Speed
nVidia Quadro K2000M 90 MH/s
AMD Radeon HD5770 520 MH/s
AMD Radeon HD6850 600 MH/s
NVIDIA GTS 250 128 MH/s
Intel i7-2620M 9.9 MH/s
NVIDIA GTX 970 2350 MH/s

*MH/s = million hashes per second

Enjoy your vanity .onion addresses.

If, like myself, you need to choose from which country you get out on the internet using Tor, all what you need to do is to edit your “/etc/tor/torrc” (for Linux) – %appdata%/tor (for Windows) file adding or modifying the following settings:

StrictExitNodes 1
ExitNodes {Country_Code}

You can add comma if you’d like to use more than one exit node:

StrictExitNodes 1
ExitNodes {Country_Code_1},{Country_Code_2}

Or, if you don’t want to get out from a specific country:

StrictExitNodes 1
ExcludeExitNodes {Country_Code_1}

Here is a list of Tor country codes:

Country                               Abbrev
ASCENSION ISLAND                      {ac}
AFGHANISTAN                           {af}
ALAND                                 {ax}
ALBANIA                               {al}
ALGERIA                               {dz}
ANDORRA                               {ad}
ANGOLA                                {ao}
ANGUILLA                              {ai}
ANTARCTICA                            {aq}
ANTIGUA AND BARBUDA                   {ag}
ARGENTINA REPUBLIC                    {ar}
ARMENIA                               {am}
ARUBA                                 {aw}
AUSTRALIA                             {au}
AUSTRIA                               {at}
AZERBAIJAN                            {az}
BAHAMAS                               {bs}
BAHRAIN                               {bh}
BANGLADESH                            {bd}
BARBADOS                              {bb}
BELARUS                               {by}
BELGIUM                               {be}
BELIZE                                {bz}
BENIN                                 {bj}
BERMUDA                               {bm}
BHUTAN                                {bt}
BOLIVIA                               {bo}
BOSNIA AND HERZEGOVINA                {ba}
BOTSWANA                              {bw}
BOUVET ISLAND                         {bv}
BRAZIL                                {br}
BRITISH VIRGIN ISLANDS                {vg}
BRUNEI DARUSSALAM                     {bn}
BULGARIA                              {bg}
BURKINA FASO                          {bf}
BURUNDI                               {bi}
CAMBODIA                              {kh}
CAMEROON                              {cm}
CANADA                                {ca}
CAPE VERDE                            {cv}
CAYMAN ISLANDS                        {ky}
CHAD                                  {td}
CHILE                                 {cl}
CHRISTMAS ISLANDS                     {cx}
COCOS ISLANDS                         {cc}
COLOMBIA                              {co}
COMORAS                               {km}
CONGO                                 {cg}
COOK ISLANDS                          {ck}
COSTA RICA                            {cr}
COTE D IVOIRE                         {ci}
CROATIA                               {hr}
CUBA                                  {cu}
CYPRUS                                {cy}
CZECH REPUBLIC                        {cz}
DENMARK                               {dk}
DJIBOUTI                              {dj}
DOMINICA                              {dm}
DOMINICAN REPUBLIC                    {do}
EAST TIMOR                            {tp}
ECUADOR                               {ec}
EGYPT                                 {eg}
EL SALVADOR                           {sv}
EQUATORIAL GUINEA                     {gq}
ESTONIA                               {ee}
ETHIOPIA                              {et}
FALKLAND ISLANDS                      {fk}
FAROE ISLANDS                         {fo}
FIJI                                  {fj}
FINLAND                               {fi}
FRANCE                                {fr}
FRANCE METROPOLITAN                   {fx}
FRENCH GUIANA                         {gf}
FRENCH POLYNESIA                      {pf}
GABON                                 {ga}
GAMBIA                                {gm}
GEORGIA                               {ge}
GERMANY                               {de}
GHANA                                 {gh}
GIBRALTER                             {gi}
GREECE                                {gr}
GREENLAND                             {gl}
GRENADA                               {gd}
GUADELOUPE                            {gp}
GUAM                                  {gu}
GUATEMALA                             {gt}
GUINEA                                {gn}
GUINEA-BISSAU                         {gw}
GUYANA                                {gy}
HAITI                                 {ht}
HEARD & MCDONALD ISLAND           {hm}
HONDURAS                              {hn}
HONG KONG                             {hk}
HUNGARY                               {hu}
ICELAND                               {is}
INDIA                                 {in}
INDONESIA                             {id}
IRAN, ISLAMIC REPUBLIC OF             {ir}
IRAQ                                  {iq}
IRELAND                               {ie}
ISLE OF MAN                           {im}
ISRAEL                                {il}
ITALY                                 {it}
JAMAICA                               {jm}
JAPAN                                 {jp}
JORDAN                                {jo}
KAZAKHSTAN                            {kz}
KENYA                                 {ke}
KIRIBATI                              {ki}
KOREA, DEM. PEOPLES REP OF            {kp}
KOREA, REPUBLIC OF                    {kr}
KUWAIT                                {kw}
KYRGYZSTAN                            {kg}
LAO PEOPLE'S DEM. REPUBLIC            {la}
LATVIA                                {lv}
LEBANON                               {lb}
LESOTHO                               {ls}
LIBERIA                               {lr}
LIBYAN ARAB JAMAHIRIYA                {ly}
LIECHTENSTEIN                         {li}
LITHUANIA                             {lt}
LUXEMBOURG                            {lu}
MACAO                                 {mo}
MACEDONIA                             {mk}
MADAGASCAR                            {mg}
MALAWI                                {mw}
MALAYSIA                              {my}
MALDIVES                              {mv}
MALI                                  {ml}
MALTA                                 {mt}
MARSHALL ISLANDS                      {mh}
MARTINIQUE                            {mq}
MAURITANIA                            {mr}
MAURITIUS                             {mu}
MAYOTTE                               {yt}
MEXICO                                {mx}
MICRONESIA                            {fm}
MOLDAVA REPUBLIC OF                   {md}
MONACO                                {mc}
MONGOLIA                              {mn}
MONTENEGRO                            {me}
MONTSERRAT                            {ms}
MOROCCO                               {ma}
MOZAMBIQUE                            {mz}
MYANMAR                               {mm}
NAMIBIA                               {na}
NAURU                                 {nr}
NEPAL                                 {np}
NETHERLANDS ANTILLES                  {an}
NETHERLANDS, THE                      {nl}
NEW CALEDONIA                         {nc}
NEW ZEALAND                           {nz}
NICARAGUA                             {ni}
NIGER                                 {ne}
NIGERIA                               {ng}
NIUE                                  {nu}
NORFOLK ISLAND                        {nf}
NORWAY                                {no}
OMAN                                  {om}
PAKISTAN                              {pk}
PALAU                                 {pw}
PALESTINE                             {ps}
PANAMA                                {pa}
PAPUA NEW GUINEA                      {pg}
PARAGUAY                              {py}
PERU                                  {pe}
PITCAIRN                              {pn}
POLAND                                {pl}
PORTUGAL                              {pt}
PUERTO RICO                           {pr}
QATAR                                 {qa}
REUNION                               {re}
ROMANIA                               {ro}
RUSSIAN FEDERATION                    {ru}
RWANDA                                {rw}
SAMOA                                 {ws}
SAN MARINO                            {sm}
SAO TOME/PRINCIPE                     {st}
SAUDI ARABIA                          {sa}
SCOTLAND                              {uk}
SENEGAL                               {sn}
SERBIA                                {rs}
SEYCHELLES                            {sc}
SIERRA LEONE                          {sl}
SINGAPORE                             {sg}
SLOVAKIA                              {sk}
SLOVENIA                              {si}
SOLOMON ISLANDS                       {sb}
SOMALIA                               {so}
SOUTH AFRICA                          {za}
SOVIET UNION                          {su}
SPAIN                                 {es}
SRI LANKA                             {lk}
ST. HELENA                            {sh}
ST. KITTS AND NEVIS                   {kn}
ST. LUCIA                             {lc}
ST. PIERRE AND MIQUELON               {pm}
SUDAN                                 {sd}
SURINAME                              {sr}
SVALBARD AND JAN MAYEN                {sj}
SWAZILAND                             {sz}
SWEDEN                                {se}
SWITZERLAND                           {ch}
SYRIAN ARAB REPUBLIC                  {sy}
TAIWAN                                {tw}
TAJIKISTAN                            {tj}
THAILAND                              {th}
TOGO                                  {tg}
TOKELAU                               {tk}
TONGA                                 {to}
TRINIDAD AND TOBAGO                   {tt}
TUNISIA                               {tn}
TURKEY                                {tr}
TURKMENISTAN                          {tm}
TURKS AND CALCOS ISLANDS              {tc}
TUVALU                                {tv}
UGANDA                                {ug}
UKRAINE                               {ua}
UNITED ARAB EMIRATES                  {ae}
UNITED KINGDOM (no new registrations) {gb}
UNITED KINGDOM                        {uk}
UNITED STATES                         {us}
URUGUAY                               {uy}
UZBEKISTAN                            {uz}
VANUATU                               {vu}
VATICAN CITY STATE                    {va}
VENEZUELA                             {ve}
VIET NAM                              {vn}
VIRGIN ISLANDS (USA)                  {vi}
WESTERN SAHARA                        {eh}
YEMEN                                 {ye}
ZAMBIA                                {zm}
ZIMBABWE                              {zw}