كيف يعمل البروكسي مع DHCP

في الشبكات الكبيرة، لا أحد يقوم بضبط إعدادات البروكسي يدوياً على آلاف الأجهزة. بدلاً من ذلك، نستخدم بروتوكول WPAD (Web Proxy Auto-Discovery). أحد أهم طرق عمل WPAD هو التكامل مع خادم DHCP.

DHCP Option 252

عندما يتصل جهاز بالشبكة، يطلب عنوان IP من خادم DHCP. يمكن لخادم DHCP أن يرسل معلومات إضافية (Options). الخيار رقم 252 مخصص لإخبار المتصفح بمكان ملف wpad.dat أو proxy.pac.

إعداد DHCP في Windows Server

لإعداد هذا الخيار في بيئة Windows:


1. Open DHCP Console.
2. Right-click IPv4 -> Set Predefined Options.
3. Add -> Name: WPAD, Code: 252, Type: String.
4. Value: http://wpad.company.local/wpad.dat
                    

إعداد DHCP في Linux (ISC DHCP)

في ملف dhcpd.conf، نضيف التالي:


option wpad-url code 252 = text;
option wpad-url "http://192.168.1.10/wpad.dat";
                    

المفاضلة بين DHCP و DNS

المتصفحات عادة تبحث عن البروكسي عبر DHCP أولاً، ثم عبر DNS (بالبحث عن نطاق wpad). استخدام DHCP أسرع وأكثر أماناً لأنه يمنع هجمات انتحال اسم النطاق، ولكنه يتطلب وصولاً لصلاحيات إدارة خادم DHCP.

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