This is an amazingly difficult thing to find instructions on the internet for. I hope this helps someone, apologies if the “code” tags aren’t too clear. I think that’s the style.

You will need:
To be able to configure the gateway router on either the target box or on your DHCP server.
To be comfortable with the command line (no, seriously)
SquidMan 3.1

Method:
Initially you might think that OSX Server will be necessary but probably isn’t. Apache doesn’t seem suited to transparent proxying and it seems to make doing your own configuration harder too with Lion.

Install SquidMan, then go into the template tab and look for
http_port %PORT%. Underneath that line, add
http_port 3129 transparent

I run the main port as 3128. I think that’s about all I tweaked.

You’ll want to test this works (at least for proxying) set your web proxy to localhost:3128 in internet settings/advanced/proxies and apply the changes. If you can still browse the web, great. If not, check your logs (Squidman offers a window to browse them, or you can tail them in ~/Library/Logs/squid/…)
OK, so now we need to be able to forward traffic that’s not meant for us, you might already do this if you use your Mac as your firewall/router, but I only have one interface on my Mini so I had to configure this:
sysctl -w net.inet.ip.forwarding=1
Now that you can route packets, set a machine to use this one as your gateway.
Check that machine can still access the internet, if not, tcpdump on the box you are configuring for proxy and see if you see the packets arriving and leaving. If it is all working, you can move onto forcing the proxy.
Here’s the big difference for Lion. Lion uses pf rather than ipfw. Yay for upgraded BSD.
Edit /etc/pf.anchors/com.apple and add to the end:

anchor "910.Custom/*"
load anchor "910.Custom" from "/etc/pf.anchors/910.custom"

Create /etc/pf.anchors/910.custom:
rdr pass on en0 inet proto tcp from 192.168.1.0/24 to any port www -> 127.0.0.1 port 3129
replace en0 with your internet ethernet interface (the one packets from your LAN come in on and 192.168.1.0/24 with your home network.
OK. Now all you need to do is start it:
sudo pfctl -vvv -f /etc/pf.conf -E
the -E tells it to enable pf.
Now you should see squid log entries when you view pages on the machine you set the gateway for.
Now to make it permanent. Before this point, we could reboot and it would all go away :)
edit /etc/sysctl.conf and add
net.inet.ip.forwarding=1
The last thing to do is to set squid and pfctl to run on startup:
Edit /Library/LaunchDaemons/com.mac.adg.SquidMan.plist and ensure the following two keys and values are set:
<key>Disabled</key>
<false/>
<key>RunAtLoad</key>
<true/>

Edit /System/Library/LaunchDaemons/com.apple.pfctl.plist and ensure the above two keys and values are also set (don’t duplicate keys).. then you’ll need to find this bit:
<key>ProgramArguments</key>
<array>
<string>pfctl</string>
<string>-f</string>
<string>/etc/pf.conf</string>
</array>

And make it like this:
<key>ProgramArguments</key>
<array>
<string>pfctl</string>
<string>-f</string>
<string>/etc/pf.conf</string>
<string>-E</string>
</array>

The -E means enable.