Since the VPN opens up the "space" to use not only custom hosts files, but also allows you to connect to any, including private, DNSCrypt v1 or v2 servers, DNS over HTTPS (DoH) servers, or DNS over TLS (DoT) (1) servers with or without a custom hosts file, whether the hosts file is used as an extra layer of device security & privacy, for blocking the seemingly greater & greater number of ads on iDevices, or for the OP's desired purpose (2). By local, I mean a device-only VPN as there is no need for a LAN server - excepting the security, privacy, speed, & fun that running a local DNS server would give you. However, as was alluded to in previous comments, you can use a local VPN. Editing the actual /etc/hosts file of a non-jailbroken iOS or iPadOS device isn't possible. Reboot to get the daemon running, and edit the proxy server setting on your iPad (settings->wifi) to manual, and enter the IP address of your mac, with port 8118.It's been two years after the last comment & I've no idea if the OP will even read this or still needs a solution however, for anyone who may have been led here via a search engine, the answer is yes, though not directly. So when you set up /Library/LaunchDaemon/, substitute "KeepAlive" for "RunAtLoad"ħ. I found "KeepAlive" worked, and is more in keeping with what you want the OS to do with a daemon like this. After much stuffing about, I worked out that launchd under Yosemite doesn't run the daemon when you use the RunAtLoad key. Detailed instructions are on Andrew's blogĦ. While you're in there, you need to change enable-remote-toggle to 1, enable-edit-actions to 1, and insert your IP address in place of the loopback at listen-address. If you don't like pico, use whatever editor you prefer.
Download the privoxy source, and install it: Add a user for privoxy, and associate them with a freshly created privoxy group.Ĥ. configure a second time because a fresh install of Xcode doesn't work until you've agreed to licence terms, which only come up when you make.ģ. The version linked to in Andrew's blog didn't work with the latest version of Xcode/os x, so I just found the newest version.
This is the apple software development suite, and includes compilers etc, which we'll use for compiling privoxy from source.Ģa. Alas your eyes will still cop the obnoxious ads when you're away from your home network, but for me 90% of my net browsing is done at home, so this is good enough.Ģ. It's just for machines local to your router. Note this isn't an address you can get to from the outside internet, as the router is still doing NAT. I gave it a fixed IP of 10.0.1.101, which is easy to remember.
In my case, I run ifconfig from the terminal, and copy the mac address from the active interface, then paste that into the "DHCP reservations" field for my router using airport utility. I like to use my router to allocate IP addresses, so I set up a binding in there to ensure my mini always comes up at the same IP, but is still able to run DHCP. Your mac needs to have a static IP address, so other machines on your network know where it is. the iPads) and also to work around some Yosemite launchd weirdness:ġ. It's based on instructions at Andrew Watters' blog with extensions to allow access from other machines on your local network (i.e. So here's the secret sauce for getting privoxy running on new Macs running OS X Yosemite. It's the perfect media server, and also the perfect proxy server. I've had PCs that used more power than that when they were switched off. The latest model (as well as having a huge 2TB hard drive for my media and super fast processor and video) draws a piddling 7W of mains power when idle, and are totally silent. The solution for me came in the form of privoxy, which is an adblocking proxy server. I tried a couple of replacement browsers, but found they were even more obnoxious than the ads they blocked. In any case, I was desperate to find a way to browse the net on my iPad without having my eyes constantly burned out by incredibly obnoxious ads. The straw for me came in the form of a "vdopia" popup autoplaying video ad on mac rumours, which was not only incredibly irritating but also broke the mac rumours site. Now I don't know about you, but there's only so many "one weird tip" or "Ellen scandal" ads that I can cope with before going completely postal. There's just one catch: No adblock, at least under Safari. It's a wonderful tool for browsing the web, browsing media, reading stuff and controlling my home theatre PCs, whilst laying on the sofa or in bed.