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

  • SEARCH
  • Home
  • 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 759931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:39:22+00:00 2026-05-14T15:39:22+00:00

I want to write a MobileSubstrate ( http://www.iphonedevwiki.net/index.php/MobileSubstrate ) addon that takes every HTTP

  • 0

I want to write a MobileSubstrate (http://www.iphonedevwiki.net/index.php/MobileSubstrate) addon that takes every HTTP request and modifies the URL. (The reason is very complicated and would take a while to explain, so just trust me that there’s not an alternative). Basically, I need to know what’s the best Objective-C message or C function that I should overwrite to intercept any HTTP request, modify the URL, and send the request back to the original function (this shouldn’t be just the first request sent by an application, but any redirects too). I think it may be in NSURL or CFNetwork, but am not sure where exactly. This function should, when replaced, work with any apps and the OS itself.

EDIT:
Ok, here’s two sample scenarios of what I want to do, note that the method to override should be one that is called by any HTTP request anywhere from an app to the OS:
1) User in MobileSafari types in aaa.com/a.html
2) aaa.com/a.html redirects to aaa.com/b.html
3) aaa.com/b.html loads bbb.com/c.png
I want to change the request so everything has ?i=j added.
EX: Change all aaa.com/a.html to aaa.com/a.html?i=j, aaa.com/b.html?i=j, bbb.com/c.png?i=j?

And another one:
1) User uses Maps.app
2) Google Maps tries to load google.com/map1.png (not actual image, I know)
Change google.com/map1.png to google.com/map1.png?i=j?

  • 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-14T15:39:23+00:00Added an answer on May 14, 2026 at 3:39 pm

    Hook the following methods and swap out the request with a mutableCopy that you’ve edited.

    • -[NSURLConnection sendWillSendRequest:redirectResponse:]
    • -[NSURLConnection initWithRequest:delegate:]
    • –[NSURLConnection initWithRequest:delegate:startImmediately:]

    This will not redirect raw TCP socket connections, only the HTTP requests that are funnelled through the standard API.

    Note: be very wary of doing this. Redirecting all http requests is a violation of user trust in my opinion

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

Sidebar

Related Questions

I want to write a program in Prolog that confirms if a b-tree of
I want to write <a href=product.php?id=5> as product/5.I am not talking about user to
I want to write a program to contact a PHP script online, and show
I want to write a method that when supplied an array of ints will
I want to write a php application using Zend Framework 2 (just the beta
I want write a program that when installed, runs in background and adds a
I want write jquery code that will show form inputs after a checkbox is
I have whole page HTML in my database and i want write that html
I have 2 tables(1.Employee 2.Family). I want write a sql statement that produce the
I want write a simple query which will fetch data from a table (which

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.