Step 1/2: Install Squid3
apt-get update apt-get install -y squid3
Allow non-ssl requests: find the http_access block
# Deny requests to certain unsafe portsComment out the last line.
http_access deny !Safe_ports
If you're getting the TCP_DENIED/403 error:
ERROR: The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
You will have to allow your IP address in /etc/squid3/squid.conf:
acl my_ip src 123.123.123.123Replace 123.123.123.123 with your IP address and add the above lines to the very top of the file!
http_access allow my_ip
Step 2/2: Configure iOS to use your proxy
Find out your squid port:netstat -apn | grep squid | grep LISTEN
On your iOS device, go to Settings - Wi-Fi - tap the i in front of the network you're connected to - scroll to PROXY HTTP - add your server IP and port; turn off authentication
That's it. You should now see the requests the iPhone makes in /var/log/squid3/access.log.
No comments:
Post a Comment