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. Recommended steps to setup pkg
Here, it will be similar to what we have on a FreeBSD system, and we are going to use HTTPS to fetch our packages, and updates - so here we also need an extra package to help us out; 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. Install Tor
Here we can choose to install the latest stable version (recommended):
# pkg install tor
Or install an alpha release:
# pkg install tor-devel
4. Install obfs4proxy
# pkg install obfs4proxy-tor
5. Edit your Tor config file, usually located at /usr/local/etc/tor/torrc
and replace its content with:
BridgeRelay 1
# استبدل "TODO1" بمنفذ Tor من اختيارك.
# يجب أن يكون هذا المنفذ قابلاً للوصول خارجيًا.
# تجنب المنفذ 9001 لأنه مرتبط بشكل شائع بـ Tor وقد يقوم الرقيب بمسح الإنترنت لهذا المنفذ.
ORPort TODO1
ServerTransportPlugin obfs4 exec /usr/local/bin/obfs4proxy
# استبدل "TODO2" بمنفذ obfs4 من اختيارك.
# يجب أن يكون هذا المنفذ قابلاً للوصول خارجيًا ويجب أن يكون مختلفًا عن المنفذ المحدد لـ ORPort.
# تجنب المنفذ 9001 لأنه مرتبط بشكل شائع بـ Tor وقد يقوم الرقيب بمسح الإنترنت لهذا المنفذ.
ServerTransportListenAddr obfs4 0.0.0.0:TODO2
# منفذ اتصال محلي بين Tor و obfs4. قم دائمًا بتعيين هذا على "تلقائي".
# "Ext" تعني "ممتد" وليس "خارجي". لا تحاول تعيين رقم منفذ معين ، ولا تستمع إلى 0.0.0.0.
ExtORPort auto
# استبدل "<address@email.com>" بعنوان بريدك الإلكتروني حتى نتمكن من الاتصال بك إذا كانت هناك مشاكل في جسرك.
# هذا اختياري ولكنه مشجع.
ContactInfo <address@email.com>
# اختر لقبًا يعجبك لجسرك. هذا اختياري.
Nickname PickANickname
لا تنس تغيير خيارات ORPort
و ServerTransportListenAddr
و ContactInfo
و Nickname
.
- Note that both Tor's OR port and its obfs4 port must be reachable. If your bridge is behind a firewall or NAT, make sure to open both ports. You can use our reachability test to see if your obfs4 port is reachable from the Internet.
6. Start Tor
# echo "tor_setuid=YES" >> /etc/rc.conf`
# echo "tor_enable=YES" >> /etc/rc.conf`
# service tor start
7. Monitor your logs
لتأكيد أن الجسر الخاص بك يعمل بدون مشاكل ، يجب أن ترى شيئًا كهذا (عادةً في / var / log / tor / log
أو/ var / log / syslog
):
[إشعار] بصمة مفتاح هوية خادم Tor الخاص بك هي '<FINGERPRINT><NICKNAME>'
[إشعار] بصمة مفتاح الهوية المجزأة لجسر Tor الخاص بك هي '<HASHED FINGERPRINT> <NICKNAME>'
[notice] Registered server transport 'obfs4' at '[::]:46396'
[notice] Tor has successfully opened a circuit. Looks like client functionality is working.
[إشعار] Bootstrapped 100٪: تم
[إشعار] تحقق الآن مما إذا كان يمكن الوصول إلى <redacted>ORPort: 3818 ... (قد يستغرق هذا ما يصل إلى 20 دقيقة - ابحث عن رسائل السجل التي تشير إلى النجاح)
[إشعار] يشير الاختبار الذاتي إلى أنه يمكن الوصول إلى منفذ ORPort من الخارج. ممتاز. واصف خادم النشر.
8. Final Notes
إذا كنت تواجه مشكلة في إعداد الجسر ، فقم بإلقاء نظرة على قسم المساعدة الخاص بنا. إذا كان الجسر الخاص بك يعمل الآن ، فتحقق من ملاحظات ما بعد التثبيت.