1. قم بتمكين تحديثات البرامج التلقائية
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. Bootstrap pkg
DragonFlyBSD's daily snapshots and releases (starting with 3.4) come with pkg
already installed. Upgrades from earlier releases, however, will not have it. If pkg
is missing on the system for any reason, it can be quickly bootstrapped without having to build it from source or even having DPorts installed:
# cd /usr
# make pkg-bootstrap
# rehash
# pkg-static install -y pkg
# rehash
2.1. يوصى بالخطوات لإعداد pkg
هنا ، سيكون مشابهًا لما لدينا في نظام FreeBSD ، وسنستخدم HTTPS لجلب حزمنا وتحديثاتنا - لذلك نحتاج هنا أيضًا إلى حزمة إضافية لمساعدتنا (ca_root_nss
).
تثبيت الحزمة ca_root_nss
:
# pkg install ca_root_nss
للتثبيتات الحديثة ، يتم نسخ الملف / usr / local / etc / pkg / repos / df-latest.conf.sample
إلى/ usr / local / etc / pkg / repos / df-latest
. يتم تجاهل الملفات التي تنتهي بالملحق ".sample" ؛ يقرأ pkg (8) الملفات التي تنتهي بـ ".conf" فقط ويقرأ ما يقرأه.
يحتوي DragonflyBSD على مستودعات حزم 2:
- Avalon (mirror-master.dragonflybsd.org);
- Wolfpond (pkg.wolfpond.org).
يمكننا ببساطة تحرير URL المستخدم للإشارة إلى المستودعات على / usr / local / etc / pkg / repos / df-latest
وهذا كل شيء! تذكر استخدام pkg + https: // من أجل Avalon.
بعد تطبيق كل هذه التغييرات ، نقوم بتحديث قائمة الحزم مرة أخرى ومحاولة التحقق مما إذا كان هناك بالفعل تحديث جديد للتطبيق:
# pkg update -f
# pkg upgrade -y -f
3. تركيب الحزمة
قم بتثبيت الحزمة tor
:
# pkg install tor
... أو تثبيت إصدار ألفا:
# pkg install tor-devel
4. ملف الضبط
Put the configuration file /usr/local/etc/tor/torrc
in place
Nickname myNiceRelay # Change "myNiceRelay" to something you like
ContactInfo your@e-mail # Write your e-mail and be aware it will be published
ORPort 443 # You might use a different port, should you want to
ExitRelay 0
SocksPort 0
Log notice syslog
5. ابدأ الخدمة
هنا قمنا بتعيين tor
للبدء في وقت التمهيد واستخدام ميزة setuid ، من أجل الارتباط بالمنافذ السفلية مثل 443 (سيظل البرنامج الخفي نفسه يعمل كمستخدم عادي غير مميز).
# echo "tor_setuid=YES" >> /etc/rc.conf
# echo "tor_enable=YES" >> /etc/rc.conf
# service tor start
6. ملاحظات نهائية
If you are having trouble setting up your relay, have a look at our help section. If your relay is now running, check out the post-install notes.