From ace0a0cbab7ad91da41bf1a81907ae6220090ac3 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 28 Jun 2018 12:43:26 +0000 Subject: [PATCH] Fix OBFS support --- debian9-x86_64.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index ac6ae12..aac57d3 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -101,7 +101,9 @@ if [ "$OBFS" = "yes" ]; then make install cd /tmp rm -rf /tmp/simple-obfs - sed -i 's%"mptcp": true%"mptcp": true,\n"plugin": "/usr/local/bin/obfs-server --obfs http --mptcp --fast-open"%' /etc/shadowsocks-libev/config.json + sed -i 's%"mptcp": true%"mptcp": true,\n"plugin": "/usr/local/bin/obfs-server",\n"plugin_opts": "obfs=http;mptcp;fast-open"%' /etc/shadowsocks-libev/config.json +else + sed -i -e '/plugin/d' -e 's/,,//' /etc/shadowsocks-libev/config.json fi if [ "$MLVPN" = "yes" ]; then @@ -236,9 +238,9 @@ fi # Add OpenMPTCProuter VPS script version to /etc/motd if grep --quiet 'OpenMPTCProuter VPS' /etc/motd; then - sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS 0.27 >:' /etc/motd + sed -i 's:< OpenMPTCProuter VPS [0-9]*\.[0-9]* >:< OpenMPCTProuter VPS 0.29 >:' /etc/motd else - echo '< OpenMPTCProuter VPS 0.27 >' >> /etc/motd + echo '< OpenMPTCProuter VPS 0.29 >' >> /etc/motd fi if [ "$update" = "0" ]; then @@ -295,12 +297,12 @@ else systemctl -q restart shorewall systemctl -q restart shorewall6 echo 'done' + echo 'Restarting shadowsocks...' + systemctl -q restart shadowsocks-libev + echo 'done' if [ "$OPENVPN" = "yes" ]; then echo 'Restarting OpenVPN' systemctl -q restart openvpn-server@tun0 echo 'done' fi - echo 'Restarting shadowsocks...' - systemctl -q restart shadowsocks-libev - echo 'done' fi