Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 847933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:52:01+00:00 2026-05-15T06:52:01+00:00

I’m creating a web-browser type app (using a web view object) that needs to

  • 0

I’m creating a web-browser type app (using a web view object) that needs to be able to connect to the internet via a proxy. Server, port, username and password can all be hardcoded into the app but unfortunately I have no idea how to customise the proxy settings of a web view without changing the system wide proxy settings.

If you know how to do this please provide some example code, thanks a lot!
(Also, if it changes anything – I’m developing for mac, not iPhone)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:52:02+00:00Added an answer on May 15, 2026 at 6:52 am

    The easiest way I know is to wire up a UIWebView delegate and listen to all requests before they go through, and redirect the ones you care about through ASIHttpRequest and your custom proxy settings.

    - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
    {
        // Configure a proxy server manually
        NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com/ignore"];
        ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
        [request setProxyHost:@"192.168.0.1"];
        [request setProxyPort:3128];
    
        // Alternatively, you can use a manually-specified Proxy Auto Config file (PAC)
        // (It's probably best if you use a local file)
        [request setPACurl:[NSURL URLWithString:@"file:///Users/ben/Desktop/test.pac"]];
    
        // fire the request async
        [request setDelegate:self];
        [request startAsynchronous];
    
        return NO;
    }
    
    
    - (void)requestFinished:(ASIHTTPRequest *)request
    {
       NSData *responseData = [request responseData];
       // todo: save data to disk and load with [self webView]
    }
    

    It’s a bit wonky,but it should work. Just remember to manage your memory properly and don’t use this leaky example code… YMMV, I haven’t even tested if this compiles, typed it all in the browser window with some copy and paste hackery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 449k
  • Answers 450k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer TestDriven.net is my #1 choice. It's free for open source… May 15, 2026 at 8:23 pm
  • Editorial Team
    Editorial Team added an answer I think that might be outdated, as now you can… May 15, 2026 at 8:23 pm
  • Editorial Team
    Editorial Team added an answer You can't. !important is set on a per property basis… May 15, 2026 at 8:23 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.