1. Enable Automatic Software Updates

One of the most important things to keep your relay secure is to install security updates timely and ideally automatically so you can not forget about it. Follow the instructions to enable automatic software updates for your operating system.

2. Install tor

To install the tor package on Arch Linux, please run:

# pacman -Syu tor

3. Install a Pluggable Transport

We are opting here to install and use obfs4 as pluggable transport, so we are going to install obfs4proxy.

Sadly there's no package available on Arch Linux's official repositories to install it, so we must either build and it from source, or use the AUR (ArchLinux User Repository).

Should you opted to use AUR, once makepkg must not run as root, here is how obfs4proxy can be installed on Arch Linux using an unprivileged user account with sudo permissions:

$ sudo pacman -Syu git
$ git clone https://aur.archlinux.org/obfs4proxy
$ cd obfs4proxy
$ makepkg -irs
  • DISCLAIMER: AUR packages are user produced content. Any use of the provided files is at your own risk.

    For more information on installing or building obfs4proxy from source, please refer to its official docummentation.

4. Edit your Tor config file, usually located at /etc/tor/torrc and replace its content with:

BridgeRelay 1
DataDirectory /var/lib/tor
User tor

#  "TODO1" را با درگاه تور انتخابی خود جایگزین کنید. این باید به صورت خارجی
# قابل دسترس باشد. از استفاده از درگاه 9001 اجتناب کنید چون معمولاً با تور
# , مرتبط است و سانسور کنندگان اینترنت را برای این درگاه اسکن می کنند.
ORPort TODO1

ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy

# "TODO2" را با درگاه obfs4 انتخابی خود جایگزین کنید. این درگاه باید
# از خارج قابل دسترس باشد و از درگاه مشخص شده برای ORPort باید تفاوت داشته باشد.
# از درگاه 9001 اجتناب کنید چون به صورت رایج با
# تور مرتبط است و سانسور کنندگان ممکن است اینترنت را برای این درگاه اسکن کنند.
ServerTransportListenAddr obfs4 0.0.0.0:TODO2

# درگاه ارتباط محلی بین تور و obfs4. همیشه این را روی "auto" تنظیم کنید.
#  "Ext" به معنای "تعمیم یافته" است نه "خارجی". یک شماره درگاه خاص
# را مشخص نکنید یا روی 0.0.0.0 شنود نکنید.
ExtORPort auto

# نشانی ایمیل خود را با "<address@email.com>" تغییر دهید تا بتوانیم در صورت نیاز با شما ارتباط برقرار کنیم
# پل شما مشکلاتی دارد. این انتخابی می باشد ولی توصیه می شود.
اطلاعات مخاطب <address@email.com>

# یک نام مستعار برای پل خود انتخاب کنید. این به اختیار شما می باشد.
Nickname PickANickname

فراموش نکنید تا گزینه های ORPort, ServerTransportListenAddr, ContactInfo, و Nickname را تغییر دهید.

  • توجه داشته باشید که هم درگاه OR تور و درگاه obfs4 آن باید قابل دسترس باشند. اگر پل شما پشت یک دیوار آتش یا ترجمه نشانی شبکه قرار گرفته، مطمئن شوید که هر دو را باز کرده اید. می توانید از آزمون دسترس‌پذیری ما برای بررسی قابل دسترس بودن درگاه obfs4 از اینترنت استفاده کنید.

5. Enable and Start tor

# systemctl enable --now tor
... or restart it if it was running already, so configurations take effect
# systemctl restart tor

6. نکات پایانی

If you are having trouble setting up your bridge, have a look at our help section. If your bridge is now running, check out the post-install notes.