Charles Proxy not working on Mac with iPhone - ios

I am trying the proxy the network traffic from my iPhone to Mac via Charles Proxy, below are the versions i am using:
iPhone - model 13, OS - 15.4
Mac - OS - Monterey (12.2.3)
Charles - 4.6.2 (licensed)
I installed Charles on Mac, enabled SSL Proxying, added generic IP (0.0.0.0/0) in Access Control Settings, got the local IP address from Help and used it on my iPhone wifi settings - Proxy > manual > local IP from Charles and port 8888.
As soon as i do this my phone is not able to connect to internet at all. I have seen various instructions about adding root certificate, enabling trust settings etc, but those all can be done only if am able to connect to internet to download the certificates. Which i am unable to.
I went through every question on this site which mentions Charles proxy, but none could provide any solution to my problem so appreciate any inputs on this.

If there is no important information in your phone, you can reset the network settings first, then try the following
Make sure that both the computer and the phone are not using a virtual private network
The computer and the phone are in the same network environment
The computer has the Charles root certificate installed
The phone has successfully installed Charles' certificate and trusts it.
If the above suggestions don't help you, I suggest starting from scratch and troubleshooting the problem step by step
Let's take mobile phones and computers accessing https://www.google.com separately as an example
After the computer installs the certificate, can it be connected to the Internet normally, and can it crawl Google's response request?
The mobile phone and the computer are on the same network segment and use the proxy URL provided by charles. Can you access and download the certificate?
3. On the computer, does Charles pop up an access prompt and ask you to choose whether to agree to the access?
Turn off the computer-side crawling and access it on the mobile phone to see if it can crawl the response request on the mobile phone.

Next time, check the firewall in the security and privacy settings. It should not block Charles' incoming connections. I spent two hours trying to figure out what was going on

Related

Viewing locally hosted webpages on a closed wifi network (no internet) via ios 10

For the purposes of a presentation demoing our app, where internet is not available, I need to connect some iPhones and iPads to a local wireless network (an ad hoc network) from which they will access a local web-server (hosted on a macbook) to send / receive data.
In the past this was simple, but it seems iOS 10 is no longer happy connecting to wireless networks that don't allow it to access apple's own servers via the internet.
As a test, I am able to use MAMP Viewer to view my local sites when both my laptop and iPhone are connected to wifi with internet access, but not when both are connected to an ad hoc network created via the macbook. I can see that the host exists, but can't connect to it - MAMP Viewer reports an error (with no details).
Is there a workaround, or is it genuinely the case that iOS 10 devices can only use a wifi network for web data if there's an internet connection back to Apple? Hopefully I'm missing something obvious?
I was able to get the connection working using an encrypted wifi network offline running from a router, just not an ad hoc network or an unsecured network.

Required iPv6 compatibility - rejected by Apple iOS app

I uploaded my app on itunes multiple times and received the following message:
(
We discovered one or more bugs in your app when reviewed on iPhone running iOS 10.2 on Wi-Fi connected to an IPv6 network.
Specifically, when we attempted to create a new account a loading indicator spun indefinitely.
)
Apps are reviewed on an IPv6 network. Please ensure that your app supports IPv6 networks, as IPv6 compatibility is required.
Notes: I have used AFNetworking version 3.1.0 for call web services(support IPV6) and Apple Reachability(also support IPV6) without using hard coded Ip.
My question: the changes must be done on mobile side or server side?
As far as my experience with IPv6 reaches, you're probably right. When you develop your app in Xcode using the latest SDK for iOS 10.2, you should be save with IPv6 compatibility on your app's side.
However, Unix (MacOS audios are a Unix derivative) takes the path or url from your app and will negotiate at the OS level with the other side you want to connect with. This usually runs over a DNS. So, your app and iOS will first request an IPv6 IP address from the DNS. When the DNS understands IPv6, which is not always guaranteed, but it usually does, it asks the other side for an IPv6 address. If the other side does not support IPv6, the operating system will request an IPv4 address and set up the connection.
Since Apple will hold you responsible for the entire chain of services delivered by your app, you must ensure the requested side also supports IPv6 via it is part of the your apps functionality.
Hope this helps.

App Rejected with iOS IPv6 network

Yesterday, I submitted my app for review, but I got this message from Apple:
We discovered one or more bugs in your app when reviewed on iPad iPhone running iOS 9.3.2 on Wi-Fi connected to an IPv6 network.
Specifically, upon review we have found the application still experiences a loading issue and unable to review the application content.
My app uses ionic framework, how can I fix this problem?
I already used domain to access my server, but this problem still exists.
Yes. According to apple's policy , your application must supports IPV6. so, please check your application supports IPV6. Supporting IPv6 in iOS 9
To test, if your application supports IPV6 or not please check this ,
Supporting IPv6 DNS64/NAT64 Networks
To check with creating follow this steps , which indicate on apple's page .
To set up a local IPv6 Wi-Fi network using your Mac
1) Make sure your Mac is connected to the Internet(with ethernet), but not through Wi-Fi.
2) Launch System Preferences from your Dock, LaunchPad, or the Apple menu.
3) Press the Option key and click Sharing. Don’t release the Option key yet. (don't forget to press option key)
4)Select Internet Sharing in the list of sharing services.
5)Release the Option key.
6)Select the Create NAT64 Network checkbox.
7)Choose the network interface that provides your Internet connection, such as Thunderbolt Ethernet or Only Ethernet.
8)Select the Wi-Fi checkbox.
9)Click Wi-Fi Options, and configure the network name and security options for your network.
10) Select the Internet Sharing checkbox to enable your local network.
11)When prompted to confirm you want to begin sharing, click Start
12) Now your mac mini is working as a hotspot and useing IPv6 NAT64 network
(looks like above image when hotspot created)
Now connect your iphone with your mac mini's hotspot. and Test your Application it's working properly or not.
I hope this answer is helpful you.
Edit :- Don't forget to add below frameworks.
1) WebKit
2) CFNetwork
You will find all the information on this link related to ipv6 policy. Supporting IPv6 DNS64/NAT64 Networks
We also faced the same issue.
Just registered your website with any CDN like cloudFlare and your app will be approved next time no need to shift the whole site to any other server. This is the easiest way to get approval from app store.
I think Apple has something wrong with this error!
I have an app (ionic app) rejected 3 times (during Nov 2016) for the same error and lastly accepted without making any change related to IPv6!
You may need to check your app for startup errors if you think that you have nothing to do with IPv6.
By the way: I did not check IPv6 compatibility on my app, and even more the app - in its inner views - has a connection to a webpage that hosted on a shared host with no IPv6 support!!
Please note that sometimes the mobile app works in the test environment but not in the Apple own test environment. Following this and this link can be very helpful in determining what's the problem with apple rejections.
It is clearly stated that the test environment is not exactly the same

Using Charles Proxy on Mac OS X selectively for iOS Simulator

Is there any way to use Charles proxy selectively with particular applications like iOS Simulator on Mac OS X? Currently while monitoring HTTP traffic to and fro iOS application running with iOS Simulator, Charles also monitors HTTP traffic from other apps like Chrome and Mail app etc. This is really distracting. Is there any way to do this except adding the list of domains that we want to bypass under Charles Proxy settings ?
Chrome is really a problem because it uses Mac OS X proxy settings. I tried extension like Proxy Switchy but it either doesn't help or I don't know how to configure it.
Any pointers will be highly appreciated. Thanks!
You can indeed filter the records in Charles proxy. Just go to Proxy>Record Settings...
Then u can include or exclude any domain that you need to.
Thats the only way to do it. using domain, port, path or query.
If you dont wanna record things coming from google Chorme, just disable the option pressing Cmd+Shift+P , this will disable Mac OS X Proxy.
Using the Sequence tab, you can set a filter:
Quick, easy and no proxy menus and settings to worry about.
I was trying to do something similar. Consider this as an alternative. If you have an iOS device, you can run your app on the device and configure Charles to only show traffic from remote clients by disabling the "Mac OS X proxy"
Here is an example setup:
Using one remote client (say an iPad in this case) and a Mac running Charles as your proxy host, disable the "Mac OS X proxy" by deselecting the checkbox in Proxy Settings >> Mac OS X Tab >> Enable Mac OS X proxy (See image below.)
By doing so, you essentially filter your simple setup to only display traffic that is coming from remote client (the iPad).
To audit the whole traffic, I actually had to use a real device. it's not possible to filter the client app easily with an iOS simulator because the simulator and the host (your mac) shared the same IP. But it's pretty nice if you use a device. More info Help > SSL Proxying > Install Charles Root Certificate on a Mobile Device or Remote Browser.
Check your IP, make sure the device and your mac are in the same network (your IP can be checked in the "Install Charles Root Certificate..." above-mentioned section of Charle's Help.
Open chls.pro/ssl on your device and install the certificate on your device.
Make sure your certificate pinning is off (if you use some sort of it).
Check you Proxy > SSL Proxying Setting as normally (make sure all hosts you want to track are there).
Run the app.
Accept the upcoming traffic from your device in Charles if asked.
Save the session and filter outside from the Charles because there is still no Client Address/Client IP filterable in Charles. 😔 Alternatively, it's quite easier to see the traffic from a device listed in the app and distinguish from 127.0.0.1 and "anything else".
BTW. To filter my application backend I prefer not to use the basic filter feature (on the bottom) as djibouti33 proposed, but rather Focused Hosts (View > Focused Hosts...). And there is a toggle/check box to hide/show other calls on the sequence list. Pretty convenient.

how to make apps on blackberry emulator to connect internet when the PC is behind a proxy server

My PC configured behind a proxy server for internet access. I referred to the blackberry simulator related posts and changed my MDS server setting as follows
application.handler.http.proxyEnabled = true
application.handler.http.proxyHost=hostname
application.handler.http.proxyPort=hostport
application.handler.http.proxyUser=username
application.handler.http.proxyPass=password
After this when MDS is started with simulator, I am able to use the browser. But when I click the browser it asks for the username, password and domain name. After this the internet works properly
Here is the problem. For the same settings when I click the maps app in the blackberry it is not working. Kindly let me know what has to be changed.
Not all apps will use the MDS transport to communicate - for example if the app uses Direct TCP or Wi-Fi, it will bypass your MDS server and go directly over the computer's TCP/IP stack (when running in the simulator). Unfortunately in this case the simulator doesn't use any system-level proxy settings (i.e. the proxy settings set in IE) -- so it won't know about your proxy server and probably fail.
I've mentioned this deficiency to RIM and I'm hopeful they'll address it in future emulators. It would make it so much easier to debug with tools such as Charles or Fiddler.

Resources