Last active
October 5, 2024 07:54
-
-
Save zhanglianxin/a7b57ce15ef36211b3700498462c1314 to your computer and use it in GitHub Desktop.
Update V2Ray core files for V2rayU(v3.2.0) on macOS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for [V2rayU](https://github.com/yanue/V2rayU). | |
V2RAY_HOME=~/v2ray-core | |
INAPP_DIR=/Applications/V2rayU.app/Contents/Resources/v2ray-core | |
INUSER_DIR=~/.V2rayU/v2ray-core | |
# brew install --cask v2rayu | |
# brew install v2ray xray | |
if [ ! -d "$V2RAY_HOME" ]; then | |
echo "$V2RAY_HOME does not exist, make it." | |
mkdir $V2RAY_HOME | |
fi | |
ln -f /usr/local/opt/xray/libexec/xray \ | |
/usr/local/opt/v2ray/libexec/v2ray \ | |
/usr/local/opt/v2ray/share/v2ray/{geoip.dat,geosite.dat} \ | |
$V2RAY_HOME | |
mv $INAPP_DIR ${INAPP_DIR}.bak | |
mv $INUSER_DIR ${INUSER_DIR}.bak | |
ln -sf $V2RAY_HOME $INAPP_DIR | |
ln -sf $V2RAY_HOME $INUSER_DIR | |
echo 'Done.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment