1
0

c.sh 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. #!/bin/bash
  2. clear
  3. echo -e "\033[1;33m ""\033[1;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
  4. echo -e "\033[1;33m ""\E[41;1;37m << ACTIVACION Y DESACTIVACION TCP SPEED >> \033[0m"
  5. echo -e "\033[1;33m ""\033[1;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
  6. echo ""
  7. echo -e "\E[41;1;37mSI ACTIVAS BBR DESACTIVA PRIMERO PARA ACTIVAR CUBIC Y BBR\033[0m"
  8. echo ""
  9. echo -e "\E[48;1;37m[1] • ACTIVAR TCP SPEED BBR\033[0m ""\E[48;1;37m[3] • ACTIVAR TCP SPEED CUBIC\033[0m"
  10. echo -e "\E[48;1;37m[2] • DESACTIVAR TCP SPEED BBR\033[0m ""\E[48;1;37m[4] • DESACTIVAR TCP SPEED CUBIC\033[0m"
  11. echo ""
  12. tput setaf 7 ; tput setab 4 ; tput bold ; printf '%0s%s%-0s' "SISTEMA TCP ACTIVO EN:" ; tput sgr0 ; tput setaf 5 ; tput bold ; printf '%0s%-1s>>%-1s' ; tput sgr0 ; tput setaf 7 ; tput setab 1 ; tput bold ; printf '%0s%0s%-0s'
  13. sysctl net.ipv4.tcp_congestion_control ; tput sgr0
  14. echo ""
  15. echo ""
  16. echo -e "\E[41;1;37mCAMBIA DNS DE GOOGLE A CLOUDFLARE CAMBIAR AL GUSTO EL DNS\033[0m"
  17. echo ""
  18. echo -e "\E[48;1;37m[5] • ACTIVAR DNS DE CLOUDFLARE\033[0m ""\E[48;1;37m[7] • ACTIVAR DNS DE GOOGLE\033[0m"
  19. echo -e "\E[48;1;37m[6] • DESACTIVAR DNS CLOUDFLARE\033[0m ""\E[48;1;37m[8] • DESACTIVAR DNS GOOGLE\033[0m"
  20. echo -e "\033[1;35m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
  21. echo -e "\E[48;1;37m[9] • ACTIVAR DNS DE OPENDNS\033[0m ""\E[48;1;37m[11]• ACTIVAR DNS QUAD9\033[0m"
  22. echo -e "\E[48;1;37m[10]• DESACTIVAR DNS OPENDNS\033[0m ""\E[48;1;37m[12]• DESACTIVAR DNS QUAD9\033[0m"
  23. echo -e "\033[1;35m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
  24. echo -e "\E[48;1;37m[13]• ACTIVAR ESTABLE DNS.WATCH\033[0m ""\E[48;1;37m[16]• ACTIVAR DNS NETFLIX Y JUEGOS\033[0m"
  25. echo -e "\E[48;1;37m[14]• DESACTIVAR EL DNS.WATCH\033[0m ""\E[48;1;37m[17]• DESACTIVAR DNS NETFLIX Y JUEGOS\033[0m"
  26. echo ""
  27. tput setaf 7 ; tput setab 4 ; tput bold ; printf '%0s%s%-0s' "DNS ACTUAL Y EN USO:" ; tput sgr0 ; tput setaf 5 ; tput bold ; printf '%0s%-1s>>%-1s' ; tput sgr0 ; tput setaf 7 ; tput setab 1 ; tput bold ; printf '%0s%s%-0s\n' "ACTIVAR EL APAGADO Y DESACTIVAR EL ONLINE PARA CAMBIAR" ; tput sgr0 ; tput setaf 7 ; tput setab 1 ; tput bold ;
  28. cat /etc/resolv.conf | grep nameserver ; tput sgr0
  29. echo ""
  30. echo -e "\E[41;1;37m[15]-AUTO-MENU\033[0m" "\E[41;1;37m[00]-EXIT\033[0m"
  31. echo ""
  32. function ac () {
  33. echo -e "\E[44;1;37mTCP SPEED BBR A SIDO ACTIVADO CON EXITO\033[0m"
  34. sleep 2.5s
  35. echo "net.ipv4.tcp_window_scaling = 1
  36. net.core.default_qdisc=fq
  37. net.ipv6.conf.all.disable_ipv6=1
  38. net.ipv6.conf.default.disable_ipv6=1
  39. net.core.rmem_max = 16777216
  40. net.core.wmem_max = 16777216
  41. net.ipv4.tcp_rmem = 4096 87380 16777216
  42. net.ipv4.tcp_wmem = 4096 16384 16777216
  43. net.ipv4.tcp_low_latency = 1
  44. net.ipv4.tcp_slow_start_after_idle = 0
  45. net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
  46. sudo sysctl -p
  47. /root/c.sh
  48. clear
  49. }
  50. function ad () {
  51. echo -e "\E[44;1;37mTCP SPEED BBR A SIDO DESACTIVADO CON EXITO\033[0m"
  52. sleep 2.5s
  53. grep -v "^a
  54. net.ipv4.tcp_window_scaling = 1
  55. net.core.default_qdisc=fq
  56. net.ipv6.conf.all.disable_ipv6=1
  57. net.ipv6.conf.default.disable_ipv6=1
  58. net.core.rmem_max = 16777216
  59. net.core.wmem_max = 16777216
  60. net.ipv4.tcp_rmem = 4096 87380 16777216
  61. net.ipv4.tcp_wmem = 4096 16384 16777216
  62. net.ipv4.tcp_low_latency = 1
  63. net.ipv4.tcp_slow_start_after_idle = 0
  64. net.ipv4.tcp_congestion_control=bbr" /etc/sysctl.conf > /tmp/syscl && mv -f /tmp/syscl /etc/sysctl.conf
  65. sudo sysctl -p
  66. /root/c.sh
  67. }
  68. function es () {
  69. echo -e "\E[44;1;37mTCP SPEED CUBIC A SIDO ACTIVADO CON EXITO\033[0m"
  70. sleep 2.5s
  71. echo "net.ipv4.tcp_window_scaling = 1
  72. net.core.default_qdisc=fq
  73. net.ipv6.conf.all.disable_ipv6=1
  74. net.ipv6.conf.default.disable_ipv6=1
  75. net.core.rmem_max = 16777216
  76. net.core.wmem_max = 16777216
  77. net.ipv4.tcp_rmem = 4096 87380 16777216
  78. net.ipv4.tcp_wmem = 4096 16384 16777216
  79. net.ipv4.tcp_low_latency = 1
  80. net.ipv4.tcp_slow_start_after_idle = 0
  81. net.ipv4.tcp_congestion_control=cubic" >> /etc/sysctl.conf
  82. sudo sysctl -p
  83. /root/c.sh
  84. }
  85. function as () {
  86. echo -e "\E[44;1;37mTCP SPEED CUBIC A SIDO DESACTIVADO CON EXITO\033[0m"
  87. sleep 2.5s
  88. grep -v "^a
  89. net.ipv4.tcp_window_scaling = 1
  90. net.core.default_qdisc=fq
  91. net.ipv6.conf.all.disable_ipv6=1
  92. net.ipv6.conf.default.disable_ipv6=1
  93. net.core.rmem_max = 16777216
  94. net.core.wmem_max = 16777216
  95. net.ipv4.tcp_rmem = 4096 87380 16777216
  96. net.ipv4.tcp_wmem = 4096 16384 16777216
  97. net.ipv4.tcp_low_latency = 1
  98. net.ipv4.tcp_slow_start_after_idle = 0
  99. net.ipv4.tcp_congestion_control=cubic" /etc/sysctl.conf > /tmp/syscl && mv -f /tmp/syscl /etc/sysctl.conf
  100. sudo sysctl -p
  101. /root/c.sh
  102. clear
  103. }
  104. function uy () {
  105. echo -e "\E[44;1;37mMODULO SPEED A SIDO ACTIVADO CON EXITO\033[0m"
  106. sleep 2.5s
  107. echo "net.ipv6.conf.all.disable_ipv6=1
  108. net.ipv6.conf.default.disable_ipv6=1
  109. net.core.rmem_default = 524288
  110. net.core.rmem_max = 524288
  111. net.core.wmem_default = 524288
  112. net.core.wmem_max = 524288
  113. net.ipv4.tcp_wmem = 87380 4096 524288
  114. net.ipv4.tcp_rmem = 87380 4096 524288
  115. net.ipv4.tcp_mem = 524288 524288 524288
  116. net.ipv4.tcp_rfc1337 = 1
  117. net.ipv4.ip_no_pmtu_disc = 0
  118. net.ipv4.tcp_sack = 1
  119. net.ipv4.tcp_fack = 1
  120. net.ipv4.tcp_window_scaling = 1
  121. net.ipv4.tcp_timestamps = 1
  122. net.ipv4.tcp_ecn = 0
  123. net.ipv4.route.flush = 1" >> /etc/sysctl.conf
  124. sudo sysctl -p
  125. /root/c.sh
  126. }
  127. function ag () {
  128. echo -e "\E[44;1;37mMODULO SPEED A SIDO DESACTIVADO CON EXITO\033[0m"
  129. sleep 2.5s
  130. grep -v "^a
  131. net.ipv6.conf.all.disable_ipv6=1
  132. net.ipv6.conf.default.disable_ipv6=1
  133. net.core.rmem_default = 524288
  134. net.core.rmem_max = 524288
  135. net.core.wmem_default = 524288
  136. net.core.wmem_max = 524288
  137. net.ipv4.tcp_wmem = 87380 4096 524288
  138. net.ipv4.tcp_rmem = 87380 4096 524288
  139. net.ipv4.tcp_mem = 524288 524288 524288
  140. net.ipv4.tcp_rfc1337 = 1
  141. net.ipv4.ip_no_pmtu_disc = 0
  142. net.ipv4.tcp_sack = 1
  143. net.ipv4.tcp_fack = 1
  144. net.ipv4.tcp_window_scaling = 1
  145. net.ipv4.tcp_timestamps = 1
  146. net.ipv4.tcp_ecn = 0
  147. net.ipv4.route.flush = 1" /etc/sysctl.conf > /tmp/syscl && mv -f /tmp/syscl /etc/resolv.conf
  148. /root/c.sh
  149. }
  150. function bb () {
  151. echo -e "\E[44;1;37mDNS CLOUDFLARE A SIDO ACTIVADO\033[0m"
  152. sleep 2.5s
  153. echo "
  154. nameserver 1.1.1.1
  155. nameserver 1.0.0.1" >> /etc/resolv.conf
  156. /root/c.sh
  157. }
  158. function cg () {
  159. echo -e "\E[44;1;37mDNS CLOUDFLARE A SIDO DESACTIVADO\033[0m"
  160. sleep 2.5s
  161. grep -v "^a
  162. nameserver 1.1.1.1
  163. nameserver 1.0.0.1
  164. nameserver 127.0.0.53
  165. options edns0
  166. #nameserver 127.0.0.53" /etc/resolv.conf > /tmp/syscl && mv -f /tmp/syscl /etc/resolv.conf
  167. /root/c.sh
  168. }
  169. function vb () {
  170. echo -e "\E[44;1;37mDNS DE GOOGLE A SIDO ACTIVADO\033[0m"
  171. sleep 2.5s
  172. echo "
  173. nameserver 8.8.8.8
  174. nameserver 8.8.4.4" >> /etc/resolv.conf
  175. /root/c.sh
  176. }
  177. function re () {
  178. echo -e "\E[44;1;37mDNS DE GOOGLE A SIDO DESACTIVADO\033[0m"
  179. sleep 2.5s
  180. grep -v "^a
  181. nameserver 8.8.8.8
  182. nameserver 8.8.4.4
  183. nameserver 127.0.0.53
  184. options edns0
  185. #nameserver 127.0.0.53" /etc/resolv.conf > /tmp/syscl && mv -f /tmp/syscl /etc/resolv.conf
  186. /root/c.sh
  187. }
  188. function tt () {
  189. echo -e "\E[44;1;37mDNS DE OPENDNS A SIDO ACTIVADO\033[0m"
  190. sleep 2.5s
  191. echo "
  192. nameserver 208.67.222.222
  193. nameserver 208.67.220.220" >> /etc/resolv.conf
  194. /root/c.sh
  195. }
  196. function bn () {
  197. echo -e "\E[44;1;37mDNS DE OPENDNS A SIDO DESACTIVADO\033[0m"
  198. sleep 2.5s
  199. grep -v "^a
  200. nameserver 208.67.222.222
  201. nameserver 208.67.220.220
  202. nameserver 127.0.0.53
  203. options edns0
  204. #nameserver 127.0.0.53" /etc/resolv.conf > /tmp/syscl && mv -f /tmp/syscl /etc/resolv.conf
  205. /root/c.sh
  206. }
  207. function kl () {
  208. echo -e "\E[44;1;37mDNS QUAD9 A SIDO ACTIVADO\033[0m"
  209. sleep 2.5s
  210. echo "
  211. nameserver 9.9.9.9
  212. nameserver 149.112.112.112" >> /etc/resolv.conf
  213. /root/c.sh
  214. }
  215. function mk () {
  216. echo -e "\E[44;1;37mDNS QUAD9 A SIDO DESACTIVADO\033[0m"
  217. sleep 2.5s
  218. grep -v "^a
  219. nameserver 9.9.9.9
  220. nameserver 149.112.112.112
  221. nameserver 127.0.0.53
  222. options edns0
  223. #nameserver 127.0.0.53" /etc/resolv.conf > /tmp/syscl && mv -f /tmp/syscl /etc/resolv.conf
  224. /root/c.sh
  225. }
  226. function pq () {
  227. echo -e "\E[0;37;44mDNS NETFLIX Y JUEGOS ACTIVADO CON EXITO\033[0m"
  228. sleep 2.5s
  229. echo "
  230. nameserver 45.55.147.169
  231. nameserver 204.12.225.226" >> /etc/resolv.conf
  232. /root/c.sh
  233. }
  234. function qp () {
  235. grep -v "^a
  236. nameserver 45.55.147.169
  237. nameserver 204.12.225.226" /etc/resolv.conf > /tmp/syscl && mv -f /tmp/syscl /etc/resolv.conf
  238. /root/c.sh
  239. }
  240. function as () {
  241. echo -e "\E[0;37;44mDNS ACTIVADO CON EXITO\033[0m"
  242. sleep 2.5s
  243. echo "
  244. nameserver 84.200.69.80
  245. nameserver 84.200.70.40" >> /etc/resolv.conf
  246. /root/c.sh
  247. }
  248. function adn () {
  249. echo -e "\E[0;37;44mDNS.WATCH DESACTIVADO CON EXITO\033[0m"
  250. sleep 2.5s
  251. grep -v "^a
  252. nameserver 84.200.69.80
  253. nameserver 84.200.70.40" /etc/resolv.conf > /tmp/syscl && mv -f /tmp/syscl /etc/resolv.conf
  254. /root/c.sh
  255. }
  256. echo -ne "\E[41;1;37mOPCION:\033[0m""\033[1;37m>>\033[0m "; read opcion
  257. case $opcion in
  258. 1)ac
  259. ;;
  260. 2)ad
  261. ;;
  262. 3)es
  263. ;;
  264. 4)as
  265. ;;
  266. 5)bb
  267. ;;
  268. 6)cg
  269. ;;
  270. 7)vb
  271. ;;
  272. 8)re
  273. ;;
  274. 9)tt
  275. ;;
  276. 10)bn
  277. ;;
  278. 11)kl
  279. ;;
  280. 12)mk
  281. ;;
  282. 13)as
  283. ;;
  284. 14)adn
  285. ;;
  286. 15)/root/menu
  287. ;;
  288. 16)pq
  289. ;;
  290. 17)qp
  291. ;;
  292. esac
  293. exit