278 字
1 分钟
黑苹果

记得分好区!#

第一步一定是分区,要至少200M的EFI分区,格式为FAT32。如果采用微PE安装Windows,也要给Windows提前分好EFI分区和安装的分区。

macOS配置#

v2ray#

把下载好的v2raya和v2ray移动到如下地址:

Terminal window
sudo mkdir /usr/local/bin/
sudo mkdir -p /usr/local/share/v2ray/
mkdir ~/Library/LaunchAgents/
sudo mv v2raya /usr/local/bin/
sudo mv v2ray /usr/local/bin/
mv geoip.dat ~/Library/Application\ Support/v2ray/geoip.dat
mv geosite.dat ~/Library/Application\ Support/v2ray/geosite.dat
sudo chmod 755 /usr/local/bin/v2ray
sudo chmod 755 /usr/local/bin/v2raya

新建服务文件并保存到~/Library/LaunchAgents/

如:vim ~/Library/LaunchAgents/org.v2raya.v2raya.plist

内容如下:

Terminal window
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>V2RAYA_LOG_FILE</key>
<string>/tmp/v2raya.log</string>
<key>V2RAYA_V2RAY_BIN</key>
<string>/usr/local/bin/v2ray</string>
</dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.v2raya.v2raya</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/v2raya</string>
<string>--lite</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

运行#

Terminal window
launchctl load ~/Library/LaunchAgents/org.v2raya.v2raya.plist

如果要关掉v2rayA服务,将上述命令从load替换为unload即可。可以通过Web前端查看日志。

Web前端地址为:localhost:2017

配置git代理#

设置全局代理:

Terminal window
git config --global http.proxy socks5://127.0.0.1:20170
git config --global https.proxy socks5://127.0.0.1:20170

针对某项目,在根目录下:

Terminal window
git config --local http.proxy socks5://127.0.0.1:20170
git config --local https.proxy socks5://127.0.0.1:20170

查看代理配置情况:

Terminal window
git config --global --get http.proxy
git config --global --get https.proxy

取消代理:

Terminal window
git config --global --unset http.proxy
git config --global --unset https.proxy

配置Homebrew#

Terminal window
/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
黑苹果
https://blog.xiaobaizhang.top/posts/hackintosh/
作者
张小白
发布于
2024-01-29
许可协议
CC BY-NC-SA 4.0