Я подписался на этот документ сегодня
И попробовал запустить эти две команды
У первого нет вывода, и я нигде не могу найти журналы. Второй выводит на stderr / stdout, поскольку он получает отказ в разрешении (что, черт возьми, почему root не получает разрешение?)
Вот мой результат второй команды ...
Deans-MacBook-Pro:workspace dean$ sudo /usr/local/Cellar/squid/4.11/sbin/squid -f squid.conf -N
WARNING: Cannot write log file: /usr/local/var/logs/cache.log
/usr/local/var/logs/cache.log: Permission denied
messages will be sent to 'stderr'.
2020/05/05 09:47:25| Created PID file (/usr/local/var/run/squid.pid)
2020/05/05 09:47:25| Current Directory is /Users/dean/workspace
WARNING: Cannot write log file: /usr/local/var/logs/cache.log
/usr/local/var/logs/cache.log: Permission denied
messages will be sent to 'stderr'.
2020/05/05 09:47:25| Starting Squid Cache version 4.11 for x86_64-apple-darwin19.4.0...
2020/05/05 09:47:25| Service Name: squid
2020/05/05 09:47:25| Process ID 45668
2020/05/05 09:47:25| Process Roles: master worker
2020/05/05 09:47:25| With 256 file descriptors available
2020/05/05 09:47:25| Initializing IP Cache...
2020/05/05 09:47:25| DNS Socket created at [::], FD 9
2020/05/05 09:47:25| DNS Socket created at 0.0.0.0, FD 10
2020/05/05 09:47:25| Adding nameserver 192.168.2.1 from /etc/resolv.conf
2020/05/05 09:47:25| Logfile: opening log daemon:/usr/local/var/logs/access.log
2020/05/05 09:47:25| Logfile Daemon: opening log /usr/local/var/logs/access.log
2020/05/05 09:47:25| Store logging disabled
2020/05/05 09:47:25| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2020/05/05 09:47:25| Target number of buckets: 1008
2020/05/05 09:47:25| Using 8192 Store buckets
2020/05/05 09:47:25| Max Mem size: 262144 KB
2020/05/05 09:47:25| Max Swap size: 0 KB
2020/05/05 09:47:25| Using Least Load store dir selection
2020/05/05 09:47:25| Current Directory is /Users/dean/workspace
fopen: Permission denied
2020/05/05 09:47:25| Finished loading MIME types and icons.
2020/05/05 09:47:25| HTCP Disabled.
2020/05/05 09:47:25| Squid plugin modules loaded: 0
2020/05/05 09:47:25| Adaptation support is off.
2020/05/05 09:47:25| Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 13 flags=9
2020/05/05 09:47:26| Configuring Parent zproxy.lum-superproxy.io/22225/0
2020/05/05 09:47:26| storeLateRelease: released 0 objects
2020/05/05 09:47:26| logfileHandleWrite: daemon:/usr/local/var/logs/access.log: error writing ((32) Broken pipe)
2020/05/05 09:47:26| Closing HTTP(S) port [::]:3128
2020/05/05 09:47:26| storeDirWriteCleanLogs: Starting...
2020/05/05 09:47:26| Finished. Wrote 0 entries.
2020/05/05 09:47:26| Took 0.00 seconds ( 0.00 entries/sec).
2020/05/05 09:47:26| FATAL: I don't handle this error well!
2020/05/05 09:47:26| Squid Cache (Version 4.11): Terminated abnormally.
CPU Usage: 0.045 seconds = 0.033 user + 0.012 sys
Maximum Resident Size: 45465600 KB
Page faults with physical i/o: 59
2020/05/05 09:47:26| Removing PID file (/usr/local/var/run/squid.pid)
Deans-MacBook-Pro:workspace dean$
Есть идеи, как заставить squid работать на Mac?
Мой файл конфигурации прост
http_port 3128
cache_peer proxy-host-name parent proxy-port 0 \
no-query \
login=username:password \
connect-fail-limit=99999999 \
proxy-only \
name=my_peer
cache_peer_access my_peer allow all
Мое обходное решение - добавить эти атрибуты в squid.conf файл
access_log stdio:/tmp/squid.log
cache_log /tmp/squid-cache.log
и создайте эту папку
sudo mkdir /var/spool/squid
наконец запустить
sudo /usr/local/Cellar/squid/4.11/sbin/squid -f squid.conf -N