Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
Good you got it to work, but try accessing eBay and it won’t work anymore as you need to reboot the computer - the proxy loses connection and this is what I am experiencing. Tell me what you did to stop it from shutting off. My system is a PowerBook G4 Titanium 1Ghz.
 

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,745
2,087
Easy enough to start up with 'launchctl load /Library/LaunchAgents/com.wowfunhappy.squid.plist' , though
Thank you! Okay, so launchd is in fact borked on Leopard... do launchagents usually need to be loaded manually in Leopard? I suppose I could add that to the post install script.

I take it you haven't run into issues with Squid crashing? Have you tried more complex sites? (eBay is a fine test case.)
 

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
So, here is the $100000000 question - if legacy-ppc doesn’t work in leopard, what can I do to get LWK to access websites that I currently can’t ? How do I set it up ?
 

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,745
2,087
So, here is the $100000000 question - if legacy-ppc doesn’t work in leopard, what can I do to get LWK to access websites that I currently can’t ? How do I set it up ?
For now, you need to install Squid on a newer Mac, and connect to it from your old one.

I know you've said it doesn't work in Mojave. "Doesn't work" could mean a million things. Does the package not open? Does it crash midway through installing? Does it finish installing, but then seemingly not do anything? You need to describe what's happening, or take screenshots, or send an installer log.

I may not be able to make it work on Mojave anyway, but I'm happy to try to do some troubleshooting with you. However, troubleshooting this way is a two-person task, and I need your participation!
 
  • Like
Reactions: repairedCheese

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
For now, you need to install Squid on a newer Mac, and connect to it from your old one.

I know you've said it doesn't work in Mojave. "Doesn't work" could mean a million things. Does the package not open? Does it crash midway through installing? Does it finish installing, but then seemingly not do anything? You need to describe what's happening, or take screenshots, or send an installer log.

I may not be able to make it work on Mojave anyway, but I'm happy to try to do some troubleshooting with you. However, troubleshooting this way is a two-person task, and I need your participation!
Hi,

Yes, the package states it does not open. However, I also used it under Snow Leopard and got Firefox older version to work and it loads Wikipedia. Of course.. So, I am using it on Snow Leopard - the good news it does work on Snow Leopard.. but how do I get it to access my PowerBook G4 ? Do I put in the IP address under Proxy ? The IP address starts off with a 10.0.0.X - not 192.168.x.x -> If you can advise what to put into the proxy settings under network preferences, then I can try LWK.
 

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,745
2,087
Hi,

Yes, the package states it does not open. However, I also used it under Snow Leopard and got Firefox older version to work and it loads Wikipedia. Of course.. So, I am using it on Snow Leopard - the good news it does work on Snow Leopard.. but how do I get it to access my PowerBook G4 ? Do I put in the IP address under Proxy ? The IP address starts off with a 10.0.0.X - not 192.168.x.x -> If you can advise what to put into the proxy settings under network preferences, then I can try LWK.

Okay, so you need to do three things.
  1. On Snow Leopard, remove the one "#" character from /Library/Squid/squid.conf, and log out and back in.
  2. Copy /Library/Squid/squid.pem from Snow Leopard to your PowerBook, and import it into Keychain Access and trust it like you did on Snow Leopard.
  3. On the powerbook, set up the proxy as you did in Snow Leopard, but enter the IP address of your Snow Leopard computer. It's fine if it starts with 10.0.0.X.
 

NewbiePPC

macrumors member
Mar 21, 2021
61
38
Hi,

First of all I want to say thank to all of the community and in special to the developers/porters for your amazing job. I just enjoy using my powermac to the point that I use it more that my main computer and those apps, ports, methods, suggestions makes my enjoyment with my old mac.

I tried use the squid port a few days. It work awersome when it did, but for some reason it hangs at certain point (in activity monitor shows about 85 - 90% usage) and was impossible to navigate again, I have to stop the process and squid after a few seconds start again and everithing start to work, but in my experience that happens a lot so I uninstalled. I decided to use a raspberry 3b that I have around i give it a shot (It has pihole installed and of course I use with my MDD).

I'm not good compiling things, always something failed and I don't have enough knowledge to make it work, but I saw this page that detail the process to compile squid 4.13 to debian x86/64 or arm and in the github repository there are the scripts to do it (I thought, PERFECT just run and see the magic happen), It failed on me.

When I use "make all" or "make" it end with this error


eui64_aton.c: In function ‘eui64_aton’:
eui64_aton.c:144:1: internal compiler error: Segmentation fault
}
^

I have tried other metods to compile squid 4.14, directly download the source from the squid page following the next sentences:


# Install build tools
sudo apt install devscripts build-essential fakeroot sudo debhelper dh-autoreconf dh-apparmor cdbs ed net-tools

# Install additional header packages for squid4
sudo apt install libcppunit-dev libsasl2-dev libxml2-dev libkrb5-dev libdb-dev libnetfilter-conntrack-dev libexpat1-dev libcap2-dev libldap2-dev libpam0g-dev libgnutls28-dev libssl-dev libdbi-perl libecap3 libecap3-dev libsystemd-dev

# Install build dependences for squid
sudo apt-get -y build-dep squid

cd
mkdir squid4
wget http://www.squid-cache.org/Versions/v4/squid-4.14.tar.gz
tar -xzvf squid-4.14.tar.gz
cd squid-4.14

#This configuration was used on some random page to compile squid3
./configure --prefix=/usr --localstatedir=/var --libexecdir=${prefix}/lib/squid --datadir=${prefix}/share/squid --sysconfdir=/etc/squid --with-default-user=proxy --with-logdir=/var/log --with-pidfile=/var/run/squid.pid --with-openssl --enable-icmp --enable-ssl --enable-ssl-crtd

make all

And the result is the same. I also try to compile squid3 and the same error happens, I know that maybe this is no place or it's too off topic for this kind of help that I need, but maybe one of you can give a little help. Maybe I'm doing something wrong or it just doesn't work on arm, I don't know, to be honest I don't know if I'm doing the things right, as I said I never been able to compile anything and I don't know anything about HTTPS filtering and SSL Bumping. I just see the result and WOW, "this is amazing!!", wikipedia and a few other pages works again (TFF is good but LWK it's faster, as all we know).

To my understanding there is something weird with the file eui64_aton.c, but I have seen the content of the file for squid3 and 4 and it seems the same and ok to me. I don't thing that there is something wrong there.

Thanks.
(I don't speak English so excuse me if I wrote terrible wrong).
 

Attachments

  • Picture 2.png
    Picture 2.png
    131.6 KB · Views: 94

Bruninho

Suspended
Mar 12, 2021
354
339
This can even suport OS9 if ported as per documentation there. However ot would only make Classilla work in a similar fashion to his Windows Retrozilla cousin. So, some limited support. I believe that with this, Classila can see MacRumors but will not render well and neither login.
 

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,745
2,087
Carl is one of those C projects which are extremely easy to compile. In Tiger I just did gcc -O3 -o carl carl.c as per the readme, and the binary runs.

However, it needs to be hooked up to inetd to work as a proxy, which is not something I've ever worked with before...
 
Last edited:

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
Carl is one of those rare-feeling C projects which are extremely easy to compile! In Tiger I just did gcc -O3 -o carl carl.c as per the readme), but it needs to be hooked up to inetd to work as a proxy, which is not something I've ever worked with before...
Why bother anymore.. we just lost tenfourfox. Its horrible and this is a horrible day for PowerPC. I am calling now upon all of us to embrace M1 in a final war against INTEL and SSL.
 

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,745
2,087
@NewbiePPC Have you checked to see if a prebuilt copy of Squid is available in your distro's repository? You should be able to just do sudo apt install Squid. Hopefully it'll have the requisite ssl-crtd enabled.

If not, you might want to ask for compilation help on the Squid mailing list. The Raspberry Pi is a common platform, it really should work without doing anything too crazy. http://www.squid-cache.org/Support/mailing-lists.html#squid-users
 
Last edited:

NewbiePPC

macrumors member
Mar 21, 2021
61
38
@Wowfunhappy Yeah, I first saw if the squid installation has the requisites and it doesn't. I'll try build it myself for learning and if I can't do it I'll do your recommendation. Either way I'll report any advance when I have the time to do it. Thank you.
 
  • Like
Reactions: Wowfunhappy

NewbiePPC

macrumors member
Mar 21, 2021
61
38
So, after all, the problem was my microsd. After an update my raspberry no longer boots so, I change the microsd, start with a fresh installation of raspbian lite and squid compiled.
 

Attachments

  • Picture 4.png
    Picture 4.png
    104.6 KB · Views: 94
  • SquidTestRPI.txt
    1.5 KB · Views: 109
  • Like
Reactions: Wowfunhappy

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,745
2,087
So, after all, the problem was my microsd. After an update my raspberry no longer boots so, I change the microsd, start with a fresh installation of raspbian lite and squid compiled.
Excellent work. The next steps will probably be:

1. Generate certificates. My installer does this with: openssl req -x509 -newkey rsa:4096 -subj '/CN=Squid' -nodes -days 999999 -keyout squid-key.pem -out squid.pem

2. Copy the squid.conf from my installer, uncomment the one line to allow non-localhost connections, and update the paths to point to the certificate you generated.

After that, start Squid, copy the certificate to your Mac, plug in the Pi's IP, and it might all just work. 🤞
 
Last edited:
  • Like
Reactions: NewbiePPC

alenu

macrumors member
Jul 8, 2020
52
93
Hi!
Just reporting my results with Wowfunhappy´s Legacy Mac Proxy package.
My test machine is a PBG4 12, 1,5GHz, 768 MB of RAM.
My english isn´t very good, i´ll do my best, here it goes:

-Installed the package, followed instructions.
-Squid certificate placed in login keychain.
-Fire up LWK, tried to load Wikipedia: Safari can´t connect to proxy.
-Logout from my user account, login back, tried again loading Wikipedia: no error message but can´t load any pages, the browser´s blue progress bar hangs forever.
-Reboot
-Tried to load a site again, progress bar goes almost to the end but no luck.
-Opened Activity Monitor: squid is eating 94% of my CPU. Killed the process.
-Quit and relaunch Leopard Webkit, tried loading a site and... Yes, it´s working!
-Checked again Activity Monitor, now squid is using less than 10% of my G4.
-Been working ok since then, but ocasionally squid goes back to devour my CPU and have to kill the process and relaunch LWK to make everything back to normal.

Hope this helps someone!
Huge thanks to Wowfunhappy and wicknix, you rock guys!
 

wicknix

macrumors 68030
Original poster
Jun 4, 2017
2,621
5,304
Wisconsin, USA
Thanks. I'm still picking away at the ppc version. I'm going to try using gcc 4.9 rather than gcc 7 to build it again soon after reading some docs that state 4.9 will work to build it. It may fix it, it may not. Will update when i get around to it and test it.
 

PowerHarryG4

macrumors regular
May 31, 2020
108
34
London, England
So, after all, the problem was my microsd. After an update my raspberry no longer boots so, I change the microsd, start with a fresh installation of raspbian lite and squid compiled.
I was struggling to compile squid on my raspberry pi, but the guide you sent and also what you wrote helped me to do it, so thank you. I'm a little stuck with what you do after you install squid. I'm not really sure how to start it. Any help would be much appreciated. I really do not know much when it comes to linux. Cheers.
 

NewbiePPC

macrumors member
Mar 21, 2021
61
38
@PowerHarryG4 Hi, at the moment I have everything running but no working as it should maybe you can go further. Anyways I did change the formula for building squid but I think there will be no difference.

Generate certificates as @Wowfunhappy (Thank you!) installer does, I put them in another folder

cd
mkdir SquidConf
cd SquidConf
openssl req -x509 -newkey rsa:4096 -subj '/CN=Squid' -nodes -days 999999 -keyout squid-key.pem -out squid.pem

Change squid.conf in /etc/squid/squid.conf, mine looks like this

http_port 3128 ssl-bump generate-host-certificates=on cert=/home/pi/SquidConf/squid.pem key=/home/pi/SquidConf/squid-key.pem

tls_outgoing_options cafile=/etc/ssl/certs/ca-certificates.crt
sslcrtd_program /usr/lib/squid/security_file_certgen
#sslcrtd_children 10 startup=5 idle=1

acl localnet src 0.0.0.1-0.255.255.255
acl localnet src 10.0.0.0/8
acl localnet src 100.64.0.0/10
acl localnet src 169.254.0.0/16
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl localnet src fc00::/7
acl localnet src fe80::/10

acl excluded_domains ssl::server_name .pypi.org .pythonhosted.org
acl apple_domains ssl::server_name_regex ess\.apple\.com$ ^sw.*\.apple\.com$
acl excluded any-of excluded_domains apple_domains localnet
ssl_bump splice excluded
ssl_bump bump all

acl fetched_certificate transaction_initiator certificate-fetching
cache allow fetched_certificate
http_access allow fetched_certificate
sslproxy_cert_error deny all

http_access allow localhost
http_access deny to_localhost
http_access allow localnet
http_access deny all

cache_log /dev/null
access_log none
logfile_rotate 0

For some reason the script to start the service in /etc/init.d/squid was missing so I added, if you have the problem here is the content. I do this quite different but I think It should work.

sudo nano /etc/init.d/squid

#! /bin/sh
#
# squid Startup script for the SQUID HTTP proxy-cache.
#
# Version: @(#)squid.rc 1.0 07-Jul-2006 luigi@debian.org
#
# pidfile: /var/run/squid.pid
#
### BEGIN INIT INFO
# Provides: squid
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Squid HTTP Proxy version 4.x
### END INIT INFO

NAME=squid
DESC="Squid HTTP Proxy"
DAEMON=/usr/sbin/squid
PIDFILE=/var/run/$NAME.pid
CONFIG=/etc/squid/squid.conf
SQUID_ARGS="-YC -f $CONFIG"

[ ! -f /etc/default/squid ] || . /etc/default/squid

. /lib/lsb/init-functions

PATH=/bin:/usr/bin:/sbin:/usr/sbin

[ -x $DAEMON ] || exit 0

ulimit -n 65535

find_cache_dir () {
w=" " # space tab
res=`$DAEMON -k parse -f $CONFIG 2>&1 |
grep "Processing:" |
sed s/.*Processing:\ // |
sed -ne '
s/^['"$w"']*'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
t end;
d;
:end q'`
[ -n "$res" ] || res=$2
echo "$res"
}

grepconf () {
w=" " # space tab
res=`$DAEMON -k parse -f $CONFIG 2>&1 |
grep "Processing:" |
sed s/.*Processing:\ // |
sed -ne '
s/^['"$w"']*'$1'['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
t end;
d;
:end q'`
[ -n "$res" ] || res=$2
echo "$res"
}

create_run_dir () {
run_dir=/var/run/squid
usr=`grepconf cache_effective_user proxy`
grp=`grepconf cache_effective_group proxy`

if [ "$(dpkg-statoverride --list $run_dir)" = "" ] &&
[ ! -e $run_dir ] ; then
mkdir -p $run_dir
chown $usr:$grp $run_dir
[ -x /sbin/restorecon ] && restorecon $run_dir
fi
}

start () {
cache_dir=`find_cache_dir cache_dir`
cache_type=`grepconf cache_dir`
run_dir=/var/run/squid

#
# Create run dir (needed for several workers on SMP)
#
create_run_dir

#
# Create spool dirs if they don't exist.
#
if test -d "$cache_dir" -a ! -d "$cache_dir/00"
then
log_warning_msg "Creating $DESC cache structure"
$DAEMON -z -f $CONFIG
[ -x /sbin/restorecon ] && restorecon -R $cache_dir
fi

umask 027
ulimit -n 65535
cd $run_dir
start-stop-daemon --quiet --start \
--pidfile $PIDFILE \
--exec $DAEMON -- $SQUID_ARGS < /dev/null
return $?
}

stop () {
PID=`cat $PIDFILE 2>/dev/null`
start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
#
# Now we have to wait until squid has _really_ stopped.
#
sleep 2
if test -n "$PID" && kill -0 $PID 2>/dev/null
then
log_action_begin_msg " Waiting"
cnt=0
while kill -0 $PID 2>/dev/null
do
cnt=`expr $cnt + 1`
if [ $cnt -gt 24 ]
then
log_action_end_msg 1
return 1
fi
sleep 5
log_action_cont_msg ""
done
log_action_end_msg 0
return 0
else
return 0
fi
}

cfg_pidfile=`grepconf pid_filename`
if test "${cfg_pidfile:-none}" != "none" -a "$cfg_pidfile" != "$PIDFILE"
then
log_warning_msg "squid.conf pid_filename overrides init script"
PIDFILE="$cfg_pidfile"
fi

case "$1" in
start)
res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL: .*"`
if test -n "$res";
then
log_failure_msg "$res"
exit 3
else
log_daemon_msg "Starting $DESC" "$NAME"
if start ; then
log_end_msg $?
else
log_end_msg $?
fi
fi
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
if stop ; then
log_end_msg $?
else
log_end_msg $?
fi
;;
reload|force-reload)
res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL: .*"`
if test -n "$res";
then
log_failure_msg "$res"
exit 3
else
log_action_msg "Reloading $DESC configuration files"
start-stop-daemon --stop --signal 1 \
--pidfile $PIDFILE --quiet --exec $DAEMON
log_action_end_msg 0
fi
;;
restart)
res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL: .*"`
if test -n "$res";
then
log_failure_msg "$res"
exit 3
else
log_daemon_msg "Restarting $DESC" "$NAME"
stop
if start ; then
log_end_msg $?
else
log_end_msg $?
fi
fi
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit 3
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}"
exit 3
;;
esac

exit 0

I believe that you have to change the permissions of the file.

sudo chmod 4755 /etc/init.d/squid

Check if squid starts and it status (or reboot the RPI), as I said it should work but I'm not sure, I did this different and more time consuming

sudo systemctl start squid.service
sudo systemctl status squid.service

For some reason squid shows that pinger was closing , so I found that I have to change its permissions to fix it

sudo chmod 4755 /lib/squid/pinger

Copy the file squid.pem to you mac and add it to the Keychain Access, and change the proxy configuration in network preferences with the IP of the RPI.

At this point I have squid running and the mac using the proxy but I can't reach wikipedia.

To my understanding the mac is connected to the proxy I can reach almost the same pages that before (I don't see the message in LWK "the proxy can't be reach"). Maybe its something with the configuration file or my IPs assigment (My devices are assigned from xx.xx.xx.43 to .60). or the subnet mask here it's 255.255.255.0 that differs the specified in the squid.config file. I could be wrong I'm learning and it's "work" in progress

As a rare fact I see that the pihole is affected by the connection with squid as if it was omitted for the use of the proxy (I don't know if this is spected)
 
Last edited:
  • Like
Reactions: PowerHarryG4
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.