Skip to content

Commit

Permalink
Support replace on vless protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed Dec 17, 2021
1 parent d94e7df commit 543322f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deploy_server
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ systemctl restart v2ray
systemctl status v2ray

# 从 server.json 来获取必须的一些信息.
v2ray_port=$(cat /etc/v2ray/config.json |grep '"inbounds"' -A10 |grep '"protocol" *: *"vmess"' -A3 |grep '"port"' |grep -o '[0-9]*')
v2ray_port=$(cat /etc/v2ray/config.json |grep '"inbounds"' -A10 |grep '"protocol" *: *"\(vmess\|vless\)"' -A3 |grep '"port"' |grep -o '[0-9]*')
ss_port=$(cat /etc/v2ray/config.json |grep '"inbounds"' -A100 |grep '"protocol" *: *"shadowsocks"' -A3 |grep '"port"' |grep -o '[0-9]*')
ss_encrypt_method=$(cat /etc/v2ray/config.json |grep '"inbounds"' -A100 |grep '"protocol" *: *"shadowsocks"' -A10 |grep '"method"'|cut -d':' -f2|cut -d'"' -f2)
ss_password=$(cat /etc/v2ray/config.json |grep '"inbounds"' -A100 |grep '"protocol" *: *"shadowsocks"' -A10 |grep '"password"'|cut -d':' -f2|cut -d'"' -f2)
Expand Down
2 changes: 1 addition & 1 deletion deploy_side_router
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ sysctl -p > /dev/null
sysctl net.ipv4.tcp_available_congestion_control |grep bbr
sysctl -n net.ipv4.tcp_congestion_control |grep bbr

echo "Congratulations, [0m[33mDeploy succssful[0m!"
/opt/etc/patch_router && echo "Congratulations, [0m[33mDeploy succssful[0m!"
2 changes: 1 addition & 1 deletion router/opt/etc/apply_iptables_rule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [ -z "$local_v2ray_port" ]; then
exit
fi

v2ray_server_ip=$(cat $config_file |grep 'protocol":\s*\"vmess' -A10 |grep -o '"address": ".*",'|cut -d: '-f2'|cut -d'"' -f2)
v2ray_server_ip=$(cat $config_file |grep 'protocol":\s*\"\(vmess\|vless\)' -A10 |grep -o '"address": ".*",'|cut -d: '-f2'|cut -d'"' -f2)

if [ -z "$v2ray_server_ip" ]; then
echo 'can not find out remote VPS ip/domain in $config_file'
Expand Down

0 comments on commit 543322f

Please sign in to comment.