@@ -1609,6 +1609,10 @@ toggle_warp_reality() {
16091609
16101610 jq ' .outbounds = [' " $new_json " ' ]' " $file " > /tmp/tmp_config.json
16111611 mv /tmp/tmp_config.json " $file "
1612+
1613+ jq ' (.route.rules[] | select(.inbound[0] == "vless-in")).outbound = "direct"' /tmp/tmp_config.json > /tmp/final_config.json
1614+ mv /tmp/final_config.json " $file "
1615+
16121616 systemctl start RS
16131617
16141618 whiptail --msgbox " WARP is disabled now" 10 30
@@ -1618,6 +1622,10 @@ toggle_warp_reality() {
16181622
16191623 jq --argjson new_outbounds " $outbounds_block " ' .outbounds = $new_outbounds' " $file " > temp_config.json
16201624 mv temp_config.json " $file "
1625+
1626+ jq ' (.route.rules[] | select(.inbound[0] == "vless-in")).outbound = "wireguard-out"' /tmp/tmp_config.json > /tmp/final_config.json
1627+ mv /tmp/final_config.json " $file "
1628+
16211629 systemctl start RS
16221630
16231631 whiptail --msgbox " WARP is enabled now" 10 30
@@ -1649,6 +1657,10 @@ toggle_warp_shadowtls() {
16491657
16501658 jq ' .outbounds = [' " $new_json " ' ]' " $file " > /tmp/tmp_config.json
16511659 mv /tmp/tmp_config.json " $file "
1660+
1661+ jq ' (.route.rules[] | select(.inbound[0] == "shadowsocks-in")).outbound = "direct"' /tmp/tmp_config.json > /tmp/final_config.json
1662+ mv /tmp/final_config.json " $file "
1663+
16521664 systemctl start ST
16531665
16541666 whiptail --msgbox " WARP is disabled now" 10 30
@@ -1658,6 +1670,10 @@ toggle_warp_shadowtls() {
16581670
16591671 jq --argjson new_outbounds " $outbounds_block " ' .outbounds = $new_outbounds' " $file " > temp_config.json
16601672 mv temp_config.json " $file "
1673+
1674+ jq ' (.route.rules[] | select(.inbound[0] == "shadowsocks-in")).outbound = "wireguard-out"' /tmp/tmp_config.json > /tmp/final_config.json
1675+ mv /tmp/final_config.json " $file "
1676+
16611677 systemctl start ST
16621678
16631679 whiptail --msgbox " WARP is enabled now" 10 30
@@ -1689,6 +1705,10 @@ toggle_warp_tuic() {
16891705
16901706 jq ' .outbounds = [' " $new_json " ' ]' " $file " > /tmp/tmp_config.json
16911707 mv /tmp/tmp_config.json " $file "
1708+
1709+ jq ' (.route.rules[] | select(.inbound[0] == "tuic-in")).outbound = "direct"' /tmp/tmp_config.json > /tmp/final_config.json
1710+ mv /tmp/final_config.json " $file "
1711+
16921712 systemctl start TS
16931713
16941714 whiptail --msgbox " WARP is disabled now" 10 30
@@ -1698,6 +1718,10 @@ toggle_warp_tuic() {
16981718
16991719 jq --argjson new_outbounds " $outbounds_block " ' .outbounds = $new_outbounds' " $file " > temp_config.json
17001720 mv temp_config.json " $file "
1721+
1722+ jq ' (.route.rules[] | select(.inbound[0] == "tuic-in")).outbound = "wireguard-out"' /tmp/tmp_config.json > /tmp/final_config.json
1723+ mv /tmp/final_config.json " $file "
1724+
17011725 systemctl start TS
17021726
17031727 whiptail --msgbox " WARP is enabled now" 10 30
@@ -1729,6 +1753,10 @@ toggle_warp_hysteria() {
17291753
17301754 jq ' .outbounds = [' " $new_json " ' ]' " $file " > /tmp/tmp_config.json
17311755 mv /tmp/tmp_config.json " $file "
1756+
1757+ jq ' (.route.rules[] | select(.inbound[0] == "hy2-in")).outbound = "direct"' /tmp/tmp_config.json > /tmp/final_config.json
1758+ mv /tmp/final_config.json " $file "
1759+
17321760 systemctl start SH
17331761
17341762 whiptail --msgbox " WARP is disabled now" 10 30
@@ -1738,6 +1766,10 @@ toggle_warp_hysteria() {
17381766
17391767 jq --argjson new_outbounds " $outbounds_block " ' .outbounds = $new_outbounds' " $file " > temp_config.json
17401768 mv temp_config.json " $file "
1769+
1770+ jq ' (.route.rules[] | select(.inbound[0] == "hy2-in")).outbound = "wireguard-out"' /tmp/tmp_config.json > /tmp/final_config.json
1771+ mv /tmp/final_config.json " $file "
1772+
17411773 systemctl start SH
17421774
17431775 whiptail --msgbox " WARP is enabled now" 10 30
@@ -1769,6 +1801,10 @@ toggle_warp_ws() {
17691801
17701802 jq ' .outbounds = [' " $new_json " ' ]' " $file " > /tmp/tmp_config.json
17711803 mv /tmp/tmp_config.json " $file "
1804+
1805+ jq ' (.route.rules[] | select(.inbound[0] == "vless-in")).outbound = "direct"' /tmp/tmp_config.json > /tmp/final_config.json
1806+ mv /tmp/final_config.json " $file "
1807+
17721808 systemctl start WS
17731809
17741810 whiptail --msgbox " WARP is disabled now" 10 30
@@ -1778,6 +1814,10 @@ toggle_warp_ws() {
17781814
17791815 jq --argjson new_outbounds " $outbounds_block " ' .outbounds = $new_outbounds' " $file " > temp_config.json
17801816 mv temp_config.json " $file "
1817+
1818+ jq ' (.route.rules[] | select(.inbound[0] == "vless-in")).outbound = "wireguard-out"' /tmp/tmp_config.json > /tmp/final_config.json
1819+ mv /tmp/final_config.json " $file "
1820+
17811821 systemctl start WS
17821822
17831823 whiptail --msgbox " WARP is enabled now" 10 30
@@ -1809,6 +1849,10 @@ toggle_warp_grpc() {
18091849
18101850 jq ' .outbounds = [' " $new_json " ' ]' " $file " > /tmp/tmp_config.json
18111851 mv /tmp/tmp_config.json " $file "
1852+
1853+ jq ' (.route.rules[] | select(.inbound[0] == "vless-in")).outbound = "direct"' /tmp/tmp_config.json > /tmp/final_config.json
1854+ mv /tmp/final_config.json " $file "
1855+
18121856 systemctl start WS
18131857
18141858 whiptail --msgbox " WARP is disabled now" 10 30
@@ -1818,6 +1862,10 @@ toggle_warp_grpc() {
18181862
18191863 jq --argjson new_outbounds " $outbounds_block " ' .outbounds = $new_outbounds' " $file " > temp_config.json
18201864 mv temp_config.json " $file "
1865+
1866+ jq ' (.route.rules[] | select(.inbound[0] == "vless-in")).outbound = "wireguard-out"' /tmp/tmp_config.json > /tmp/final_config.json
1867+ mv /tmp/final_config.json " $file "
1868+
18211869 systemctl start GS
18221870
18231871 whiptail --msgbox " WARP is enabled now" 10 30
@@ -1849,6 +1897,10 @@ toggle_warp_naive() {
18491897
18501898 jq ' .outbounds = [' " $new_json " ' ]' " $file " > /tmp/tmp_config.json
18511899 mv /tmp/tmp_config.json " $file "
1900+
1901+ jq ' (.route.rules[] | select(.inbound[0] == "naive-in")).outbound = "direct"' /tmp/tmp_config.json > /tmp/final_config.json
1902+ mv /tmp/final_config.json " $file "
1903+
18521904 systemctl start NS
18531905
18541906 whiptail --msgbox " WARP is disabled now" 10 30
@@ -1858,6 +1910,10 @@ toggle_warp_naive() {
18581910
18591911 jq --argjson new_outbounds " $outbounds_block " ' .outbounds = $new_outbounds' " $file " > temp_config.json
18601912 mv temp_config.json " $file "
1913+
1914+ jq ' (.route.rules[] | select(.inbound[0] == "naive-in")).outbound = "wireguard-out"' /tmp/tmp_config.json > /tmp/final_config.json
1915+ mv /tmp/final_config.json " $file "
1916+
18611917 systemctl start NS
18621918
18631919 whiptail --msgbox " WARP is enabled now" 10 30
0 commit comments