1、Squid 代理
安装
brew install squid
查看是否启动
gucaohan@MacintoshdeMacBook-Pro-3 baidu % brew services list | grep squid
squid started getingting ~/Library/LaunchAgents/homebrew.mxcl.squid.plist
brew services stop squid
brew services start squid
配置文件地址
/opt/homebrew/etc/squid.conf
vi $(brew --prefix)/etc/squid.conf
配置IPV6
http_port [::]:3128
https://webhostinggeeks.com/howto/how-to-configure-squid-proxy-server-for-ipv6/
验证
# https
https_proxy="http://xxx.21.xx.63:8001" curl -v https://www.baidu.com
# http
http_proxy="http://xxx.21.xx.63:8001" curl -v http://www.baidu.com
# ipv6
http_proxy="http://[xxx:da00:c0bd:xxx:1434:xxx:9947:fefd]:8001" curl -v http://www.baidu.com
http://[fe80::10ca:85de:3387:f584%en0]:8001
http_proxy="http://[fe80::10ca:85de:3387:f584%en0]:8001" curl -v http://www.baidu.com
查看
tail -f /opt/homebrew/var/logs/access.log
Mac curl 不通
如果连接不上,确保squid所在的机器上关闭防火墙
手机不通
使用ping测试网络联通性,如果ping不通,检查网络。
ping6 2408:877e:31::7
参考文档:
squid:https://blog.csdn.net/liumiaocn/article/details/108629944
在mac上使用ipv6:https://support.apple.com/zh-cn/guide/mac-help/mchlp2499/mac
https://www.lyytaw.com/%E7%BD%91%E7%BB%9C/%E7%94%A8c%E8%AF%AD%E8%A8%80%E5%86%99%E4%B8%80%E4%B8%AAsocks5%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8/#socket%E7%BC%96%E7%A8%8B%E7%9A%84%E6%95%B4%E4%BD%93%E6%B5%81%E7%A8%8B
ipv6上的%是什么意思:https://cloud.tencent.com/developer/article/1767474