How can I monitor hotspot traffic via Charles Proxy? - charles-proxy

I have a hotspot configured on my laptop and there are multiple devices connected to the hotspot. Using Charles Proxy can I monitor the network traffic from all those devices?
Setting up a proxy configuration is not feasible in those devices. So, I'm looking for a way to monitor all that's happening via my hotspot. Can we somehow make the hotspot work with Charles Proxy?

No. This is not possible. Charles can only monitor traffic if the device specifically uses Charles as its proxy. Wireshark may help, but you will struggle with HTTPS traffic.

Related

Fiddler 4-iOS 10.2.1 cannot reach internet after configure proxy

I am following this instruction http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureForiOS. Everything works until section Set the iOS Device Proxy.
Once I set the proxy on my iPhone, I can't connect to the internet from the phone anymore. Not even accessing the echo page, which I could access before turning on the proxy on the phone. I already installed the root cert on my phone, the makecert add-on on Fiddler
Could someone help with ideas to diagnose the issue here? Thanks,
What might be stopping your iphone from reaching your Fiddler machine on the port specified, usually 8888?
Have you a firewall on the Fiddler machine? You might need to open
the port.
Does your LAN have an automatic redirect to a login page? Ours
does, so I have to disable the proxy on the iphone while I login,
then reenable it.
Does your LAN expose the IPs of cable-connected machines to WIFI
users? Not all do.
Can you browse a simple web page on your Fiddler machine from your
iphone, before starting fiddler or doing any proxy configuration?
You might need to get really serious and install a ping utility on the iphone.

Viewing Xbox one network traffic

I am trying to view the HTTP traffic going from my Xbox One using charles proxy. However, as Xbox One doesn't allow you to use a proxy this is finding out to be difficult.
I have tried using my laptop's internet connection through ethernet cable from the Xbox One to my laptop, but I cannot see the traffic on Charles.
Does anyone know of a way I can see this traffic?
If you have the dev home app for xbox installed on your xbox it is possible to setup a Charles proxy to monitor the HTTP traffic.
Follow these steps to install the dev home:
https://www.windowscentral.com/how-activate-dev-mode-your-xbox-one-console
Once the dev home app is installed you can enable the device portal on your xbox:
https://learn.microsoft.com/en-us/windows/uwp/debug-test-perf/device-portal-xbox
This is where things get a little hacky, but your going to end up using Charles instead of Fiddler to monitor your devices traffic. You will need to install Fiddler to get a FiddlerRoot.cer (http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/FirefoxHTTPS), which you upload to your xbox through the network page in the xbox device portal. Then you simply enter your laptops IP address in the "Host IP address" field, and the Fiddler port is the port number defined in your Charles Proxy Settings.
Then you press the Enable button, which will prompt you to restart your xbox. Select the Restart button, and once your xbox restart you will begin to see HTTP traffic in Charles.
Get a homebrew router with linux installed. Then you any linux TCP sniffer tool filtered by IP address to view the traffic. Similarly, you should be able to do the same in the setup you have now.
Does this work for your current setup via bootcamp?
If its connected through wireless, you could also just use a wireless sniffer. However I imagine you would want to look at the contents so this may pose a hurdle with encryption.

Connect an Android Device To a Web Service on Local Host

I implemented a web service for an Android application. The web service is running on my local host (192.168.1.2). Using the Android emulator I succeeded to connect to web service. The I tried to connect my Android device using debugging mode to web service but it didn't work. So my question is if it is possible to connect an Android device to this web service that is running on my local host (192.168.1.2) without using a real IP ?
It's much simpler way supported by google!
Connect your phone via usb to computer and enable usb debugging
On your computer open Chrome browser and type exactly this address: chrome://inspect/#devices
Now you can link your computer port to your device port by port forwarding button. On my computer I have service on address localhost:61437 and I just linked it to device's 8081 port. Remeber to check 'Enable port forwarding' checkbox
screen from service on my computer ( localhost:61437 )
screen from my mobile browser with the same service ( localhost:8081). And that's it. Also you use this service address in your application
Did you already solve your problem? I also got a problem like you. These are the steps that I already done:
unplug lan cable or turn off any other internet connection from your pc.
connect your android mobile to your pc using usb.
turn on usb tethering
back to your pc. check your ip. mine is 192.168.42.37
check your webservice app in your pc. let's say http://192.168.42.37/webserviceapp
back to your android mobile. try this url http://192.168.42.37/webserviceapp
Now you can access your webservice app in your pc from your mobile phone.
Well your localhost is 127.0.0.1 (or ::1) and your LAN IP is 192.168.1.2. Each pc/device that are connected under your LAN could reach your webservice on IP 192.168.1.2
Your Android device must be so connected under the same LAN maybe through Wifi connection so it will be able to talk with 192.168.1.2.
If you can't connect your Android device under the same LAN eg you have just a 3g connection you need to play with your router/firewall to redirect all incoming traffic (maybe just the http traffic) from your public ip to you private ip (192.168.1.2)
Hope this help
I'll throw in my process, since nothing on SO worked for me. Here are the steps I took to connect my physical android device to the web service running on my laptop (connected to the phone) on localhost:
Enable USB debugging on your Android device
Run your web service on your machine. My web service runs on localhost, port 3000 in development: http://localhost:3000/api/...
Run ifconfig (Unix), or ipconfig (Windows)
Find your machine's inet address on your LAN interface. Mine is 10.0.0.121 for interface wlan0. Externally, it is 68.43.XX.XXX, which is not the address that you want to use.
Use the LAN IP since you are connecting to your service on LAN, otherwise you might get an econnrefused (connection refused) error due to firewall rules
Build your http URL with that IP address, and the port that your web service is running on. For me, it's http://10.0.0.121:3000/api/...
When you launch your app, you should connections to your local web service in logs, Wireshark, etc, and you should see the desired activity/data in your Android application.
I had the same issues, researched a lot then found out that you have to explicitly make changes in your firewall settings. Your firewall is blocking your code to be accessed from external source. So, all you need to do is, go to firewall settings, add port 80 (in my case since, I am using Apache http Server) for inbound and outbound. Now, you can test it on your phone's browser http://192.16..**:80/
I've done that on a Mac using GasMask and Charles Proxy Server. Your phone and your computer have to be on the same network.
say the webservice url you want to access is at http://api.xyz.com, you first use GasMask to point that url to your localhost, then use Charles to set up a proxy server. Then you go to the settings on your phone, go into Wi-Fi, long-press the network you are connected to, choose Modify Network, and enter the proxy settings Charles gave you.
In my case, nothing of these solutions works because Windows firewall blocks it, but putting a rule on the firewall hasn't effect.
The problem in my case is that my laptop is connected with Wifi and Windows had the Wifi connection like a Public network. I must to change the network connection to Private network. http://www.comofuncionatodo.net/tecnologia/informatica/como-cambiar-de-red-publica-a-red-privada-en-windows-10/
I agree with the other answers as good approaches if you don't want to expose your DEV webservice on the internet. However, it's much easier if you do just expose the webservice. There's a number of free DNS services, but I've found no-ip to be the easiest to set up. I use it for exactly the purpose that you asked about; so I can test with my DEV webservice on a real device.
If you choose to go with no-ip (I have no affiliation with that company, it's just the one I've used and am familiar with), you can get a free publicly accessible URL like http://MyExampleWebServer.no-ip-org, and no-ip has a utility you can install so even if you're behind a dynamic IP, it will always keep the correct external IP associated with that URL. If you're working from your house, then you'd just need to make sure you port forward traffic from port 80 to your internal 192.x.x.x IP address (or whatever port you use; maybe 443 for ssl).
It's as easy as that, and now you can hit that webservice from any device that can access the internet.
I haven't worked with it, but I believe dyndns also offers a similar service.
This solution is for GAE development server in Eclipse
Step 1: Get the LAN IP
Goto your Windows Command Console (Press Win+R, then type "cmd"). In the console, enter "ipconfig". You will see a list of display. Under Wireless LAN adapter Wi-Fi, get the IPv4 Address. It will be something 192.168.x.x
LAN IP : 192.168.x.x
Step 2:
Go to Eclipse, Open the Configured server
Under Properties of GAE Development Server -> Local Interface address to bind to, enter the LAN IP address, and save.
Step 3:
Now you can access the GAE server by
http://192.168.x.x:8888/
8888 - Refers to the Port Number, as mentioned in the GAE development server
In order to access local web services using their own server hosts rather than IP addresses with ports, do these following steps:
Make sure your Android device and your local machine are on the same network.
Install SquidMan on your Mac, Linux, or any other Proxy Server.
Configure the proxy server's HTTPPort (ex. 5555) and clients (ex. 192.168.0.0/24) to your own network mask, and run the proxy server.
You are either using the web services in:
a. A web browser: Configure the proxy settings of your Android device from Modify WiFi networks.
b. Android application:
Set up the Proxy for your HTTP client. If you are using Volley, check this out: Volley Behind a Proxy server.
You can now connect to it by using whatever URL you are using on your host to connect to the web service (ex. http://my-local-machine.com)
Hint: If you got 4xx response codes, make sure your web service allows connections from other non-local-hosts.
If you are referring your localhost on your system from the Android emulator then you have to use
http://10.0.2.2:8080/
Because Android emulator runs inside a Virtual Machine(QEMU) therefore here 127.0.0.1 or localhost will be emulator's own loopback address.

Capture HTTP request packets from my iPhone

I want to monitor the HTTP traffic sent/received from my iPhone. The iphone is connected to the Internet via my wifi router.
I want to capture packets from my windows 7 station.
Thanks for your help.
You have a few options here:
If your wireless router has a port mirroring or port spanning feature, turn it on and point it at your workstation's IP. Use Wireshark on your workstation to look at the packets arriving on the interface assigned to that IP.
If your workstation has a wireless card, get Connectify for Windows 7 (turns wireless card into Wifi Hotspot). Connect iPhone through Windows 7 wireless, and workstation through ethernet to the internet. Your workstation will effectively act as a router for your iPhone and you will be able to record iPhone's packets passing through it.
Get an ethernet hub (make sure it is not a switch, you won't see all packets on every interface with a switch), and connect your workstation, wifi router and internet to it.
Get a switch with port mirroring feature, configure port mirroring to forward a copy of all packets to your workstation.
Another option that I wish someone would have mentioned to me is pfSense. This is an operating system based on BSD made to serve as a firewall. Top of the line routers have, say 400 Mhz of processing speed, and unimpressive amounts of ram. The lowest-end computer you'll find these days has better specs than that, and of course, it's upgradeable. You don't have to bother with those terrible Cisco licenses (no DHCP with no license, 20 DHCP users at one license level, 100 users at an higher lever? Ludicrous), etc. Best of all, you have "root' access to the system, so you can run whatever you want on it (including wireshark, say)!!
Make sure you have two sufficiently fast ethernet cards. You'll set your wireless router to not do NAT (because pfSense will be doing that), then you can get to work setting up your VPN server, etc. without thinking about cisco licensing, etc.

Online peer to peer connection

Here i am developing an application which uses peer to peer connection. i am able to communicate using WIFI and Bluetooth connection. i.e a devices with in a same local network are able to communicate with each other.
Is it possible to communicate online using Bonjour service or any other option for online communication.
Please help me...
Bonjour works only in the local network, because the devices communicate via multicast
DNS (IP: 224.0.0.251). You could use Wide Area Bonjour with the cooperation of a DNS server.
Under http://www.dns-sd.org/ServerSetup.html you find a description how to set that up on Unix.
Other than that I don't think there is any special support by Apple. You have to set up some kind of server on the Internet yourself.