Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
tcconfig — غلاف لأمر tc. يسهّل إعداد التحكم في حركة المرور لعرض النطاق الترددي/زمن الوصول/فقدان الحزم/فساد الحزم/إلخ. لواجهة شبكة/حاوية دوكر (veth). | Kitploit
أدوات/GitHubGitHub/thombashi/tcconfig
أدوات عامةأمن الشبكاتهندسة الفوضى
GitHubthombashi/tcconfig

tcconfig

غلاف لأمر tc. يسهّل إعداد التحكم في حركة المرور لعرض النطاق الترددي/زمن الوصول/فقدان الحزم/فساد الحزم/إلخ. لواجهة شبكة/حاوية دوكر (veth).

عرض المستودعالموقع الإلكتروني
85390منذ 4 أشهرتمت المراجعة من قبل Kitploit

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

.. contents:: tcconfig :backlinks: top :depth: 2

ملخص

tcconfig <https://github.com/thombashi/tcconfig>__ هو غلاف لأمر tc. يسهل إعداد التحكم في حركة مرور الشبكة (عرض النطاق الترددي / زمن الوصول / فقدان الحزم / تلف الحزم / إلخ) لواجهة الشبكة / حاوية Docker (veth).

|PyPI pkg ver| |Supported Python ver| |CI status| |CodeQL|

.. |PyPI pkg ver| image:: https://badge.fury.io/py/tcconfig.svg :target: https://badge.fury.io/py/tcconfig :alt: PyPI package version

.. |Supported Python ver| image:: https://img.shields.io/pypi/pyversions/tcconfig.svg :target: https://pypi.org/project/tcconfig :alt: Supported Python versions

.. |CI status| image:: https://github.com/thombashi/tcconfig/actions/workflows/ci.yml/badge.svg :target: https://github.com/thombashi/tcconfig/actions/workflows/ci.yml :alt: Test CI status

.. |CodeQL| image:: https://github.com/thombashi/tcconfig/actions/workflows/build_and_release.yml/badge.svg :target: https://github.com/thombashi/tcconfig/actions/workflows/build_and_release.yml :alt: Build CI status

التحكم في حركة المرور

إعداد قواعد تشكيل حركة المرور ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ تطبيق قواعد تشكيل حركة المرور على شبكات محددة بسهولة:

  • الحزم الصادرة / الواردة
  • عنوان IP المصدر / الوجهة / الشبكة (IPv4 / IPv6)
  • منافذ المصدر / الوجهة

المعلمات المتاحة ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ يمكن ضبط المعلمات التالية على واجهات الشبكة:

  • معدل عرض النطاق الترددي للشبكة [G/M/K bps]
  • زمن انتقال الشبكة [ميكروثانية / ميلي ثانية / ثوانٍ / دقائق]
  • معدل فقدان الحزم [%]
  • معدل تلف الحزم [%]
  • معدل تكرار الحزم [%]
  • معدل إعادة ترتيب الحزم [%]
  • عدد حد الحزم [COUNT]

الأهداف ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  • واجهات الشبكة: مثل eth0
  • حاوية Docker (veth المقابلة لحاوية)

.. image:: docs/gif/tcset_example.gif

الاستخدام

تعيين التحكم في حركة المرور (أمر tcset)

tcset هو أمر لإضافة قاعدة تحكم في حركة المرور إلى واجهة شبكة (جهاز).

مثال: تعيين حد لعرض النطاق الترددي يصل إلى 100 كيلوبت في الثانية ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --rate 100Kbps

مثال: تعيين زمن انتقال الشبكة ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ يمكنك استخدام وحدات زمنية (مثل us/sec/min/إلخ) لتحديد زمن التأخير.

تعيين زمن انتقال 100 مللي ثانية للشبكة ''''''''''''''''''''''''''''''''''''''''''''''''''' .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 100ms

تعيين زمن انتقال 10 ثوانٍ للشبكة ''''''''''''''''''''''''''''''''''''''''''''''''''' .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 10sec

تعيين زمن انتقال 0.5 دقيقة (30 ثانية) للشبكة ''''''''''''''''''''''''''''''''''''''''''''''''''' .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 0.5min

يمكنك أيضًا استخدام وحدات الزمن التالية:

.. table::

root@kitploit:~
+----------------+---------------------------------------------------------------------+
|    الوحدة      |                المحددات المتاحة (نص)                                |
+================+=====================================================================+
|الساعات         |``h``/``hour``/``hours``                                             |
+----------------+---------------------------------------------------------------------+
|الدقائق         |``m``/``min``/``mins``/``minute``/``minutes``                        |
+----------------+---------------------------------------------------------------------+
|الثواني         |``s``/``sec``/``secs``/``second``/``seconds``                        |
+----------------+---------------------------------------------------------------------+
|المللي ثانية    |``ms``/``msec``/``msecs``/``millisecond``/``milliseconds``           |
+----------------+---------------------------------------------------------------------+
|الميكرو ثانية   |``us``/``usec``/``usecs``/``microsecond``/``microseconds``           |
+----------------+---------------------------------------------------------------------+

مثال: تعيين فقدان حزم بنسبة 0.1% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --loss 0.1%

مثال: جميع الإعدادات المذكورة أعلاه مرة واحدة ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --rate 100Kbps --delay 100ms --loss 0.1%

مثال: تحديد عنوان IP للتحكم في حركة المرور ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 100ms --network 192.168.0.10

مثال: تحديد شبكة IP ومنفذ التحكم في حركة المرور ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 100ms --network 192.168.0.0/24 --port 80

تعيين التحكم في حركة المرور إلى حاوية Docker ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ قم بتنفيذ tcconfig مع الخيار --docker على مضيف Docker:

.. code-block:: console

root@kitploit:~
# tcset <اسم الحاوية أو المعرف> --docker ...

يمكنك استخدام الخيارين --src-container / --dst-container لتحديد حاوية المصدر / الوجهة.

تعيين التحكم في حركة المرور داخل حاوية Docker ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ تحتاج إلى تشغيل حاوية مع الخيار --cap-add NET_ADMIN إذا كنت ترغب في تعيين قاعدة tc داخل حاوية:

.. code-block:: console

root@kitploit:~
docker run -d --cap-add NET_ADMIN -t <صورة Docker>

يمكن الحصول على صورة حاوية تتضمن tcconfig مدمجًا من https://hub.docker.com/r/thombashi/tcconfig/

حذف التحكم في حركة المرور (أمر tcdel)

tcdel هو أمر لحذف قواعد تشكيل حركة المرور من واجهة شبكة (جهاز).

مثال: حذف التحكم في حركة المرور لـ eth0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ يمكنك حذف جميع قواعد التشكيل لـ eth0 باستخدام الخيار -a / --all:

.. code-block:: console

root@kitploit:~
# tcdel eth0 --all

عرض تكوينات التحكم في حركة المرور (أمر tcshow)

tcshow هو أمر لعرض إعدادات التحكم الحالية في حركة المرور لواجهات الشبكة.

مثال ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: console

root@kitploit:~
# tcset eth0 --delay 10ms --delay-distro 2  --loss 0.01% --rate 0.25Mbps --network 192.168.0.10 --port 8080
# tcset eth0 --delay 1ms --loss 0.02% --rate 500Kbps --direction incoming
# tcshow eth0
{
    "eth0": {
        "outgoing": {
            "dst-network=192.168.0.10/32, dst-port=8080, protocol=ip": {
                "filter_id": "800::800",
                "delay": "10.0ms",
                "delay-distro": "2.0ms",
                "loss": "0.01%",
                "rate": "250Kbps"
            }
        },
        "incoming": {
            "protocol=ip": {
                "filter_id": "800::800",
                "delay": "1.0ms",
                "loss": "0.02%",
                "rate": "500Kbps"
            }
        }
    }
}

لمزيد من المعلومات

المزيد من الأمثلة متاحة على: https://tcconfig.rtfd.io/en/latest/pages/usage/index.html

التثبيت

التثبيت: pip

يمكن تثبيت tcconfig من PyPI <https://pypi.python.org/pypi>__ عبر أمر pip <https://pip.pypa.io/en/stable/installing/>__ (مدير حزم Python).

.. code:: console

root@kitploit:~
sudo pip install tcconfig

التثبيت: dpkg (Debian/Ubuntu)

.. code:: console

root@kitploit:~
curl -sSL https://raw.githubusercontent.com/thombashi/tcconfig/master/scripts/installer.sh | sudo bash

التبعيات

  • Python 3.9+
  • تبعيات حزم Python (تُثبت تلقائيًا) <https://github.com/thombashi/tcconfig/network/dependencies>__

حزم Linux

  • إلزامي: مطلوب لأمر tc:
    • Ubuntu/Debian: iproute2
    • Fedora/RHEL: iproute-tc
  • اختياري: مطلوب عند استخدام الخيار --iptables:
    • iptables

وحدة نواة Linux

  • sch_netem

حزم Python اختيارية

  • Pygments <http://pygments.org/>__

التوثيق

https://tcconfig.rtfd.io/

استكشاف الأخطاء وإصلاحها

https://tcconfig.rtfd.io/en/latest/pages/troubleshooting.html

صورة Docker

https://hub.docker.com/r/thombashi/tcconfig/

الجهات الراعية

|chasbecker| |shiguredo| |b4tman| |Arturi0| |github|

.. |chasbecker| image:: https://avatars.githubusercontent.com/u/44389260?s=48&u=6da7176e51ae2654bcfd22564772ef8a3bb22318&v=4 :target: https://github.com/chasbecker :alt: ex-sponsor: Charles Becker (chasbecker) .. |shiguredo| image:: https://avatars.githubusercontent.com/u/2549434?s=48&v=4 :target: https://github.com/shiguredo :alt: ex-sponsor: 時雨堂 (shiguredo) .. |b4tman| image:: https://avatars.githubusercontent.com/u/3658062?s=48&v=4 :target: https://github.com/b4tman :alt: onetime: Dmitry Belyaev (b4tman) .. |Arturi0| image:: https://avatars.githubusercontent.com/u/46711571?s=48&u=57687c0e02d5d6e8eeaf9177f7b7af4c9f275eb5&v=4 :target: https://github.com/Arturi0 :alt: onetime: Arturi0 .. |github| image:: https://avatars.githubusercontent.com/u/9919?s=48&v=4 :target: https://github.com/github :alt: onetime: GitHub (github)

كن راعياً <https://github.com/sponsors/thombashi>__

تنزيل الأداة