TheyCallMeSecond / config-examples

Hysteria2, TUIC, Reality, ShadowTLS, WebSocket, gRPC, Naive and Warp installer script + client side config examples
GNU General Public License v3.0
301 stars 55 forks source link

ShadowTLS profile reset after update #16

Closed hosseinian closed 10 months ago

hosseinian commented 10 months ago

I'm using ShadowTLS over sing-box. Every time I update the sing-box core, the profile will be reset (passwords will be changed), and I must share the new one with users. Is this issue just for me, or it's general? Can you fix that?

TheyCallMeSecond commented 10 months ago

Update script doesnt touch any configs

    st_core_check="/usr/bin/ST" 

     if [ -e "$st_core_check" ]; then 

         systemctl stop ST 

         rm /usr/bin/ST 

         # Download sing-box binary 
         mkdir /root/singbox && cd /root/singbox || exit 
         LATEST_URL=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/SagerNet/sing-box/releases/latest) 
         LATEST_VERSION="$(echo $LATEST_URL | grep -o -E '/.?[0-9|\.]+$' | grep -o -E '[0-9|\.]+')" 
         LINK="https://github.com/SagerNet/sing-box/releases/download/v${LATEST_VERSION}/sing-box-${LATEST_VERSION}-linux-amd64.tar.gz" 
         wget "$LINK" 
         tar -xf "sing-box-${LATEST_VERSION}-linux-amd64.tar.gz" 
         cp "sing-box-${LATEST_VERSION}-linux-amd64/sing-box" "/usr/bin/ST" 
         cd && rm -rf singbox 

         systemctl start ST 

         echo "ShadowTLS sing-box core has been updated" 

     else 

         echo "ShadowTLS is not installed yet." 

     fi