How to Extract Proxy IP form a Pac File???

Posted on 2004-10-28
Last Modified: 2010-08-05
Hi all,  
 Can any body please guide me, on how to extract  proxy IP from a PAC file.

waiting for your response ,


Question by:Manjesh
    LVL 9

    Expert Comment

    The PAC file, written in Java Script, should have the proxy HOST ip/name in it. Can you open the PAC with text editor and read the code to find your host designation, or am I missing your point?
    LVL 1

    Author Comment

    thanks Tanner Man,
     i dont want to parse the pac file for proxy IP, for i am already doing it. I just wanted to avoid pac file reading.

    SO there is an alternative.

    void __stdcall CallMaster(
          HINTERNET hInternet,
        DWORD_PTR dwContext,
        DWORD dwInternetStatus,
        LPVOID lpvStatusInformation,
        DWORD dwStatusInformationLength)

        REQUEST_CONTEXT *cpContext;
        cpContext = (REQUEST_CONTEXT*)dwContext;
        char szStatusText[80];

        switch (dwInternetStatus)
                      case INTERNET_STATUS_CONNECTING_TO_SERVER:
                       CString d((char*)lpvStatusInformation);

    From this i can obtain the Proxy form pac file without parasing it.


    LVL 9

    Expert Comment

    So you solved it then? GREAT

    Accepted Solution

    PAQed with points refunded (100)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Give your grad a cloud of their own!

    With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

    Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
    This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now