Web Proxy و TCP/IP: فهم التواصل

في الاتصال المباشر، يتم إنشاء اتصال TCP واحد بين جهازك والسيرفر. لكن عند وجود بروكسي، تتغير اللعبة تماماً. يتم "كسر" الاتصال إلى نصفين.

الاتصال المزدوج (Split Connection)

1. العميل -> البروكسي: جهازك يقوم بعمل SYN/SYN-ACK/ACK مع البروكسي.
2. البروكسي -> السيرفر: البروكسي يقوم بإنشاء اتصال جديد تماماً مع السيرفر الهدف.

لماذا هذا مهم؟

  • TCP Optimization: يمكن للبروكسي استخدام خوارزميات TCP حديثة (مثل BBR) للاتصال بالسيرفر، حتى لو كان جهاز العميل قديماً (Windows XP مثلاً).
  • Connection Pooling: البروكسي يبقي الاتصال مع السيرفر مفتوحاً (Keep-Alive) ليعيد استخدامه لعميل آخر، مما يوفر وقت المصافحة (Handshake).

مشكلة IP المصدر (Source IP)

بالنسبة للسيرفر، الطلب قادم من البروكسي، وضاع عنوان IP الخاص بالعميل. الحل هو ترويسة X-Forwarded-For التي يضيفها البروكسي (مثل HAProxy) ليخبر السيرفر بالعنوان الأصلي.

Disclosure: we may earn a commission if you purchase through some links.

Services Related To This Article

These offers are related to privacy, password security, and development workflows. Replace the current links with your real affiliate links through environment variables.

Default Links Need Replacement

Proton

Privacy, mail, and VPN

A strong fit for privacy-focused visitors who want VPN and secure email under one brand.

Explore Proton

Surfshark

Consumer VPN

Best on pages about geo-blocking, privacy, and public Wi-Fi protection.

Try Surfshark

NordVPN

High-converting VPN

A clear offer for users who need a paid, more durable alternative to a free proxy.

View NordVPN

1Password

Password management

The best match for password, secrets, team access, and personal security pages.

Discover 1Password

DigitalOcean

Developer cloud hosting

A strong fit for proxy setup, server, and infrastructure content aimed at developers and small teams.

Start with DigitalOcean