menu_inst 76 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089
  1. #!/bin/bash
  2. os_version=$(lsb_release -sr);
  3. distribution=$(lsb_release -si);
  4. sslkk (){
  5. sslports=`netstat -tunlp | grep stunnel4 | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/ssl.txt && echo | cat /tmp/ssl.txt | tr '\n' ' ' > /etc/adm-lite/sslports.txt && cat /etc/adm-lite/sslports.txt`;
  6. pt=$(netstat -nplt |grep 'sshd' | awk -F ":" NR==1{'print $2'} | cut -d " " -f 1)
  7. }
  8. #par=$(v2ray info | grep path |awk -F : '{print $4}')
  9. verif_ptrs() {
  10. porta=$1
  11. PT=$(lsof -V -i tcp -P -n | grep -v "ESTABLISHED" | grep -v "COMMAND" | grep "LISTEN")
  12. for pton in $(echo -e "$PT" | cut -d: -f2 | cut -d' ' -f1 | uniq); do
  13. svcs=$(echo -e "$PT" | grep -w "$pton" | awk '{print $1}' | uniq)
  14. [[ "$porta" = "$pton" ]] && {
  15. echo -e "\n\033[1;31mPUERTO \033[1;33m$porta \033[1;31mESTA EN USO POR \033[1;37m$svcs\033[0m"
  16. sleep 0.5
  17. return 0
  18. }
  19. done
  20. }
  21. fun_log () {
  22. [[ -e /bin/ejecutar/sshd_config ]] && {
  23. ####
  24. sysvar=$(cat -n /etc/issue |grep 1 |cut -d' ' -f6,7,8 |sed 's/1//' |sed 's/ //' | grep -o Ubuntu)
  25. [[ ! $(cat /etc/shells|grep "/bin/false") ]] && echo -e "/bin/false" >> /etc/shells
  26. [[ "$sysvar" != "" ]] && {
  27. echo -e "Port 22
  28. Protocol 2
  29. KeyRegenerationInterval 3600
  30. ServerKeyBits 1024
  31. SyslogFacility AUTH
  32. LogLevel INFO
  33. LoginGraceTime 120
  34. PermitRootLogin yes
  35. StrictModes yes
  36. RSAAuthentication yes
  37. PubkeyAuthentication yes
  38. IgnoreRhosts yes
  39. RhostsRSAAuthentication no
  40. HostbasedAuthentication no
  41. PermitEmptyPasswords no
  42. ChallengeResponseAuthentication no
  43. PasswordAuthentication yes
  44. X11Forwarding yes
  45. X11DisplayOffset 10
  46. PrintMotd no
  47. PrintLastLog yes
  48. TCPKeepAlive yes
  49. #UseLogin no
  50. AcceptEnv LANG LC_*
  51. Subsystem sftp /usr/lib/openssh/sftp-server
  52. UsePAM yes
  53. Banner /etc/bannerssh" > /etc/ssh/sshd_config
  54. } || {
  55. echo -e "Port 22
  56. Protocol 2
  57. KeyRegenerationInterval 3600
  58. ServerKeyBits 1024
  59. SyslogFacility AUTH
  60. LogLevel INFO
  61. LoginGraceTime 120
  62. PermitRootLogin yes
  63. StrictModes yes
  64. RSAAuthentication yes
  65. PubkeyAuthentication yes
  66. IgnoreRhosts yes
  67. RhostsRSAAuthentication no
  68. HostbasedAuthentication no
  69. PermitEmptyPasswords no
  70. ChallengeResponseAuthentication no
  71. PasswordAuthentication yes
  72. X11Forwarding yes
  73. X11DisplayOffset 10
  74. PrintMotd no
  75. PrintLastLog yes
  76. TCPKeepAlive yes
  77. #UseLogin no
  78. AcceptEnv LANG LC_*
  79. Subsystem sftp /usr/lib/openssh/sftp-server
  80. UsePAM yes
  81. Banner /etc/bannerssh" > /etc/ssh/sshd_config
  82. }
  83. } || {
  84. cp /etc/ssh/sshd_config /bin/ejecutar/sshd_config
  85. sysvar=$(cat -n /etc/issue |grep 1 |cut -d' ' -f6,7,8 |sed 's/1//' |sed 's/ //' | grep -o Ubuntu)
  86. [[ ! $(cat /etc/shells|grep "/bin/false") ]] && echo -e "/bin/false" >> /etc/shells
  87. [[ "$sysvar" != "" ]] && {
  88. echo -e "Port 22
  89. Protocol 2
  90. KeyRegenerationInterval 3600
  91. ServerKeyBits 1024
  92. SyslogFacility AUTH
  93. LogLevel INFO
  94. LoginGraceTime 120
  95. PermitRootLogin yes
  96. StrictModes yes
  97. RSAAuthentication yes
  98. PubkeyAuthentication yes
  99. IgnoreRhosts yes
  100. RhostsRSAAuthentication no
  101. HostbasedAuthentication no
  102. PermitEmptyPasswords no
  103. ChallengeResponseAuthentication no
  104. PasswordAuthentication yes
  105. X11Forwarding yes
  106. X11DisplayOffset 10
  107. PrintMotd no
  108. PrintLastLog yes
  109. TCPKeepAlive yes
  110. #UseLogin no
  111. AcceptEnv LANG LC_*
  112. Subsystem sftp /usr/lib/openssh/sftp-server
  113. UsePAM yes
  114. Banner /etc/bannerssh" > /etc/ssh/sshd_config
  115. } || {
  116. echo -e "Port 22
  117. Protocol 2
  118. KeyRegenerationInterval 3600
  119. ServerKeyBits 1024
  120. SyslogFacility AUTH
  121. LogLevel INFO
  122. LoginGraceTime 120
  123. PermitRootLogin yes
  124. StrictModes yes
  125. RSAAuthentication yes
  126. PubkeyAuthentication yes
  127. IgnoreRhosts yes
  128. RhostsRSAAuthentication no
  129. HostbasedAuthentication no
  130. PermitEmptyPasswords no
  131. ChallengeResponseAuthentication no
  132. PasswordAuthentication yes
  133. X11Forwarding yes
  134. X11DisplayOffset 10
  135. PrintMotd no
  136. PrintLastLog yes
  137. TCPKeepAlive yes
  138. #UseLogin no
  139. AcceptEnv LANG LC_*
  140. Subsystem sftp /usr/lib/openssh/sftp-server
  141. UsePAM yes
  142. Banner /etc/bannerssh" > /etc/ssh/sshd_config
  143. }
  144. }
  145. ######################
  146. }
  147. selection_fun () {
  148. local selection="null"
  149. local range
  150. for((i=0; i<=$1; i++)); do range[$i]="$i "; done
  151. while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do
  152. echo -ne "\033[1;37m Opcion: " >&2
  153. read selection
  154. tput cuu1 >&2 && tput dl1 >&2
  155. done
  156. echo $selection
  157. }
  158. ban_inex () {
  159. ban=$(cat < /etc/adm-lite/menu_credito)
  160. echo -e " "
  161. echo -e "BANNER INEXISTENTE - RECOMENDADO MODIFICAR TU BANNER"
  162. fun_bar
  163. credi=$(cat < /root/name)
  164. credit=$(cat </etc/adm-lite/menu_credito)
  165. echo -e '<p style="text-align: center;"><strong><span style="color: #FF00FF;">'" $credit "'&reg;</span> |&nbsp;</strong><span style="color: #483D8B;"><strong>'"$credi"'</strong></span></p>' >> /etc/bannerssh
  166. #echo '<p style="text-align: center;"><font color="purple">Verified 【 ★ reselller ★ 】 </font></center>' > /etc/bannerssh
  167. #sed -i "s;reselller;$ban;g" /etc/bannerssh
  168. [[ -d /etc/dropbear ]] && {
  169. [[ -e /etc/bannerssh ]] && cat /etc/bannerssh > /etc/dropbear/banner
  170. } || mkdir /etc/dropbear
  171. #[[ ! -e /etc/dropbear/banner ]] && mkdir /etc/dropbear || cat /etc/bannerssh > /etc/dropbear/banner
  172. echo -e "\033[1;32mCambia Banner en ( * \033[1;33m Menu 1\033[1;32m *\033[1;33m opcion 8 \033[1;32m*\033[1;32m)"
  173. read -p "Presiona Enter para Continuar"
  174. dropbearuniversal
  175. }
  176. function dropbearuniversal(){
  177. echo "› Preparando Instalacion, Espere un Momento"
  178. echo -ne "\033[1;31m[ ! ] RESOLVIENDO SSH -> DROPBEAR "
  179. (
  180. service dropbear stop 1> /dev/null 2> /dev/null
  181. service ssh restart 1> /dev/null 2> /dev/null
  182. ) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
  183. echo -ne "\033[1;31m[ ! ] VERIFICANDO COMPATIBILIDAD DEL BANNER " && sleep 0.5s && echo -e "\033[1;32m [OK]"
  184. [[ -e /etc/bannerssh ]] && {
  185. ####
  186. fun_log
  187. ####
  188. echo "› Instalando Dropbear"
  189. fun_bar 'apt install dropbear -y'
  190. service dropbear stop 1> /dev/null 2> /dev/null
  191. msg -bar
  192. while true; do
  193. echo -ne "\033[1;37m"
  194. echo -e " INGRESA EL PUERTO DROPBEAR A USAR ( Recomendado 80 o 443 )"
  195. echo -e " "
  196. read -p " PUERTO : " puertodropbear
  197. tput cuu1 && tput dl1
  198. PortDROP=`netstat -tlpn | awk -F '[: ]+' '$1=="tcp"{print $5}' | grep -w $puertodropbear`
  199. [[ -n "$PortDROP" ]] || break
  200. prococup=`netstat -tlpn | awk -F '[: ]+' '$5=="$puertodropbear"{print $9}'`
  201. echo -e "\033[1;33m EL PUERTO SE ENCUENTRA OCUPADO POR $prococup"
  202. unset puertodropbear
  203. echo -e "$barra"
  204. done
  205. echo -e "$barra"
  206. echo $puertodropbear > /etc/default/dadd
  207. echo -e "NO_START=0" > /etc/default/dropbear
  208. echo -e 'DROPBEAR_EXTRA_ARGS="-p '$puertodropbear'"' >> /etc/default/dropbear
  209. echo -e 'DROPBEAR_BANNER="/etc/dropbear/banner"' >> /etc/default/dropbear
  210. echo -e "DROPBEAR_RECEIVE_WINDOW=65536" >> /etc/default/dropbear
  211. #sed -i '2i DROPBEAR_PORT="'"$puertodropbear"'"' /etc/default/dropbear
  212. echo "/bin/false" >> /etc/shells
  213. echo "/usr/sbin/nologin" >> /etc/shells
  214. [[ ! -e /etc/dropbear/banner ]] && touch /etc/dropbear/banner || cat /etc/bannerssh > /etc/dropbear/banner
  215. service dropbear restart 1> /dev/null 2> /dev/null
  216. service ssh restart 1> /dev/null 2> /dev/null
  217. dropbearports=`netstat -tunlp | grep dropbear | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/dropbear.txt && echo | cat /tmp/dropbear.txt | tr '\n' ' ' > /etc/adm-lite/dropbearports.txt && cat /etc/adm-lite/dropbearports.txt`;
  218. service sshd restart 1> /dev/null 2> /dev/null
  219. echo -e "\033[1;31m › DROPBEAR SE EJECUTA EN PUERTO\033[0m" $dropbearports " ESCOJIDO " $puertodropbear
  220. service dropbear start 1> /dev/null 2> /dev/null
  221. [[ -f "/usr/sbin/ufw" ]] && ufw allow $puertodropbear/tcp 1> /dev/null 2> /dev/null
  222. fun_eth
  223. echo -e "\033[1;33m › INSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
  224. read -p " "
  225. return 0
  226. } || {
  227. ban_inex
  228. return 1
  229. }
  230. }
  231. function installdropbear(){
  232. clear
  233. dropbearuniversal
  234. return 0
  235. }
  236. [[ $1 != "" ]] && id="$1" || id="es"
  237. barra="\033[1;34m =================================== \033[1;37m"
  238. _cores="./cores"
  239. _dr="./idioma"
  240. #[[ "$(echo ${txt[0]})" = "" ]] && source <(curl -sSL https://www.dropbox.com/s/qolmro09l5v27ix/idioma_geral)
  241. #LISTA PORTAS
  242. mportas () {
  243. unset portas
  244. portas_var=$(lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN")
  245. while read port; do
  246. var1=$(echo $port | awk '{print $1}') && var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
  247. [[ "$(echo -e $portas|grep "$var1 $var2")" ]] || portas+="$var1 $var2\n"
  248. done <<< "$portas_var"
  249. i=1
  250. echo -e "$portas"
  251. }
  252. #MEU IP
  253. fun_ip () {
  254. [[ -e /etc/catIPlocal && -e /etc/catIP ]] && {
  255. MEU_IP=$(cat < /etc/catIPlocal)
  256. MEU_IP2=$(cat < /etc/catIP)
  257. [[ "$MEU_IP" != "$MEU_IP2" ]] && IP="$MEU_IP2" || IP="$MEU_IP"
  258. } || {
  259. MEU_IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1) && echo $MEU_IP > /etc/catIPlocal
  260. MEU_IP2=$(wget -qO- ipv4.icanhazip.com) && echo $MEU_IP2 > /etc/catIP
  261. [[ "$MEU_IP" != "$MEU_IP2" ]] && IP="$MEU_IP2" || IP="$MEU_IP"
  262. }
  263. }
  264. meu_ip () {
  265. fun_ip
  266. }
  267. #ETHOOL SSH
  268. fun_eth () {
  269. eth=$(ifconfig | grep -v inet6 | grep -v lo | grep -v 127.0.0.1 | grep "encap:Ethernet" | awk '{print $1}')
  270. [[ $eth != "" ]] && {
  271. echo -e "$barra"
  272. echo -e "${cor[3]} Aplicar Sistema Para Mejorar Sistema SSH?"
  273. echo -e "${cor[3]} Opcion Para Usuarios Avanzados"
  274. echo -e "$barra"
  275. read -p " [S/N]: " -e -i n sshsn
  276. [[ "$sshsn" = @(s|S|y|Y) ]] && {
  277. echo -e "${cor[1]} Correcion de problemas de paquetes en SSH..."
  278. echo -e " Quota en Entrada"
  279. echo -ne "[ 1 - 999999999 ]: "; read rx
  280. [[ "$rx" = "" ]] && rx="999999999"
  281. echo -e " Quota en Salida"
  282. echo -ne "[ 1 - 999999999 ]: "; read tx
  283. [[ "$tx" = "" ]] && tx="999999999"
  284. apt-get install ethtool -y > /dev/null 2>&1
  285. ethtool -G $eth rx $rx tx $tx > /dev/null 2>&1
  286. }
  287. echo -e "$barra"
  288. }
  289. }
  290. #FUN_BAR
  291. fun_bar () {
  292. comando="$1"
  293. _=$( $comando > /dev/null 2>&1 ) & > /dev/null
  294. pid=$!
  295. while [[ -d /proc/$pid ]]; do
  296. echo -ne " \033[1;33m["
  297. for((i=0; i<20; i++)); do
  298. echo -ne "\033[1;31m##"
  299. sleep 0.5
  300. done
  301. echo -ne "\033[1;33m]"
  302. sleep 1s
  303. echo tput cuu1 tput dl1
  304. done
  305. echo -e " \033[1;33m[\033[1;31m########################################\033[1;33m] - \033[1;32m100%\033[0m"
  306. sleep 1s
  307. }
  308. squid_cache () {
  309. msg -bar
  310. echo -e "${cor[5]} ${txt[157]}\n ${txt[158]}\n ${txt[159]}\n ${txt[160]}\n ${txt[161]}"
  311. msg -bar
  312. sleep 0.5s
  313. if [ -e /etc/squid/squid.conf ]; then
  314. squid_var="/etc/squid/squid.conf"
  315. elif [ -e /etc/squid3/squid.conf ]; then
  316. squid_var="/etc/squid3/squid.conf"
  317. else
  318. echo -e "${cor[5]} ${txt[162]}"
  319. return 1
  320. fi
  321. teste_cache="#CACHE DO SQUID"
  322. if [[ `grep -c "^$teste_cache" $squid_var` -gt 0 ]]; then
  323. [[ -e ${squid_var}.bakk ]] && {
  324. echo -e "${cor[5]} ${txt[167]}\n ${txt[168]}"
  325. mv -f ${squid_var}.bakk $squid_var
  326. echo -e "${cor[5]} ${txt[165]}"
  327. msg -bar
  328. service squid restart > /dev/null 2>&1
  329. service squid3 restart > /dev/null 2>&1
  330. return 0
  331. }
  332. fi
  333. echo -e "${cor[5]} ${txt[163]}\n ${cor[5]} ${txt[164]}\n ${txt[166]}"
  334. msg -bar
  335. _tmp="#CACHE DO SQUID\ncache_mem 200 MB\nmaximum_object_size_in_memory 32 KB\nmaximum_object_size 1024 MB\nminimum_object_size 0 KB\ncache_swap_low 90\ncache_swap_high 95"
  336. [[ "$squid_var" = "/etc/squid/squid.conf" ]] && _tmp+="\ncache_dir ufs /var/spool/squid 100 16 256\naccess_log /var/log/squid/access.log squid" || _tmp+="\ncache_dir ufs /var/spool/squid3 100 16 256\naccess_log /var/log/squid3/access.log squid"
  337. while read s_squid; do
  338. [[ "$s_squid" != "cache deny all" ]] && _tmp+="\n${s_squid}"
  339. done < $squid_var
  340. cp ${squid_var} ${squid_var}.bakk
  341. echo -e "${_tmp}" > $squid_var
  342. echo -e "${cor[5]} ${txt[165]}\n ${txt[168]}"
  343. msg -bar
  344. service squid restart > /dev/null 2>&1
  345. service squid3 restart > /dev/null 2>&1
  346. }
  347. add_host_squid () {
  348. payload="/etc/payloads"
  349. if [ ! -f "$payload" ]; then
  350. echo -e "${cor[5]} $payload No econtrado"
  351. echo -e "${cor[5]} Squid no instalado"
  352. return
  353. fi
  354. msg -bar #echo -e "${cor[1]} ====================================================== ${cor[0]}"
  355. echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m${cor[3]} Añadir Host a Squid"
  356. echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m${cor[3]} Quitar el host de Squid"
  357. msg -bar #echo -e "${cor[1]} ====================================================== ${cor[0]}"
  358. read -p " | 1 - 2 |: " var_pay
  359. number_var $var_pay
  360. if [ "$var_number" = "" ]; then
  361. echo -e "\033[1;31m Opcion Invalida"
  362. return
  363. else
  364. var_payload="$var_number"
  365. fi
  366. if [ "$var_payload" -gt "2" ]; then
  367. echo -e "\033[1;31m Opcion Invalida"
  368. return
  369. fi
  370. if [ "$var_payload" = "1" ]; then
  371. echo -e "${cor[4]} Añadir Host a Squid"
  372. echo -e "${cor[5]} Dominios actuales en el archivo $payload:"
  373. msg -bar
  374. cat $payload | awk -F "/" '{print $1,$2,$3,$4}'
  375. msg -bar
  376. echo "Escriba el Host-Squid que desea agregar "
  377. read -p "Iniciando con un ., ejemplo: .whatsapp.net: " hos
  378. if [[ $hos != \.* ]]; then
  379. echo -e "${cor[5]} Iniciando con un ., ejemplo: .whatsapp.net: "
  380. return
  381. fi
  382. host="$hos/"
  383. if [[ -z $host ]]; then
  384. echo -e "${cor[5]} ¡Esta vacío, no ha escrito nada!"
  385. return
  386. fi
  387. if [[ `grep -c "^$host" $payload` -eq 1 ]]; then
  388. echo -e "${cor[5]} El dominio ya existe en el archivo"
  389. return
  390. fi
  391. echo "$host" >> $payload && grep -v "^$" $payload > /tmp/a && mv /tmp/a $payload
  392. echo -e "${cor[5]} ¡Éxito, Archivo Actualizado!"
  393. msg -bar #echo -e "${cor[1]} ====================================================== ${cor[0]}"
  394. cat $payload | awk -F "/" '{print $1,$2,$3,$4}'
  395. msg -bar #echo -e "${cor[1]} ====================================================== ${cor[0]}"
  396. if [ ! -f "/etc/init.d/squid" ]; then
  397. service squid3 reload
  398. service squid3 restart
  399. else
  400. /etc/init.d/squid reload
  401. service squid restart
  402. fi
  403. return
  404. fi
  405. if [ "$var_payload" = "2" ]; then
  406. echo -e "${cor[4]} ${txt[216]}"
  407. echo -e "${cor[5]} ${txt[218]} $payload:"
  408. msg -bar #echo -e "${cor[1]} ====================================================== ${cor[0]}"
  409. cat $payload | awk -F "/" '{print $1,$2,$3,$4}'
  410. msg -bar #echo -e "${cor[1]} ====================================================== ${cor[0]}"
  411. read -p " ${txt[224]} ${txt[220]}: " hos
  412. if [[ $hos != \.* ]]; then
  413. echo -e "${cor[5]} ${txt[220]}"
  414. return
  415. fi
  416. host="$hos/"
  417. if [[ -z $host ]]; then
  418. echo -e "${cor[5]} ${txt[221]}"
  419. return
  420. fi
  421. if [[ `grep -c "^$host" $payload` -ne 1 ]]; then
  422. echo -e "${cor[5]} ${txt[225]}"
  423. return
  424. fi
  425. grep -v "^$host" $payload > /tmp/a && mv /tmp/a $payload
  426. echo -e "${cor[5]} ${txt[223]}"
  427. msg -bar #echo -e "${cor[1]} ====================================================== ${cor[0]}"
  428. cat $payload | awk -F "/" '{print $1,$2,$3,$4}'
  429. msg -bar #echo -e "${cor[1]} ====================================================== ${cor[0]}"
  430. if [ ! -f "/etc/init.d/squid" ]; then
  431. service squid3 reload
  432. service squid3 restart
  433. else
  434. /etc/init.d/squid reload
  435. service squid restart
  436. fi
  437. return
  438. fi
  439. }
  440. #INSTALADOR SQUID
  441. fun_squid () {
  442. if [[ -e /etc/squid/squid.conf ]]; then
  443. var_squid="/etc/squid/squid.conf"
  444. elif [[ -e /etc/squid3/squid.conf ]]; then
  445. var_squid="/etc/squid3/squid.conf"
  446. fi
  447. [[ -e $var_squid ]] && {
  448. echo -e " MENU DE FUNCION SQUID "
  449. msg -bar
  450. echo -e " \033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m ➮ ${cor[3]} SQUID CACHE $_cachesquid"
  451. echo -e " \033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m ➮ ${cor[3]} AGREGAR / REMOVER HOST-SQUID"
  452. echo -e " \033[0;35m [\033[0;36m3\033[0;35m]\033[0;31m ➮ ${cor[3]} DESINSTALAR SQUID"
  453. msg -bar
  454. echo -e " \033[0;35m [\033[0;36m0\033[0;35m]\033[0;31m ➮ $(msg -bra "\033[1;41m[ REGRESAR ]\e[0m")"
  455. msg -bar
  456. selection=$(selection_fun 3)
  457. case ${selection} in
  458. 0)
  459. return 0
  460. ;;
  461. 1)
  462. squid_cache
  463. return 0
  464. ;;
  465. 2)
  466. add_host_squid
  467. return 0
  468. ;;
  469. 3)
  470. msg -bar
  471. echo -e "\033[1;32m REMOVIENDO SQUID\n$barra"
  472. fun_bar "apt-get purge squid -y"
  473. fun_bar "apt-get purge squid3 -y"
  474. service squid stop > /dev/null 2>&1
  475. service squid3 stop > /dev/null 2>&1
  476. echo -e "$barra\n\033[1;32m Procedimento Concluido\n$barra"
  477. [[ -e $var_squid ]] && rm $var_squid
  478. return 0
  479. ;;
  480. esac
  481. }
  482. #Reiniciando
  483. service squid3 restart > /dev/null 2>&1
  484. service squid restart > /dev/null 2>&1
  485. #Instalar
  486. echo -e "$barra\n\033[1;32m INSTALADOR SQUID ChumoGH-Script\n$barra"
  487. fun_ip
  488. echo -ne " Confirme seu ip"; read -p ": " -e -i $IP ip
  489. echo -e "$barra\n Ahora Escoja su Puerto que Desea en Squid"
  490. echo -e " Escoja su Puerto, Ejemplo: 80 8080 3128"
  491. echo -ne " Digite sus Puertas: "; read portasx
  492. echo -e "$barra"
  493. totalporta=($portasx)
  494. unset PORT
  495. for((i=0; i<${#totalporta[@]}; i++)); do
  496. [[ $(mportas|grep "${totalporta[$i]}") = "" ]] && {
  497. echo -e "\033[1;33m Puertos Escojidos :\033[1;32m ${totalporta[$i]} OK"
  498. PORT+="${totalporta[$i]}\n"
  499. [[ -f "/usr/sbin/ufw" ]] && ufw allow ${totalporta[$i]}/tcp 1> /dev/null 2> /dev/null
  500. } || {
  501. echo -e "\033[1;33m Puertos Escojidos :\033[1;31m ${totalporta[$i]} FAIL"
  502. }
  503. done
  504. [[ "$(echo -e $PORT)" = "" ]] && {
  505. echo -e "\033[1;31m No se ha elegido ningún puerto válido\033[0m"
  506. return 1
  507. }
  508. echo -e "$barra"
  509. echo -e " INSTALANDO SQUID"
  510. echo -e "$barra"
  511. fun_bar "apt-get install squid3 -y"
  512. echo -e "$barra"
  513. echo -e " INICIANDO CONFIGURACION SQUID"
  514. echo -e "$barra"
  515. echo -e "" > /etc/payloads
  516. #A�adir Host Squid
  517. payload="/etc/payloads"
  518. echo -e "" > /etc/payloads
  519. echo -e " Escriba el Host-Squid que desea agregar"
  520. echo -e " Iniciando con un ., ejemplo: .facebook.net"
  521. read -p " Agregar Host " hos
  522. if [[ $hos != \.* ]]; then
  523. echo -e "$barra"
  524. echo -e "\033[1;31m [!] Host-Squid debe iniciar con un "."\033[0m"
  525. echo -e "\033[1;31m Asegurese de agregarlo despues corretamente!\033[0m"
  526. fi
  527. host="$hos/"
  528. if [[ -z $host ]]; then
  529. echo -e "$barra"
  530. echo -e "\033[1;31m [!] Host-Squid no agregado"
  531. echo -e "\033[1;31m Asegurese de agregarlo despues!\033[0m"
  532. fi
  533. echo "$host" >> $payload && grep -v "^$" $payload > /tmp/a && mv /tmp/a $payload
  534. echo -e "$barra\n\033[1;32m Ahora escoja una Conf Para Su Proxy\n$barra"
  535. echo -e " |1| Comum"
  536. echo -e " |2| Customizado -\033[1;31m Usuario Deve Ajustar\033[1;37m\n$barra"
  537. read -p " [1/2]: " -e -i 1 proxy_opt
  538. unset var_squid
  539. if [[ -d /etc/squid ]]; then
  540. var_squid="/etc/squid/squid.conf"
  541. elif [[ -d /etc/squid3 ]]; then
  542. var_squid="/etc/squid3/squid.conf"
  543. fi
  544. if [[ "$proxy_opt" = @(02|2) ]]; then
  545. echo -e "#ConfiguracaoSquiD
  546. acl url1 dstdomain -i $ip
  547. acl url2 dstdomain -i 127.0.0.1
  548. acl url3 url_regex -i '/etc/payloads'
  549. acl url4 dstdomain -i localhost
  550. acl accept dstdomain -i GET
  551. acl accept dstdomain -i POST
  552. acl accept dstdomain -i OPTIONS
  553. acl accept dstdomain -i CONNECT
  554. acl accept dstdomain -i PUT
  555. acl HEAD dstdomain -i HEAD
  556. acl accept dstdomain -i TRACE
  557. acl accept dstdomain -i OPTIONS
  558. acl accept dstdomain -i PATCH
  559. acl accept dstdomain -i PROPATCH
  560. acl accept dstdomain -i DELETE
  561. acl accept dstdomain -i REQUEST
  562. acl accept dstdomain -i METHOD
  563. acl accept dstdomain -i NETDATA
  564. acl accept dstdomain -i MOVE
  565. acl all src 0.0.0.0/0
  566. http_access allow url1
  567. http_access allow url2
  568. http_access allow url3
  569. http_access allow url4
  570. http_access allow accept
  571. http_access allow HEAD
  572. http_access deny all
  573. # Request Headers Forcing
  574. request_header_access Allow allow all
  575. request_header_access Authorization allow all
  576. request_header_access WWW-Authenticate allow all
  577. request_header_access Proxy-Authorization allow all
  578. request_header_access Proxy-Authenticate allow all
  579. request_header_access Cache-Control allow all
  580. request_header_access Content-Encoding allow all
  581. request_header_access Content-Length allow all
  582. request_header_access Content-Type allow all
  583. request_header_access Date allow all
  584. request_header_access Expires allow all
  585. request_header_access Host allow all
  586. request_header_access If-Modified-Since allow all
  587. request_header_access Last-Modified allow all
  588. request_header_access Location allow all
  589. request_header_access Pragma allow all
  590. request_header_access Accept allow all
  591. request_header_access Accept-Charset allow all
  592. request_header_access Accept-Encoding allow all
  593. request_header_access Accept-Language allow all
  594. request_header_access Content-Language allow all
  595. request_header_access Mime-Version allow all
  596. request_header_access Retry-After allow all
  597. request_header_access Title allow all
  598. request_header_access Connection allow all
  599. request_header_access Proxy-Connection allow all
  600. request_header_access User-Agent allow all
  601. request_header_access Cookie allow all
  602. request_header_access All deny all
  603. # Response Headers Spoofing
  604. reply_header_access Via deny all
  605. reply_header_access X-Cache deny all
  606. reply_header_access X-Cache-Lookup deny all
  607. #portas" > $var_squid
  608. for pts in $(echo -e $PORT); do
  609. echo -e "http_port $pts" >> $var_squid
  610. done
  611. echo -e "
  612. #nome
  613. visible_hostname ChumoGH-ADM
  614. via off
  615. forwarded_for off
  616. pipeline_prefetch off" >> $var_squid
  617. else
  618. echo -e "#ConfiguracaoSquiD
  619. acl url1 dstdomain -i $ip
  620. acl url2 dstdomain -i 127.0.0.1
  621. acl url3 url_regex -i '/etc/payloads'
  622. acl url4 dstdomain -i localhost
  623. acl all src 0.0.0.0/0
  624. http_access allow url1
  625. http_access allow url2
  626. http_access allow url3
  627. http_access allow url4
  628. http_access deny all
  629. #portas" > $var_squid
  630. for pts in $(echo -e $PORT); do
  631. echo -e "http_port $pts" >> $var_squid
  632. done
  633. echo -e "
  634. #nome
  635. visible_hostname ChumoGH-ADM
  636. via off
  637. forwarded_for off
  638. pipeline_prefetch off" >> $var_squid
  639. fi
  640. fun_eth
  641. echo -ne "$barra\n \033[1;31m [ ! ] \033[1;33m REINICIANDO SERVICIOS"
  642. squid3 -k reconfigure > /dev/null 2>&1
  643. squid -k reconfigure > /dev/null 2>&1
  644. service ssh restart > /dev/null 2>&1
  645. service squid3 restart > /dev/null 2>&1
  646. service squid restart > /dev/null 2>&1
  647. echo -e " \033[1;32m[OK]"
  648. echo -e "$barra\n ${cor[3]}$(source trans -b pt:${id} "SQUID CONFIGURADO EXITOSAMENTE")\n$barra"
  649. #UFW
  650. for ufww in $(mportas|awk '{print $2}'); do
  651. [[ -f "/usr/sbin/ufw" ]] && ufw allow $ufww 1> /dev/null 2> /dev/null
  652. done
  653. }
  654. #INSTALAR DROPBEAR
  655. addnewd (){
  656. unset yesno
  657. unset dnew
  658. echo -e "\033[1;32mDeseas Adicionar alguno mas?? "
  659. while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
  660. read -p "[S/N]: " yesno
  661. foc=$(($foc + 1))
  662. tput cuu1 && tput dl1
  663. done
  664. if [[ ${yesno} = @(s|S|y|Y) ]]; then
  665. echo -e "\033[1;34mIngresa Nuevo Puerto a Escuchar:"
  666. read -p ": " dnew
  667. if lsof -Pi :$dnew -sTCP:LISTEN -t >/dev/null ; then
  668. echo -e "\033[1;37mPuerto Seleccionado Ocupado | Reintenta"
  669. else
  670. dvj=$(cat < /etc/default/dadd)
  671. sed -i "s/$dvj/$dnew -p $dvj/g" /etc/default/dropbear
  672. echo "Reiniciando Dropbear para ejecutar cambios"
  673. echo "Numero de Intento : $foc"
  674. service dropbear restart
  675. [[ -f "/usr/sbin/ufw" ]] && ufw allow $dnew/tcp 1> /dev/null 2> /dev/null
  676. dropbearports=`netstat -tunlp | grep dropbear | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/dropbear.txt && echo | cat /tmp/dropbear.txt | tr '\n' ' ' > /etc/adm-lite/dropbearports.txt && cat /etc/adm-lite/dropbearports.txt`;
  677. echo "Puertos que Corren en DROPBEAR " $dropbearports
  678. fi
  679. #echo -e "\033[1;32mDeseas Adicionar alguno mas?? "
  680. echo "EXITO AL AÑADIR PUERTO"
  681. sleep 0.5s
  682. addnewd
  683. else
  684. unset foc
  685. cd /etc/adm-lite && ./menu_inst
  686. fi
  687. }
  688. fun_dropbear () {
  689. dropbearports=`netstat -tunlp | grep dropbear | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/dropbear.txt && echo | cat /tmp/dropbear.txt | tr '\n' ' ' > /etc/adm-lite/dropbearports.txt && cat /etc/adm-lite/dropbearports.txt`;
  690. # INICIO STUNNEL ACTIVO
  691. figlet " DROPBEAR " | boxes -d stone -p a2v1
  692. echo -e "${cor[1]}=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠"
  693. echo -e "${cor[2]}DROPBEAR ACTIVO en Puertos: $dropbearports"
  694. msg -bar
  695. echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m INSTALL/REINSTALL DROPBEAR \033[0;32m(#OFICIAL)"
  696. echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m CERRAR PUERTO (S) \033[0;32m(#OFICIAL)"
  697. [[ -e /etc/default/dropbear ]] && echo -e " \033[0;35m[\033[0;36m3\033[0;35m] \033[0;34m<\033[0;31m Adicionar Port DROPBEAR \033[0;33m(#EXPERIMENTAL)" && lim=3 || lim=2
  698. msg -bar
  699. selection=$(selection_fun $lim)
  700. case ${selection} in
  701. 1)
  702. clear
  703. ########LLAMAMOS FUNCION DROPBEAR#######
  704. service dropbear stop 1> /dev/null 2> /dev/null
  705. service sshd restart > /dev/null 2>&1
  706. service ssh restart > /dev/null 2>&1
  707. installdropbear
  708. echo -e "$barra\n${cor[3]} Dropbear Configurado Exitosamente\n$barra"
  709. ;;
  710. 2)
  711. [[ -e /etc/default/dropbear ]] && {
  712. echo -e "$barra\n\033[1;32m REMOVIENDO DROPBEAR\n$barra"
  713. service dropbear stop 1> /dev/null 2> /dev/null
  714. service sshd restart > /dev/null 2>&1
  715. service ssh restart > /dev/null 2>&1
  716. fun_bar "apt-get remove dropbear -y"
  717. killall dropbear 1> /dev/null 2> /dev/null
  718. apt-get -y purge dropbear 1> /dev/null 2> /dev/null
  719. apt-get -y remove dropbear 1> /dev/null 2> /dev/null
  720. #|[[ -e /bin/ejecutar/sshd_config ]] && mv /bin/ejecutar/sshd_config /etc/ssh/sshd_config
  721. echo -e "$barra\n\033[1;32m Dropbear Removido\n$barra"
  722. [[ -e /etc/default/dropbear ]] && rm /etc/default/dropbear
  723. user -k $dpa/tcp > /dev/null 2>&1
  724. return
  725. }
  726. ;;
  727. 3)
  728. [[ -e /etc/default/dropbear ]] && {
  729. dropbearports=`netstat -tunlp | grep dropbear | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/dropbear.txt && echo | cat /tmp/dropbear.txt | tr '\n' ' ' > /etc/adm-lite/dropbearports.txt && cat /etc/adm-lite/dropbearports.txt`;
  730. echo "Puertos que Corren en DROPBEAR " $dropbearports
  731. cp /etc/default/dropbear /etc/default/dropbear.or
  732. echo "Ingresa Nuevo Puerto Escuchar:"
  733. read -p ": " portdrop
  734. dnew="$portdrop"
  735. fun_bar
  736. if lsof -Pi :$portdrop -sTCP:LISTEN -t >/dev/null ; then
  737. echo "Puerto Seleccionado Ocupado | Reintenta"
  738. else
  739. #sed -i "2d" /etc/default/dropbear
  740. dvj=$(cat < /etc/default/dadd)
  741. sed -i "s/$dvj/$dnew -p $dvj/g" /etc/default/dropbear
  742. #sed -i '2i DROPBEAR_EXTRA_ARGS="-p '"$portdrop"'"' /etc/default/dropbear
  743. echo $portdrop > /etc/default/dadd
  744. echo "Reiniciando Dropbear para ejecutar cambios"
  745. fun_bar
  746. service dropbear restart
  747. dropbearports=`netstat -tunlp | grep dropbear | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/dropbear.txt && echo | cat /tmp/dropbear.txt | tr '\n' ' ' > /etc/adm-lite/dropbearports.txt && cat /etc/adm-lite/dropbearports.txt`;
  748. echo "Puertos que Corren en DROPBEAR " $dropbearports
  749. foc=1
  750. addnewd
  751. fi
  752. return 0
  753. }
  754. echo "Desgraciado, No HAS INSTALADO EL SERVICIO AUN ;C"
  755. return 0
  756. ;;
  757. *)
  758. return 0
  759. ;;
  760. esac
  761. }
  762. fun_shadowsocks () {
  763. wget -q https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/shadowsocks.sh
  764. figlet ChumoGH
  765. bash shadowsocks.sh
  766. rm shadowsocks.sh
  767. }
  768. instala_clash () {
  769. while :
  770. do
  771. clear
  772. [[ -e /root/name ]] && figlet -p -f smslant < /root/name | lolcat || echo -e "\033[7;49;35m =====>>►► 🐲 New ChumoGH💥VPS 🐲 ◄◄<<===== \033[0m"
  773. echo -e "\033[1;37m 【 ★ Reseller :$(cat < /etc/adm-lite/menu_credito) - ADM 2021 ★ 】\033[0m"
  774. echo -e "[\033[1;31m-\033[1;33m]\033[1;31m #######################################\033[1;33m"
  775. echo -e "\033[1;37mSeleccione una opcion : Para Salir Ctrl + C\033[1;33m"
  776. echo -e "${cor[3]} Esta herramienta Permite escojer el menu Clash Nuevo y Antiguo"
  777. echo -e "${cor[3]} Si manejas los Menu de Trojan Y v2ray, Usa 1"
  778. echo -e $barra
  779. echo -e " \033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m ➮ Menu Clash - Menu New Reforma Ususarios Creados"
  780. echo -e " \033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m ➮ Menu Clash - Menu Antiguo (Ingreso Manual)"
  781. msg -bar
  782. echo -e " \033[0;35m [\033[0;36m0\033[0;35m]\033[0;31m ➮ $(msg -bra "\033[1;41m[ REGRESAR ]\e[0m")"
  783. echo -e $barra
  784. selection=$(selection_fun 2)
  785. case ${selection} in
  786. 1)
  787. source <(curl -sSL https://www.dropbox.com/s/uz3s8keszpdwx0y/clash-beta.sh)
  788. read -p " Presiona Enter Para Continuar "
  789. return 0;;
  790. 2)
  791. wget -q -O /bin/ejecutar/clash.sh https://www.dropbox.com/s/tyuz3ms5zv73pyy/clash.sh
  792. chmod +x /bin/ejecutar/clash.sh
  793. bash /bin/ejecutar/clash.sh
  794. [[ -e /bin/ejecutar/clash.sh ]] && rm /bin/ejecutar/clash.sh
  795. return 0
  796. ;;
  797. 0) break
  798. return 0
  799. ;;
  800. *) echo -e "\n selecione una opcion del 0 al 2" && sleep 1;;
  801. esac
  802. done
  803. #source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/Clash/clash.sh)
  804. #bash -c "$(curl -fsSL https://raw.githubusercontent.com/JeannieStudio/all_install/master/SixForOne_install.sh)"
  805. }
  806. web_min () {
  807. [[ -e /etc/webmin/miniserv.conf ]] && {
  808. echo -e "$barra\n\033[1;32m REMOVENDO WEBMIN\n$barra"
  809. fun_bar "apt-get remove webmin -y"
  810. echo -e "$barra\n\033[1;32m Webmin Removido\n$barra"
  811. [[ -e /etc/webmin/miniserv.conf ]] && rm /etc/webmin/miniserv.conf
  812. return 0
  813. }
  814. echo -e " \033[1;36mInstalling Webmin, aguarde:"
  815. fun_bar "wget https://sourceforge.net/projects/webadmin/files/webmin/1.881/webmin_1.881_all.deb"
  816. fun_bar "dpkg --install webmin_1.881_all.deb"
  817. fun_bar "apt-get -y -f install"
  818. rm /root/webmin_1.881_all.deb > /dev/null 2>&1
  819. service webmin restart > /dev/null 2>&1
  820. echo -e "${barra}\n Accede via web usando el enlace: https;//$(wget -qO- ifconfig.me):10000\n${barra}"
  821. echo -e " Procedimento Concluido\n${barra}"
  822. return 0
  823. }
  824. iniciarsocks () {
  825. source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/sockspy.sh)
  826. }
  827. ssrmenu()
  828. {
  829. source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/back/ssrrmu.sh)
  830. #source <(curl -sL https://github.com/VPS-MX/VPS-MX-8.0/raw/master/SCRIPT/C-SSR.sh)
  831. #sed '/gnula.sh/ d' /etc/crontab > /bin/ejecutar/crontab
  832. }
  833. trojan()
  834. {
  835. [[ $(mportas|grep trojan|head -1) ]] && {
  836. # INICIO STUNNEL ACTIVO
  837. msg -bar
  838. echo -e "${cor[2]} Trojan-Go ACTIVO en Puertos: $trojanports "
  839. msg -bar
  840. echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m CONTROL PANNEL \033[0;32m(#OFICIAL by @ChumoGH)"
  841. echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m ELIMINAR TROJAN-GO (s)"
  842. msg -bar
  843. selection=$(selection_fun 2)
  844. case ${selection} in
  845. 1)
  846. source <(curl -sSL https://www.dropbox.com/s/b5mn5a9sjtqm8v2/mod-trojan.sh);;
  847. 2)
  848. source <(curl -sL https://git.io/trojan-install) --remove
  849. killall trojan &> /dev/null 2>&1
  850. [[ -e /usr/local/etc/trojan/config.json ]] && rm -f /usr/local/etc/trojan /usr/local/etc/trojan/config.json
  851. [[ -e /bin/troj.sh ]] && rm -f /bin/troj.sh
  852. clear
  853. echo -e "\033[1;37m Desinstalacion Completa \033[0m"
  854. echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
  855. read -p " "
  856. ;;
  857. 0)
  858. return 0
  859. ;;
  860. esac
  861. #FIN VERIFICA STUNNEL4 ACTIVO
  862. } || {
  863. wget -q https://www.dropbox.com/s/vogt0tyaqg0gee1/trojango.sh; chmod +x trojango.sh; ./trojango.sh
  864. rm -f trojango.sh
  865. return 0
  866. }
  867. }
  868. ###
  869. #[[ -e /usr/local/etc/trojan/config.json ]] && {
  870. #source <(curl -sL https://git.io/trojan-install) --remove
  871. #echo -e "\033[1;37m Desinstalacion Completa \033[0m"
  872. #echo -e "\033[1;31m PRESIONE ENTER\033[0m"
  873. #read -p " "
  874. #} || {
  875. #source <(curl -sL https://git.io/trojan-install)
  876. #}
  877. #source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/Clash/trojan)
  878. #source <(curl -sL https://github.com/VPS-MX/VPS-MX-8.0/raw/master/SCRIPT/C-SSR.sh)
  879. #sed '/gnula.sh/ d' /etc/crontab > /bin/ejecutar/crontab
  880. ##
  881. ssl_stunel () {
  882. unset lang
  883. sslkk
  884. [[ $(mportas|grep stunnel4|head -1) ]] && {
  885. # INICIO STUNNEL ACTIVO
  886. echo -e "${cor[2]}STUNNEL ACTIVO en Puertos: $sslports "
  887. msg -bar
  888. echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m ADICIONAR + PUERTO SSL \033[0;32m(#OFICIAL)"
  889. echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;31m SSL Cert - STRACK ZEROSSL \033[0;33m(#EXPERIMENTAL)"
  890. echo -e " \033[0;35m[\033[0;36m3\033[0;35m] \033[0;34m<\033[0;33m CERRAR PUERTO(s) SSL"
  891. msg -bar
  892. selection=$(selection_fun 3)
  893. case ${selection} in
  894. 0)
  895. return 0
  896. ;;
  897. 1)
  898. #clear
  899. ###
  900. #head -n -2 /etc/adm-lite/cabecalho > headuser.sh && chmod 777 headuser.sh && source headuser.sh && rm headuser.sh
  901. source cabecalho "ports_"
  902. #echo -e "Escriba un nombre para el Redireccionador SSL"
  903. #read -p ": " nombressl
  904. echo -e "\033[1;33m Selecione un Puerto De Redirecionamento Interna (Default 22) "
  905. msg -bar
  906. while true; do
  907. echo -ne "\033[1;37m"
  908. echo " Ingresa el Puerto Local de tu VPS (Default 22) "
  909. read -p " Local-Port: " -e -i $pt portserv
  910. if [[ ! -z $portserv ]]; then
  911. if lsof -Pi :$portserv -sTCP:LISTEN -t >/dev/null ; then
  912. break
  913. else
  914. portserv="$pt"
  915. break
  916. fi
  917. fi
  918. done
  919. while true; do
  920. echo -e " Ingresa el Nuevo Puerto SSl/TLS \n A Usar en tu VPS (Recomendado 110 442 444)"
  921. read -p " Listen-SSL: " SSLPORT
  922. tput cuu1 >&2 && tput dl1 >&2
  923. PortSSL=`netstat -tlpn | awk -F '[: ]+' '$1=="tcp"{print $5}' | grep -w $SSLPORT`
  924. [[ -n "$PortSSL" ]] || break
  925. prococup=`netstat -tlpn | awk -F '[: ]+' '$5=="$SSLPORT"{print $9}'`
  926. echo -e "\033[1;33m EL PUERTO SE ENCUENTRA OCUPADO POR $prococup"
  927. echo -e "$barra"
  928. return
  929. done
  930. echo "[stunnel] " >> /etc/stunnel/stunnel.conf
  931. echo "cert = /etc/stunnel/stunnel.pem " >> /etc/stunnel/stunnel.conf
  932. echo "accept = $SSLPORT " >> /etc/stunnel/stunnel.conf
  933. echo "connect = 127.0.0.1:$portserv" >> /etc/stunnel/stunnel.conf
  934. echo -e "\033[1;34m ##############################"
  935. echo -e "\033[1;37m R E I N I C I A N D O - STUNNEL4 - SSL"
  936. echo -e "\033[1;34m ##############################"
  937. [[ -f "/usr/sbin/ufw" ]] && ufw allow $portserv/tcp
  938. service ssh restart 1>/dev/null 2 /dev/null
  939. service stunnel4 start 1>/dev/null 2 /dev/null
  940. service stunnel4 restart 1>/dev/null 2 /dev/null
  941. sslkk
  942. echo -e "${cor[2]}STUNNEL ACTIVO en Puertos : ${cor[2]}$sslports "
  943. #echo "Limpiando sistema y Reiniciando Servicios"
  944. echo 3 > /proc/sys/vm/drop_caches 1> /dev/null 2> /dev/null
  945. sysctl -w vm.drop_caches=3 1> /dev/null 2> /dev/null
  946. swapoff -a && swapon -a 1> /dev/null 2> /dev/null
  947. #echo "Limpieza Finalizada"
  948. unset lang
  949. return 0
  950. ;;
  951. 2)
  952. echo ""
  953. echo -e " Creditos a @ChumoGH "
  954. msg -bar
  955. read -p " Presiona Enter para continuar "
  956. source <(curl -sSL https://www.dropbox.com/s/0s2uamltufhfusl/zerossl.sh)
  957. return 0
  958. ;;
  959. 3)
  960. unset lang
  961. service stunnel4 stop
  962. echo -e "$barra"
  963. echo -e "\033[1;33m Cerrando PUERTO SSL/TLS"
  964. echo -e "$barra"
  965. fun_bar 'apt-get remove stunnel4 -y' 'apt-get purge stunnel4 -y'
  966. echo -e "$barra"
  967. #echo "Limpiando sistema y Reiniciando Servicios"
  968. echo 3 > /proc/sys/vm/drop_caches 1> /dev/null 2> /dev/null
  969. sysctl -w vm.drop_caches=3 1> /dev/null 2> /dev/null
  970. swapoff -a && swapon -a 1> /dev/null 2> /dev/null
  971. #echo "Limpieza Finalizada"
  972. rm -rf /etc/stunnel/* > /dev/null
  973. echo -e "\033[1;33m PUERTO SSL/TLS CERRADO!"
  974. echo -e "$barra"
  975. return 0
  976. ;;
  977. esac
  978. #FIN VERIFICA STUNNEL4 ACTIVO
  979. }
  980. unset lang
  981. figlet " SSL / TLS " | boxes -d stone -p a2v1
  982. msg -bar
  983. echo -e "${cor[2]} Certificado SSL/TLS ( Default: @ChumoGH ) "
  984. msg -bar
  985. echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m➮\033[0;33m Crear Su Certificado SSL \033[0;32m(#OFICIAL)"
  986. echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m➮\033[0;33m Certificado AUTOMATICO \033[0;32m(#OFICIAL)"
  987. echo -e " \033[0;35m[\033[0;36m3\033[0;35m] \033[0;34m➮\033[0;31m Cargar Certificado WEB \033[0;33m(#EXPERIMENTAL)"
  988. echo -e " \033[0;35m[\033[0;36m4\033[0;35m] \033[0;34m➮\033[0;33m Certificado con DOMINIO \033[0;32m(#OFICIAL)"
  989. msg -bar
  990. echo -e " \033[0;35m[\033[0;36m5\033[0;35m] \033[0;34m<\033[0;31m SSL Cert - STRACK ZEROSSL \033[0;33m(#EXPERIMENTAL)"
  991. msg -bar
  992. echo -e " \033[0;35m[\033[0;36m6\033[0;35m] \033[0;34m<\033[0;31m SSL Cert - By @KillShito \033[0;33m(#EXPERIMENTAL)"
  993. msg -bar
  994. selection=$(selection_fun 6)
  995. case ${selection} in
  996. 1)
  997. msg -bar
  998. echo -e " Para Crear su Certificado SSL \n En su Primera instancia coloque Codigo de su PAIS \n Ejemplo : EC "
  999. msg -bar
  1000. echo -e " A continuacion los codigos de Validacion de su Certificado"
  1001. read -p " Presiona Enter para continuar la Instalacion"
  1002. source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/ssl)
  1003. return 0
  1004. ;;
  1005. 2)
  1006. #sshports=`netstat -tunlp | grep sshd | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/ssh.txt && echo | cat /tmp/ssh.txt | tr '\n' ' ' > /etc/adm-lite/sshports.txt && cat /etc/adm-lite/sshports.txt`;
  1007. #sshports=$(cat /etc/adm-lite/sshports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  1008. echo -e "$barra"
  1009. echo -e "\033[1;36m SSL Stunnel"
  1010. echo -e "$barra"
  1011. echo -e "\033[1;33m Selecione un Puerto De Redirecionamento Interna"
  1012. echo -e "\033[1;33m Ingrese su Puerta Servidor Para o SSL/TLS"
  1013. echo -e "$barra"
  1014. while true; do
  1015. echo -ne "\033[1;37m"
  1016. echo " Ingresa el Puerto Local de tu VPS (Default 22) "
  1017. read -p " Local-Port: " -e -i $pt portx
  1018. tput cuu1 >&2 && tput dl1 >&2
  1019. [[ $(mportas | grep $portx) ]] && break
  1020. echo -e "\033[1;33m El puerto seleccionado no existe"
  1021. unset portx
  1022. echo -e "$barra"
  1023. done
  1024. echo -e "$barra"
  1025. DPORT="$(mportas|grep $portx|awk '{print $2}'|head -1)"
  1026. while true; do
  1027. echo -e " Ingresa el Nuevo Puerto SSl/TLS \n A Usar en tu VPS (Recomendado 110 442 444)"
  1028. read -p " Listen-SSL: " SSLPORT
  1029. tput cuu1 >&2 && tput dl1 >&2
  1030. PortSSL=`netstat -tlpn | awk -F '[: ]+' '$1=="tcp"{print $5}' | grep -w $SSLPORT`
  1031. [[ -n "$PortSSL" ]] || break
  1032. prococup=`netstat -tlpn | awk -F '[: ]+' '$5=="$SSLPORT"{print $9}'`
  1033. echo -e "\033[1;33m EL PUERTO SE ENCUENTRA OCUPADO POR $prococup"
  1034. echo -e "$barra"
  1035. return
  1036. done
  1037. echo -e "$barra"
  1038. echo -e "\033[1;33m Instalando SSL/TLS [ $DPORT -> $SSLPORT ] : $(curl -sSL ipinfo.io > info && cat info | grep country | awk '{print $2}' | sed -e 's/[^a-z0-9 -]//ig')"
  1039. echo -e "$barra"
  1040. fun_bar "apt install stunnel4 -y"
  1041. echo -e "cert = /etc/stunnel/stunnel.pem\nclient = no\nsocket = a:SO_REUSEADDR=1\nsocket = l:TCP_NODELAY=1\nsocket = r:TCP_NODELAY=1\n\n[stunnel]\nconnect = 127.0.0.1:${DPORT}\naccept = ${SSLPORT}" > /etc/stunnel/stunnel.conf
  1042. openssl genrsa -out key.pem 2048 > /dev/null 2>&1
  1043. (echo "$(curl -sSL ipinfo.io > info && cat info | grep country | awk '{print $2}' | sed -e 's/[^a-z0-9 -]//ig')" ; echo "" ; echo "$(wget -qO- ifconfig.me):81" ; echo "" ; echo "" ; echo "" ; echo "@ChumoGH")|openssl req -new -x509 -key key.pem -out cert.pem -days 1095 > /dev/null 2>&1
  1044. cat key.pem cert.pem >> /etc/stunnel/stunnel.pem
  1045. sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/stunnel4
  1046. service stunnel4 restart > /dev/null 2>&1
  1047. echo -e "$barra"
  1048. [[ -f "/usr/sbin/ufw" ]] && ufw allow $SSLPORT/tcp 1> /dev/null 2> /dev/null
  1049. service ssh restart 1> /dev/null 2> /dev/null
  1050. echo -e "\033[1;34m ##############################"
  1051. echo -e "\033[1;37m R E I N I C I A N D O - STUNNEL4 - SSL"
  1052. echo -e "\033[1;34m ##############################"
  1053. echo -e "\033[1;33m INSTALACION EXITOSA"
  1054. echo -e "$barra"
  1055. return 0
  1056. ;;
  1057. 3)
  1058. car_cert () {
  1059. [[ -e /etc/stunnel/stunnel.pem ]] && echo -e "Ya Existe un certificado SSL Cargado \n Recuerde Cargar SU Certificado y Key del SSL " | pv -qL 25
  1060. msg -bar
  1061. echo -e "Descarga el fichero URL del Certificado SSL "
  1062. echo -e $barra
  1063. echo -e " \033[4;31mNOTA importante\033[0m"
  1064. echo -e " \033[0;31mPara este Paso debes tener el URL del certificado Online"
  1065. echo -e " Si Aun no lo has hecho, Cancela este paso"
  1066. echo -e " Evitar Errores Futuros"
  1067. echo -e " y causar problemas en futuras instalaciones.\033[0m"
  1068. echo -e $barra
  1069. msg -bar
  1070. echo -e "Ingrese Link del Fichero URL de tu ZIP con los Certificados "
  1071. msg -bar
  1072. read -p " Pega tu Link : " urlm
  1073. wget -O certificados.zip $urlm && echo -e "Descargando Fichero ZIP " || echo "Link de descarga Invalido"
  1074. msg -bar
  1075. echo -ne "\033[1;42m ZIPS Existentes : " && ls | grep zip && echo -e "\033[1;42m"
  1076. msg -bar
  1077. unzip certificados.zip 1> /dev/null 2> /dev/null && echo -e "Descomprimiendo Ficheros descargados" || echo -e "Error al Descomprimir "
  1078. [[ -e private.key ]] && cat private.key > /etc/stunnel/stunnel.pem && echo -e " \033[1;42m Key del Certificado cargada Exitodamente\033[0m" || echo -e " \033[1;41mClaves Invalidas\033[0m"
  1079. [[ -e certificate.crt && -e ca_bundle.crt ]] && cat certificate.crt ca_bundle.crt >> /etc/stunnel/stunnel.pem && echo -e "\033[1;42m CRT del Certificado cargada Exitodamente\033[0m" || echo -e "\033[1;41mClaves Invalidas\033[0m"
  1080. rm -f private.key certificate.crt ca_bundle.crt certificados.zip 1> /dev/null 2> /dev/null && cd $HOME
  1081. }
  1082. echo -e "$barra"
  1083. echo -e "\033[1;36m SSL Stunnel"
  1084. echo -e "$barra"
  1085. echo -e "\033[1;33m Selecione un Puerto De Redirecionamento Interna"
  1086. echo -e "\033[1;33m Ingrese su Puerta Servidor Para o SSL/TLS"
  1087. echo -e "$barra"
  1088. while true; do
  1089. echo -ne "\033[1;37m"
  1090. echo " Ingresa el Puerto Local de tu VPS (Default 22) "
  1091. read -p " Local-Port: " -e -i "22" portx
  1092. [[ $(mportas | grep $portx) ]] && break
  1093. echo -e "\033[1;33m El puerto seleccionado no existe"
  1094. unset portx
  1095. echo -e "$barra"
  1096. return
  1097. done
  1098. echo -e "$barra"
  1099. DPORT="$(mportas|grep $portx|awk '{print $2}'|head -1)"
  1100. echo -e "\033[1;33m Digite el Puerto SSL, que Va a USAR:"
  1101. echo -e "$barra"
  1102. while true; do
  1103. echo -e " Ingresa el Nuevo Puerto SSl/TLS \n A Usar en tu VPS (Recomendado 110 442 444)"
  1104. read -p " Listen-SSL: " SSLPORT
  1105. tput cuu1 >&2 && tput dl1 >&2
  1106. PortSSL=`netstat -tlpn | awk -F '[: ]+' '$1=="tcp"{print $5}' | grep -w $SSLPORT`
  1107. [[ -n "$PortSSL" ]] || break
  1108. prococup=`netstat -tlpn | awk -F '[: ]+' '$5=="$SSLPORT"{print $9}'`
  1109. echo -e "\033[1;33m EL PUERTO SE ENCUENTRA OCUPADO POR $prococup"
  1110. echo -e "$barra"
  1111. return
  1112. done
  1113. echo -e "$barra"
  1114. echo -e "\033[1;33m Instalando SSL/TLS [ $DPORT -> $SSLPORT ] : $(curl -sSL ipinfo.io > info && cat info | grep country | awk '{print $2}' | sed -e 's/[^a-z0-9 -]//ig')"
  1115. echo -e "$barra"
  1116. fun_bar "apt install stunnel4 -y"
  1117. echo -e "cert = /etc/stunnel/stunnel.pem\nclient = no\nsocket = a:SO_REUSEADDR=1\nsocket = l:TCP_NODELAY=1\nsocket = r:TCP_NODELAY=1\n\n[stunnel]\nconnect = 127.0.0.1:${DPORT}\naccept = ${SSLPORT}" > /etc/stunnel/stunnel.conf
  1118. car_cert
  1119. sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/stunnel4
  1120. service stunnel4 restart > /dev/null 2>&1
  1121. [[ -f "/usr/sbin/ufw" ]] && ufw allow $SSLPORT/tcp 1> /dev/null 2> /dev/null
  1122. echo -e "$barra"
  1123. echo -e "\033[1;34m ##############################"
  1124. echo -e "\033[1;37m R E I N I C I A N D O - STUNNEL4 - SSL"
  1125. echo -e "\033[1;34m ##############################"
  1126. echo -e "\033[1;33m INSTALACION EXITOSA"
  1127. echo -e "$barra"
  1128. return 0
  1129. ;;
  1130. 4)
  1131. echo -e "$barra"
  1132. echo -e "\033[1;36m SSL Stunnel"
  1133. echo -e "$barra"
  1134. echo -e "\033[1;33m Selecione un Puerto De Redirecionamento Interna"
  1135. echo -e "\033[1;33m Ingrese su Puerta Servidor Para o SSL/TLS"
  1136. echo -e "$barra"
  1137. while true; do
  1138. echo -ne "\033[1;37m"
  1139. echo " Ingresa el Puerto Local de tu VPS (Default 22) "
  1140. read -p " Local-Port: " -e -i $pt portx
  1141. tput cuu1 >&2 && tput dl1 >&2
  1142. [[ $(mportas | grep $portx) ]] && break
  1143. echo -e "\033[1;33m El puerto seleccionado no existe"
  1144. unset portx
  1145. echo -e "$barra"
  1146. done
  1147. echo -e "$barra"
  1148. DPORT="$(mportas|grep $portx|awk '{print $2}'|head -1)"
  1149. while true; do
  1150. echo -e " Ingresa el Nuevo Puerto SSl/TLS \n A Usar en tu VPS (Recomendado 110 442 444)"
  1151. read -p " Listen-SSL: " SSLPORT
  1152. tput cuu1 >&2 && tput dl1 >&2
  1153. PortSSL=`netstat -tlpn | awk -F '[: ]+' '$1=="tcp"{print $5}' | grep -w $SSLPORT`
  1154. [[ -n "$PortSSL" ]] || break
  1155. prococup=`netstat -tlpn | awk -F '[: ]+' '$5=="$SSLPORT"{print $9}'`
  1156. echo -e "\033[1;33m EL PUERTO SE ENCUENTRA OCUPADO POR $prococup"
  1157. echo -e "$barra"
  1158. return
  1159. done
  1160. echo -e "$barra"
  1161. echo -e "\033[1;33m Instalando SSL/TLS [ $DPORT -> $SSLPORT ] : $(curl -sSL ipinfo.io > info && cat info | grep country | awk '{print $2}' | sed -e 's/[^a-z0-9 -]//ig')"
  1162. echo -e "$barra"
  1163. fun_bar "apt install stunnel4 -y"
  1164. source <(curl -sSL https://www.dropbox.com/s/839d3q8kh72ujr0/certificadossl.sh)
  1165. echo -e "cert = /etc/stunnel/stunnel.pem\nclient = no\nsocket = a:SO_REUSEADDR=1\nsocket = l:TCP_NODELAY=1\nsocket = r:TCP_NODELAY=1\n\n[stunnel]\nconnect = 127.0.0.1:${DPORT}\naccept = ${SSLPORT}" > /etc/stunnel/stunnel.conf
  1166. sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/stunnel4
  1167. [[ -e /data/cert.crt && -e /data/cert.key ]] && cat /data/cert.key /data/cert.crt >> /etc/stunnel/stunnel.pem || {
  1168. echo -e " ERROR AL CREAR CERTIFICADO "
  1169. apt purge stunnel4 -y > /dev/null 2>&1
  1170. [[ -f "/usr/sbin/ufw" ]] && ufw allow $SSLPORT/tcp 1> /dev/null 2> /dev/null
  1171. service ssh restart 1> /dev/null 2> /dev/null
  1172. echo -e "\033[1;34m ##############################"
  1173. echo -e "\033[1;37m R E I N I C I A N D O - STUNNEL4 - SSL"
  1174. echo -e "\033[1;34m ##############################"
  1175. echo -e "\033[1;33m INSTALACION FALLIDA"
  1176. echo -e "$barra"
  1177. return 0
  1178. }
  1179. service stunnel4 restart > /dev/null 2>&1
  1180. echo -e "$barra"
  1181. #echo "Limpiando sistema y Reiniciando Servicios"
  1182. echo 3 > /proc/sys/vm/drop_caches 1> /dev/null 2> /dev/null
  1183. sysctl -w vm.drop_caches=3 1> /dev/null 2> /dev/null
  1184. swapoff -a && swapon -a 1> /dev/null 2> /dev/null
  1185. service ssh restart 1> /dev/null 2> /dev/null
  1186. echo -e "\033[1;34m ##############################"
  1187. echo -e "\033[1;37m R E I N I C I A N D O - STUNNEL4 - SSL"
  1188. echo -e "\033[1;34m ##############################"
  1189. echo -e "\033[1;33m INSTALACION EXITOSA"
  1190. echo -e "$barra"
  1191. return 0
  1192. ;;
  1193. 5)
  1194. #echo -e " ESTE MINI SCRIPT ES FUE DESARROLLADO POR @KillShito "
  1195. echo ""
  1196. echo -e " Creditos a @ChumoGH "
  1197. msg -bar
  1198. read -p " Presiona Enter para continuar "
  1199. source <(curl -sSL https://www.dropbox.com/s/0s2uamltufhfusl/zerossl.sh)
  1200. return 0
  1201. ;;
  1202. 6)
  1203. msg -bar
  1204. echo -e " ESTE MINI SCRIPT ES FUE DESARROLLADO POR @KillShito "
  1205. echo ""
  1206. echo -e " Creditos a @KillShito "
  1207. msg -bar
  1208. read -p " Presiona Enter para continuar "
  1209. source <(curl -sSL https://www.dropbox.com/s/ooe74y69nm89da9/front.sh)
  1210. return 0
  1211. ;;
  1212. *)
  1213. return 0
  1214. ;;
  1215. esac
  1216. }
  1217. painel_upload () {
  1218. echo -e "$barra"
  1219. echo -e "${cor[2]}Desea Instalar Panel De Upload?"
  1220. echo -e "$barra"
  1221. read -p " [ s | n ]: " up_load
  1222. echo -e "$barra"
  1223. [[ "$up_load" = @(s|S|y|Y) ]] && bash /etc/adm-lite/insta_painel || {
  1224. echo -e "${cor[2]}Instalacao Abortada"
  1225. echo -e "$barra"
  1226. }
  1227. }
  1228. psiserver(){
  1229. echo -e "\033[1;33m Se instalará el servidor de Psiphon\033[0m"
  1230. echo -e "\033[1;33m Si ya tenías una instalacion Previa, esta se eliminara\033[0m"
  1231. echo -e "\033[1;33m Debes tener instalado previamente GO Lang\033[0m"
  1232. echo -e "\033[1;33m Continuar?\033[0m"
  1233. while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
  1234. read -p "[S/N]: " yesno
  1235. tput cuu1 && tput dl1
  1236. done
  1237. if [[ ${yesno} = @(s|S|y|Y) ]]; then
  1238. rm -rf /root/psi
  1239. kill $(ps aux | grep 'psiphond' | awk '{print $2}') 1> /dev/null 2> /dev/null
  1240. killall psiphond 1> /dev/null 2> /dev/null
  1241. cd /root
  1242. mkdir psi
  1243. cd psi
  1244. psi=`cat /root/psi.txt`;
  1245. ship=$(wget -qO- ipv4.icanhazip.com)
  1246. curl -o /root/psi/psiphond https://raw.githubusercontent.com/Psiphon-Labs/psiphon-tunnel-core-binaries/master/psiphond/psiphond 1> /dev/null 2> /dev/null
  1247. chmod 777 psiphond
  1248. echo -e "\033[1;33m Escribe el puerto para Psiphon SSH:\033[0m"
  1249. read -p ": " sh
  1250. echo -e "\033[1;33m Escribe el puerto para Psiphon OSSH:\033[0m"
  1251. read -p ": " osh
  1252. echo -e "\033[1;33m Escribe el puerto para Psiphon FRONTED-MEEK:\033[0m"
  1253. read -p ": " fm
  1254. echo -e "\033[1;33m Escribe el puerto para Psiphon UNFRONTED-MEEK:\033[0m"
  1255. read -p ": " umo
  1256. ./psiphond --ipaddress $ship --protocol SSH:$sh --protocol OSSH:$osh --protocol FRONTED-MEEK-OSSH:$fm --protocol UNFRONTED-MEEK-OSSH:$umo generate
  1257. chmod 666 psiphond.config
  1258. chmod 666 psiphond-traffic-rules.config
  1259. chmod 666 psiphond-osl.config
  1260. chmod 666 psiphond-tactics.config
  1261. chmod 666 server-entry.dat
  1262. cat server-entry.dat >> /root/psi.txt
  1263. screen -dmS psiserver ./psiphond run
  1264. cd /root
  1265. echo -e "\033[1;33m LA CONFIGURACION DE TU SERVIDOR ES:\033[0m"
  1266. echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────────────────────────────\033[1;33m"
  1267. echo -e "\033[1;32m $psi \033[0m"
  1268. echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────────────────────────────\033[1;33m"
  1269. echo -e "\033[1;33m PROTOCOLOS HABILITADOS:\033[0m"
  1270. echo -e "\033[1;33m → SSH:\033[1;32m $sh \033[0m"
  1271. echo -e "\033[1;33m → OSSH:\033[1;32m $osh \033[0m"
  1272. echo -e "\033[1;33m → FRONTED-MEEK-OSSH:\033[1;32m $fm \033[0m"
  1273. echo -e "\033[1;33m → UNFRONTED-MEEK-OSSH:\033[1;32m $umo \033[0m"
  1274. echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────────────────────────────\033[1;33m"
  1275. echo -e " "
  1276. echo -e "\033[1;33m DIRECTORIO DE ARCHIVOS:\033[1;32m /root/psi \033[0m"
  1277. fi
  1278. }
  1279. antiddos (){
  1280. if [ -d '/usr/local/ddos' ]; then
  1281. if [ -e '/usr/local/sbin/ddos' ]; then
  1282. rm -f /usr/local/sbin/ddos
  1283. fi
  1284. if [ -d '/usr/local/ddos' ]; then
  1285. rm -rf /usr/local/ddos
  1286. fi
  1287. if [ -e '/etc/cron.d/ddos.cron' ]; then
  1288. rm -f /etc/cron.d/ddos.cron
  1289. fi
  1290. sleep 1s
  1291. echo -e "$barra"
  1292. echo -e "\033[1;31m ANTIDDOS DESINSTALADO CON EXITO\033[1;37m"
  1293. echo -e "$barra"
  1294. return 1
  1295. else
  1296. mkdir /usr/local/ddos
  1297. fi
  1298. wget -q -O /usr/local/ddos/ddos.conf https://raw.githubusercontent.com/AAAAAEXQOSyIpN2JZ0ehUQ/ADM-MANAGER-MOD/master/DDOS/ddos.conf -o /dev/null
  1299. wget -q -O /usr/local/ddos/LICENSE http://www.inetbase.com/scripts/ddos/LICENSE -o /dev/null
  1300. wget -q -O /usr/local/ddos/ignore.ip.list http://www.inetbase.com/scripts/ddos/ignore.ip.list -o /dev/null
  1301. wget -q -O /usr/local/ddos/ddos.sh http://www.inetbase.com/scripts/ddos/ddos.sh -o /dev/null
  1302. chmod 0755 /usr/local/ddos/ddos.sh
  1303. cp -s /usr/local/ddos/ddos.sh /usr/local/sbin/ddos
  1304. /usr/local/ddos/ddos.sh --cron > /dev/null 2>&1
  1305. sleep 2s
  1306. echo -e "$barra"
  1307. echo -e "\033[1;32m ANTIDDOS INSTALADO CON EXITO.\033[1;37m"
  1308. echo -e "$barra"
  1309. }
  1310. v2ui() {
  1311. cd $HOME
  1312. fun_ip(){
  1313. red='\033[0;31m'
  1314. green='\033[0;32m'
  1315. yellow='\033[0;33m'
  1316. plain='\033[0m'
  1317. last_version=$(curl -Ls "https://api.github.com/repos/vaxilu/x-ui/releases/latest" | grep 'V' | sed -E 's/.*"([^"]+)".*/\1/')
  1318. MIP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
  1319. MIP2=$(wget -qO- ipv4.icanhazip.com)
  1320. [[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
  1321. }
  1322. kill -9 $(ps x|grep -v grep|grep "xray-linu"|awk '{print $1}')
  1323. kill -9 $(ps x|grep -v grep|grep "x-ui"|awk '{print $1}')
  1324. bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
  1325. #bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
  1326. fun_ip
  1327. autogen() {
  1328. x-ui start > /dev/null 2>&1
  1329. x-ui enable > /dev/null 2>&1
  1330. [[ ! -d /etc/x-ui ]] && mkdir /etc/x-ui
  1331. [[ -d /etc/x-ui ]] && cd /etc/x-ui
  1332. openssl genrsa -out key.key 2048 > /dev/null 2>&1
  1333. (echo "$(curl -sSL ipinfo.io > info && cat info | grep country | awk '{print $2}' | sed -e 's/[^a-z0-9 -]//ig')"; echo ""; echo "$(wget -qO- ifconfig.me):81"; echo ""; echo ""; echo ""; echo "@ChumoGH")|openssl req -new -x509 -key key.key -out cert.crt -days 1095 > /dev/null 2>&1
  1334. [[ -e /etc/x-ui/key.key ]] && cp /etc/x-ui/key.key /etc/x-ui/cert.key
  1335. [[ -e /etc/x-ui/cert.crt ]] && cp /etc/x-ui/cert.crt /etc/x-ui/cert.crt
  1336. cd $HOME
  1337. fun_bar
  1338. echo -e "CERTIFICADO GENERADO"
  1339. }
  1340. creargen(){
  1341. x-ui start
  1342. x-ui enable
  1343. [[ ! -d /etc/x-ui ]] && mkdir /etc/x-ui > /dev/null 2>&1
  1344. [[ -d /etc/x-ui ]] && cd /etc/x-ui > /dev/null 2>&1
  1345. openssl genrsa 2048 > key.key
  1346. openssl req -new -key key.key -x509 -days 1000 -out cert.crt
  1347. #[[ -e /etc/x-ui/key.key ]] && cp /etc/x-ui/key.key /etc/x-ui/cert.key
  1348. #[[ -e /etc/x-ui/cert.crt ]] && cp /etc/x-ui/cert.crt /etc/x-ui/cert.crt
  1349. fun_bar
  1350. echo -e "CERTIFICADO GENERADO"
  1351. }
  1352. certdom () {
  1353. [[ ! -d /etc/x-ui ]] && mkdir /etc/x-ui
  1354. [[ -d /etc/x-ui ]] && cd /etc/x-ui
  1355. source <(curl -sSL https://www.dropbox.com/s/839d3q8kh72ujr0/certificadossl.sh)
  1356. [[ -e /data/cert.crt && -e /data/cert.key ]] && {
  1357. cat /data/cert.key > /etc/x-ui/cert.key
  1358. cat /data/cert.crt > /etc/x-ui/cert.crt
  1359. echo -e "CERTIFICADO GENERADO"
  1360. } || {
  1361. echo -e " ERROR AL CREAR CERTIFICADO "
  1362. }
  1363. certweb () {
  1364. [[ -e /etc/x-ui/cert.key && -e /etc/x-ui/cert.crt ]] && echo -e "Ya Existe un certificado SSL Cargado \n Recuerde Cargar SU Certificado y Key del SSL " | pv -qL 25
  1365. msg -bar
  1366. echo -e "Descarga el fichero URL del Certificado SSL "
  1367. echo -e $barra
  1368. echo -e " \033[4;31mNOTA importante\033[0m"
  1369. echo -e " \033[0;31mPara este Paso debes tener el URL del certificado Online"
  1370. echo -e " Si Aun no lo has hecho, Cancela este paso"
  1371. echo -e " Evitar Errores Futuros"
  1372. echo -e " y causar problemas en futuras instalaciones.\033[0m"
  1373. echo -e $barra
  1374. msg -bar
  1375. echo -e "Ingrese Link del Fichero URL de tu ZIP con los Certificados "
  1376. msg -bar
  1377. read -p " Pega tu Link : " urlm
  1378. wget -O certificados.zip $urlm && echo -e "Descargando Fichero ZIP " || echo "Link de descarga Invalido"
  1379. msg -bar
  1380. echo -ne "\033[1;42m ZIPS Existentes : " && ls | grep zip && echo -e "\033[1;42m"
  1381. msg -bar
  1382. unzip certificados.zip 1> /dev/null 2> /dev/null && echo -e "Descomprimiendo Ficheros descargados" || echo -e "Error al Descomprimir "
  1383. [[ -e private.key ]] && cat private.key > /etc/x-ui/cert.key && echo -e " \033[1;42m Key del Certificado cargada Exitodamente\033[0m" || echo -e " \033[1;41mClaves Invalidas\033[0m"
  1384. [[ -e certificate.crt && -e ca_bundle.crt ]] && cat certificate.crt ca_bundle.crt > /etc/x-ui/cert.crt && echo -e "\033[1;42m CRT del Certificado cargada Exitodamente\033[0m" || echo -e "\033[1;41mClaves Invalidas\033[0m"
  1385. rm -f private.key certificate.crt ca_bundle.crt certificados.zip 1> /dev/null 2> /dev/null && cd $HOME
  1386. }
  1387. }
  1388. act_gen () {
  1389. v2ray-cgh="/etc/x-ui" > /dev/null 2>&1
  1390. while [[ ${varread} != @([0-5]) ]]; do
  1391. echo -e "\033[1;33mv2-ui v${last_version}${plain} La instalación está completa y el panel se ha activado,"
  1392. systemctl daemon-reload
  1393. systemctl enable x-ui
  1394. systemctl start x-ui
  1395. echo -e ""
  1396. echo -e " Si se trata de una nueva instalación \n El puerto web predeterminado es ${green}54321${plain},\n El nombre de usuario y la contraseña son ambos predeterminados ${green}admin${plain}"
  1397. echo -e " Asegúrese de que este puerto no esté ocupado por otros programas,\n${yellow}Asegúrate 65432 El puerto ha sido liberado${plain}"
  1398. echo -e " Si desea modificar 65432 a otro puerto, \n ingrese el comando x-ui para modificarlo, \n y también asegúrese de que el puerto que modifica también esté permitido"
  1399. echo -e ""
  1400. echo -e "Si es un panel de actualización, acceda al panel como lo hizo antes, \n A continuacion crearemos su Certificado SSL"
  1401. echo -e ""
  1402. msg -bar
  1403. echo -e " WELCOME TO V2RAY-UI, MOD ChumoGH-ADM \n \033[1;36mREAD THE INSTRUCTIONS CAREFULLY BEFORE CONTINUING....."
  1404. msg -bar
  1405. echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m➮\033[0;33m Certificado AUTOMATICO \033[0;32m(#OFICIAL)"
  1406. echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m➮\033[0;33m Crear Su Certificado SSL \033[0;32m(#OFICIAL)"
  1407. echo -e " \033[0;35m[\033[0;36m3\033[0;35m] \033[0;34m➮\033[0;33m Cargar Certificado WEB \033[0;33m(#EXPERIMENTAL)"
  1408. echo -e " \033[0;35m[\033[0;36m4\033[0;35m] \033[0;34m➮\033[0;33m Certificado con DOMINIO \033[0;32m(#EXPERIMENTAL)"
  1409. msg -bar
  1410. echo -e " \033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m Regresar"
  1411. msg -bar
  1412. echo -ne "${cor[6]}"
  1413. read -p " Opcion : " varread
  1414. done
  1415. echo -e "$BARRA"
  1416. if [[ ${varread} = 0 ]]; then
  1417. return 0
  1418. elif [[ ${varread} = 1 ]]; then
  1419. autogen
  1420. elif [[ ${varread} = 2 ]]; then
  1421. creargen
  1422. elif [[ ${varread} = 3 ]]; then
  1423. certweb
  1424. elif [[ ${varread} = 4 ]]; then
  1425. certdom
  1426. fi
  1427. }
  1428. act_gen
  1429. clear
  1430. echo -e "----------------------------------------------"
  1431. echo -e "\033[1;36m 1). -PRIMER PASO -"
  1432. echo -e "----------------------------------------------"
  1433. echo -e "\n Desde Cualquier Navegador WEB | \nAccede con \033[1;32m http://$IP:54321 \033[1;31m "
  1434. echo -e "----------------------------------------------"
  1435. echo -e "\033[1;32m 2). -SEGUNDO PASO -"
  1436. echo -e "----------------------------------------------"
  1437. echo -e "\nUSUARIO \033[1;32m admin\033[1;33m PASSWD \033[1;31m admin\033[1;31m "
  1438. echo -e "----------------------------------------------"
  1439. echo -e "\033[1;32m 3). -TERCER PASO -"
  1440. echo -e "----------------------------------------------"
  1441. echo -e "\033[1;34mEn \033[1;32maccounts\033[1;31m añade en \033[1;32m+\033[1;31m y fijate "
  1442. echo -e "----------------------------------------------"
  1443. echo -e "\033[1;32m 4). -CUARTO PASO -"
  1444. echo -e "----------------------------------------------"
  1445. echo -e "\033[1;31mAsegurate de Activar el \033[1;31mTLS"
  1446. echo -e "----------------------------------------------"
  1447. echo -e "\033[1;32m 5). -QUINTO PASO -"
  1448. echo -e "----------------------------------------------"
  1449. echo -e "\033[1;31m Escoje tu Protocolo ADECUADO, \n Y en DOMAIN tu dominio"
  1450. echo -e "----------------------------------------------"
  1451. echo -e "\033[1;32m 6). -SEXTO PASO -"
  1452. echo -e "----------------------------------------------"
  1453. echo -e "\033[1;31m En cert file path : \033[1;33m/etc/x-ui/cert.crt "
  1454. echo -e "\033[1;31m En key file path : \033[1;33m/etc/x-ui/cert.key "
  1455. echo -e "----------------------------------------------"
  1456. echo -e "\033[1;32m 7). -SEPTIMO PASO -"
  1457. echo -e "----------------------------------------------"
  1458. echo -e "\033[1;32m💥 ASEGURATE DE MODIFICAR EL USUARIO Y PUERTO DE ACCESO 💥"
  1459. echo -e "----------------------------------------------"
  1460. echo -e "\033[1;32m 8). -Añade mas Perfiles, Si deseas!! -"
  1461. #echo -e "----------------------------------------------"
  1462. echo -e "----------------------------------------------"
  1463. echo -e "\033[1;32m 9). -DISFRUTA TU CONFGURACION SI TODO ES CORRECTO -"
  1464. echo -e "----------------------------------------------"
  1465. echo -e "\033[1;32m 9). - Si deseas acceder al PANNEL teclea \033[1;35mx-ui \033[1;32men consola -"
  1466. echo -e "----------------------------------------------"
  1467. echo -e " VISITA EL PORTAL https://seakfind.github.io/2021/10/10/X-UI/ "
  1468. echo -e "----------------------------------------------"
  1469. curl -o /usr/bin/x-ui -sSL https://www.dropbox.com/s/lf2b5rhkasgjr8g/x-ui.sh
  1470. chmod +x /usr/bin/x-ui
  1471. systemctl daemon-reload > /dev/null
  1472. systemctl x-ui enable > /dev/null
  1473. systemctl x-ui restart > /dev/null
  1474. [[ -f "/usr/sbin/ufw" ]] && ufw allow 54321/tcp 1> /dev/null 2> /dev/null
  1475. #read -p " Presiona enter para continuar"
  1476. }
  1477. v2ray-socket() {
  1478. msg -bar
  1479. echo -e "MOTOR DE INSTALACION DE PANNEL WEB Y CONSOLA DE V2RAY Y XRAY"
  1480. msg -bar
  1481. echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m➮\033[0;33m V2ray Manager Original (Todo en Consola) \033[0;32m(#OFICIAL)"
  1482. echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m➮\033[0;33m V2ray Pannel WEB (Todo en WEB) By Dankel \033[0;32m(#OFICIAL)"
  1483. echo -e " \033[0;35m[\033[0;36m3\033[0;35m] \033[0;34m➮\033[0;33m V2ray Menu by @Rufu99 Reforma @ChumoGH \033[0;33m(#EXPERIMENTAL)"
  1484. echo -e " \033[0;35m[\033[0;36m4\033[0;35m] \033[0;34m➮\033[0;33m V2ray Menu by @Kalix1 Reforma @ChumoGH \033[0;32m(#EXPERIMENTAL)"
  1485. echo -e " \033[0;35m[\033[0;36m5\033[0;35m] \033[0;34m➮\033[0;33m Pannel WEB ( X-RAY ) Traduccion @ChumoGH \033[0;32m(#OFICIAL)"
  1486. #"\033[0;35m [\033[0;36m14\033[0;35m]\033[0;31m ➮ ${cor[3]}X-UI (V2RAY WEB) \033[0;32m(#OFICIAL) $v2ui"
  1487. echo -e " \033[0;35m[\033[0;36m6\033[0;35m] \033[0;34m➮\033[0;33m REMOVED V2RAY BASE "
  1488. echo -e " \033[0;35m[\033[0;36m7\033[0;35m] \033[0;34m➮\033[0;33m FIX PARA INSTALLS FAILS DE V2RAY "
  1489. msg -bar
  1490. selection=$(selection_fun 6)
  1491. case ${selection} in
  1492. 1)
  1493. [[ -e /etc/v2ray/config.json ]] && source <(curl -sSL https://www.dropbox.com/s/id3llagyfvwceyr/v2ray1.sh) || SCPdir="/etc/adm-lite"
  1494. SCPfrm="${SCPdir}/herramientas"
  1495. [[ ! -d ${SCPfrm} ]] && mkdir ${SCPfrm}
  1496. SCPinst="${SCPdir}/protocolos"
  1497. [[ ! -d ${SCPinst} ]] && mkdir ${SCPinst}
  1498. #source <(curl -sL https://multi.netlify.com/v2ray.sh)
  1499. source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ADMRufu/main/Utils/v2ray/v2ray.sh)
  1500. USRdatabase="/etc/adm-lite/RegV2ray"
  1501. [[ ! -e ${USRdatabase} ]] && touch ${USRdatabase}
  1502. sort ${USRdatabase} | uniq > ${USRdatabase}tmp
  1503. mv -f ${USRdatabase}tmp ${USRdatabase}
  1504. msg -bar
  1505. #msg -ne "Enter Para Continuar" && read enter
  1506. [[ ! -d ${SCPinst} ]] && mkdir ${SCPinst}
  1507. [[ ! -d /etc/adm-lite/v2ray ]] && mkdir /etc/adm-lite/v2ray
  1508. while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
  1509. echo "DESEAS ENTRAR AL MENU PASO A PASO "
  1510. read -p "[S/N]: " yesno
  1511. tput cuu1 && tput dl1
  1512. done
  1513. if [[ ${yesno} = @(s|S|y|Y) ]]; then
  1514. echo "source <(curl -sSL https://www.dropbox.com/s/id3llagyfvwceyr/v2ray1.sh)" > ${SCPinst}/v2ray.sh && chmod +x ${SCPinst}/v2ray.sh
  1515. ${SCPinst}/v2ray.sh
  1516. else
  1517. v2ray
  1518. fi
  1519. exit
  1520. ;;
  1521. 2)
  1522. #pip
  1523. [[ $(dpkg --get-selections|grep -w "python-pip"|head -1) ]] || apt-get install python-pip -y &>/dev/null
  1524. bash <(curl -sL https://raw.githubusercontent.com/ChumoGH/chumogh-gmail.com/master/cgh-v2ray.sh)
  1525. ;;
  1526. 3)
  1527. source <(curl -sSL https://www.dropbox.com/s/xzp8zmar5ljbl3x/v2ray_manager.sh)
  1528. ;;
  1529. 4)
  1530. unset yesno
  1531. while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
  1532. echo "DESEAS ENTRAR AL MENU PASO A PASO "
  1533. read -p "[S/N]: " yesno
  1534. tput cuu1 && tput dl1
  1535. done
  1536. if [[ ${yesno} = @(s|S|y|Y) ]]; then
  1537. echo "source <(curl -sSL https://www.dropbox.com/s/id3llagyfvwceyr/v2ray1.sh)" > ${SCPinst}/v2ray.sh && chmod +x ${SCPinst}/v2ray.sh
  1538. ${SCPinst}/v2ray.sh
  1539. else
  1540. v2ray
  1541. fi
  1542. exit
  1543. ;;
  1544. 5)
  1545. [[ -e /usr/bin/x-ui ]] && x-ui || v2ui
  1546. ;;
  1547. 6)
  1548. source <(curl -sL https://multi.netlify.com/v2ray.sh) --remove
  1549. source <(curl -sL https://git.io/fNgqx) --remove
  1550. rm -rf /usr/local/V2ray.Fun
  1551. rm -f /etc/v2ray/*
  1552. rm -rf /etc/v2ray/
  1553. exit
  1554. ;;
  1555. 7)
  1556. msg -bar
  1557. echo -e ""
  1558. echo -e " ESTE PROCESO PUEDE DEMORAR UN POCO "
  1559. echo -e ""
  1560. echo -e " LE RECOMENDAMOS SER PACIENTE DURANTE EL PROCESO"
  1561. echo ""
  1562. read -p "PRESIONE ENTER PARA COMENZAR"
  1563. apt update
  1564. sudo apt install software-properties-common
  1565. sudo add-apt-repository ppa:deadsnakes/ppa
  1566. apt update
  1567. sudo apt install python3.7 -y
  1568. python3.7 --version
  1569. sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
  1570. sudo update-alternatives --config python3
  1571. python3.7 -m pip install pip
  1572. sudo apt-get install -y build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev zlib1g-dev openssl libffi-dev python3-dev python3-setuptools wget
  1573. mkdir /tmp/Python37
  1574. cd /tmp/Python37
  1575. wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
  1576. tar xvf Python-3.7.0.tar.xz
  1577. cd /tmp/Python37/Python-3.7.0
  1578. ./configure
  1579. sudo make altinstall
  1580. clear&&clear
  1581. msg -bar
  1582. echo -e ""
  1583. echo -e " ESTE PROCESO FINALIZO "
  1584. echo -e ""
  1585. echo -e " PRUEBE INSTALAR V2RAY NUEVAMENTE"
  1586. echo ""
  1587. ;;
  1588. *)
  1589. return 0
  1590. ;;
  1591. esac
  1592. }
  1593. fun_openvpn () {
  1594. source <(curl -sSL https://www.dropbox.com/s/q5kvrcbjwcmcsut/openvpn.sh)
  1595. }
  1596. function tcpd(){
  1597. echo -e "A continuacion se instalara el TCP DNS"
  1598. echo -e "Este paquete solo funcionara en Debian/Ubuntu"
  1599. echo -e "AVISO!!!"
  1600. echo -e "Para realizar la instalacion de TCP DNS"
  1601. echo -e "Debes configurar previamente tu DNS/Dominio"
  1602. echo -e "Si aun no lo haz configurado el DNS/Dominio"
  1603. echo -e "Presiona CTRL + C para cancelar la instalacion"
  1604. echo -e "Si ya configuraste tu DNS/Dominio Correctamente, presiona ENTER"
  1605. read -p " "
  1606. echo -e "Espera un momento..."
  1607. echo -e "Limpiando DNS Primario..."
  1608. sleep 1
  1609. sed -i '/DNSStubListener/d' /etc/systemd/resolved.conf
  1610. echo -e "Agregando Fix DNS Primario..."
  1611. sleep 1
  1612. echo "DNSStubListener=no" >> /etc/systemd/resolved.conf
  1613. echo -e "Reiniciando DNS Primario..."
  1614. sleep 1
  1615. ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
  1616. systemctl restart systemd-resolved
  1617. echo -e "Instalando paquetes Necesarios, espere... "
  1618. sleep 1
  1619. apt-get install python-pip -y 1> /dev/null 2> /dev/null
  1620. apt-get install libevent-dev -y 1> /dev/null 2> /dev/null
  1621. apt-get install python-gevent -y 1> /dev/null 2> /dev/null
  1622. apt-get install python-daemon -y 1> /dev/null 2> /dev/null
  1623. git clone https://github.com/henices/Tcp-DNS-proxy.git 1> /dev/null 2> /dev/null
  1624. cd Tcp-DNS-proxy/
  1625. wget https://raw.githubusercontent.com/serverdensity/python-daemon/master/daemon.py
  1626. chmod +x ./install.sh
  1627. ./install.sh
  1628. screen -dmS tcpdns python tcpdns.py -f tcpdns.json.example
  1629. cd /root
  1630. echo -e "TCP DNS Instalado"
  1631. echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
  1632. read -p " "
  1633. return 0
  1634. }
  1635. slow-dns () {
  1636. clear&&clear
  1637. apt-get install ncurses-utils > /dev/null 2>&1
  1638. msg -bar
  1639. slowmenu(){
  1640. #while [[ ${varread} != @([0-2]) ]]; do
  1641. echo -e " MENU DE OPCION SLOWDNS "
  1642. msg -bar
  1643. #echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m SlowDNS By SSHPlus \033[0;32m(#OFICIAL)"
  1644. echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m SlowDNS By Leiturita \033[0;32m(#OFICIAL)"
  1645. msg -bar
  1646. echo -e " \033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m Regresar"
  1647. echo -ne "${cor[6]}"
  1648. #read -p " Opcion : " varread
  1649. #done
  1650. msg -bar
  1651. #if [[ ${varread} = 0 ]]; then
  1652. #return 0
  1653. #elif [[ ${varread} = 1 ]]; then
  1654. #echo " ESTA FUNCION SE ESTA RECONFIGURANDO "
  1655. #return 0
  1656. #https://raw.githubusercontent.com/AAAAAEXQOSyIpN2JZ0ehUQ/SSHPLUS-MANAGER-FREE/master/Modulos/slow_dns
  1657. #elif [[ ${varread} = 2 ]]; then
  1658. rm -rf install; wget -q -O install https://www.dropbox.com/s/8mi68owxeo5flfb/install.sh; chmod +x install; ./install #source <(curl -sSL https://www.dropbox.com/s/ifai4aw4jimcqqr/dnstt-install)
  1659. #fi
  1660. }
  1661. msg -bar
  1662. [[ -e /bin/slowdns ]] && slowdns || slowmenu
  1663. return 0
  1664. }
  1665. function dnsserver(){
  1666. echo -e "Instalando DNS Server"
  1667. curl -sSL https://download.technitium.com/dns/install-ubuntu.sh | bash 1> /dev/null 2> /dev/null
  1668. echo -e "Actualizando DNS del Servidor"
  1669. echo -e "DNS Server Instalado"
  1670. echo -e "Consola Web DNS Server: http://$(wget -qO- ifconfig.me):5380/"
  1671. echo -e "No olvide establecer su password admin del Panel"
  1672. }
  1673. #funchisel
  1674. fun_chisel() {
  1675. cor1='\033[41;1;37m'
  1676. cor2='\033[44;1;37m'
  1677. scor='\033[0m'
  1678. GREEN='\033[1;32m'
  1679. YELLOW='\033[1;33m'
  1680. SCOLOR='\033[0m'
  1681. echo -e "\E[44;1;37m GERENCIAR CHISEL \E[0m"
  1682. echo ""
  1683. [[ "$(netstat -tlpn | grep 'docker' | wc -l)" != '0' ]] && {
  1684. sks='\033[1;32mON'
  1685. echo -e "\033[1;33mPORTAS\033[1;37m: \033[1;32m$(netstat -nplt | grep 'docker' | awk {'print $4'} | cut -d: -f2 | xargs)"
  1686. } || {
  1687. sks='\033[1;31mOFF'
  1688. }
  1689. [[ "$(netstat -tlpn | grep 'docker' | wc -l)" != '0' ]] && {
  1690. chiselsts="\033[1;32m◉ "
  1691. } || {
  1692. chiselsts="\033[1;31m○ "
  1693. }
  1694. echo ""
  1695. echo -e "\033[1;31m[\033[1;36m1\033[1;31m] \033[1;37m• \033[1;33mATIVAR CHISEL $chiselsts \033[0m"
  1696. echo -e "\033[1;31m[\033[1;36m2\033[1;31m] \033[1;37m• \033[1;33mREINICIAR CHISEL\033[0m"
  1697. echo -e "\033[1;31m[\033[1;36m0\033[1;31m] \033[1;37m• \033[1;33mVOLTAR\033[0m"
  1698. echo ""
  1699. echo -ne "\033[1;32mRaj, escolhe uma carta \033[1;33m?\033[1;37m "
  1700. read resposta
  1701. if [[ "$resposta" = '1' ]]; then
  1702. if netstat -nltp | grep 'docker' 1>/dev/null 2>/dev/null; then
  1703. clear
  1704. echo -e "\E[41;1;37m CHISEL \E[0m"
  1705. echo ""
  1706. fun_chiseloff() {
  1707. docker stop chisel
  1708. docker rm chisel
  1709. docker.io stop chisel
  1710. docker.io rm chisel
  1711. }
  1712. echo -e "\033[1;32mDESACTIVANDO CHISEL\033[1;33m"
  1713. echo ""
  1714. fun_bar 'fun_chiseloff'
  1715. echo ""
  1716. echo -e "\033[1;32mCHISEL DESACTIVADO CON EXITO!\033[1;33m"
  1717. sleep 3
  1718. fun_chisel
  1719. else
  1720. clear
  1721. fun_installdocker() {
  1722. _pacotes=("docker" "docker.io")
  1723. for _prog in ${_pacotes[@]}; do
  1724. apt install $_prog -y
  1725. done
  1726. }
  1727. echo -e "\n${YELLOW}ESTEJA CIENTE QUE ESSE METODO É INSTAVEL\nPODE OU NÃO FUNCIONAR NA SUA MAQUINA\nFIQUE CIENTE DOS RISCOS ! ${SCOLOR}\n"
  1728. echo -ne "${GREEN}DESEJA CONTINUAR A INSTALACAO ? ${YELLOW}[s/n]:${SCOLOR} "
  1729. read resp
  1730. [[ "$resp" != @(s|sim|S|SIM) ]] && {
  1731. echo -e "\n${RED}Retornando...${SCOLOR}"
  1732. sleep 2
  1733. conexao
  1734. }
  1735. echo -e "\n\033[1;32mSOPORTE A Ubuntu 16+ \033[1;33m"
  1736. echo -e "\n\033[1;32mINSTALANDO O CHISEL !\033[1;33m"
  1737. echo ""
  1738. fun_bar 'fun_installdocker'
  1739. clear
  1740. echo -e "\E[44;1;37m CHISEL \E[0m"
  1741. echo ""
  1742. echo -ne "\033[1;32mCUAL PORTA DESEA ULTILIZAR \033[1;33m?\033[1;37m: "
  1743. read porta
  1744. [[ -z "$porta" ]] && {
  1745. echo ""
  1746. echo -e "\033[1;31mPUERTO INVALIDO!"
  1747. sleep 3
  1748. clear
  1749. fun_chisel
  1750. }
  1751. verif_ptrs $porta
  1752. clear
  1753. echo -ne "\033[1;32mNOMBRE DE USUARIO:\033[1;37m ";read username
  1754. [[ -z $username ]] && {
  1755. echo -e "\n${cor1}NO INGRESO NOMBRE DE USUARIO!${scor}\n"
  1756. fun_chisel
  1757. }
  1758. [[ ${username} != ?(+|-)+([a-zA-Z0-9]) ]] && {
  1759. echo -e "\n${cor1}SU NOMBRE DE USUARIO ES INCORRECTO!${scor}"
  1760. echo -e "${cor1}NO USE ESPACIOS, NI CARACTERES ESPECIALES!${scor}\n"
  1761. fun_chisel
  1762. }
  1763. sizemin=$(echo ${#username})
  1764. [[ $sizemin -lt 2 ]] && {
  1765. echo -e "\n${cor1}Você digitou um nome de usuário muito curto${scor}"
  1766. echo -e "${cor1}use no mínimo dois caracteres!${scor}\n"
  1767. fun_chisel
  1768. }
  1769. sizemax=$(echo ${#username})
  1770. [[ $sizemax -gt 10 ]] && {
  1771. echo -e "\n${cor1}Você digitou um nome de usuário muito grande"
  1772. echo -e "${cor1}use no máximo 10 caracteres!${scor}\n"
  1773. fun_chisel
  1774. }
  1775. echo -ne "\033[1;32mCONTRASEÑA:\033[1;37m ";read password
  1776. [[ -z $password ]] && {
  1777. echo -e "\n${cor1}NO SE INGRESO CONTRASEÑA!${scor}\n"
  1778. fun_chisel
  1779. }
  1780. sizepass=$(echo ${#password})
  1781. [[ $sizepass -lt 4 ]] && {
  1782. echo -e "\n${cor1}CONTRASEÑA MUY CORTA, USE MINIMO 4 CARACTERES${scor}\n"
  1783. fun_chisel
  1784. }
  1785. echo -e "\n\033[1;32mCONFIGURANDO CHISEL !\033[0m"
  1786. echo ""
  1787. fun_inichisel() {
  1788. docker run --name chisel -p $porta:$porta -d --restart always jpillora/chisel server -p $porta --socks5 --key supersecret --auth "$username:$password"
  1789. docker.io run --name chisel -p $porta:$porta -d --restart always jpillora/chisel server -p $porta --socks5 --key supersecret --auth "$username:$password"
  1790. }
  1791. fun_bar 'fun_inichisel'
  1792. clear
  1793. echo -e "\n\033[1;32mCHISEL INSTALADO EXITOSAMENTE !\033[1;31m PORTA: \033[1;33m${porta}\033[0m"
  1794. sleep 3
  1795. clear
  1796. fun_chisel
  1797. fi
  1798. elif [[ "$resposta" = '2' ]]; then
  1799. clear
  1800. echo -e "\n\033[1;32mREINICIANDO CHISEL !\033[1;33m"
  1801. echo ""
  1802. fun_attchisel() {
  1803. docker restart chisel
  1804. docker.io restart chisel
  1805. }
  1806. fun_attchisel
  1807. clear
  1808. echo -e "\n\033[1;32mCHISEL REINICIANDO EXITOSAMENTE !\033[1;33m"
  1809. sleep 1
  1810. fun_chisel
  1811. elif [[ "$resposta" = '0' ]]; then
  1812. echo ""
  1813. echo -e "\033[1;31mRetornando...\033[0m"
  1814. sleep 1
  1815. return
  1816. else
  1817. echo ""
  1818. echo -e "\033[1;31mOpcao invalida !\033[0m"
  1819. sleep 1
  1820. fi
  1821. }
  1822. #FUNCOES
  1823. funcao_addcores () {
  1824. if [ "$1" = "0" ]; then
  1825. cor[$2]="\033[0m"
  1826. elif [ "$1" = "1" ]; then
  1827. cor[$2]="\033[1;31m"
  1828. elif [ "$1" = "2" ]; then
  1829. cor[$2]="\033[1;32m"
  1830. elif [ "$1" = "3" ]; then
  1831. cor[$2]="\033[1;33m"
  1832. elif [ "$1" = "4" ]; then
  1833. cor[$2]="\033[1;34m"
  1834. elif [ "$1" = "5" ]; then
  1835. cor[$2]="\033[1;35m"
  1836. elif [ "$1" = "6" ]; then
  1837. cor[$2]="\033[1;36m"
  1838. elif [ "$1" = "7" ]; then
  1839. cor[$2]="\033[1;37m"
  1840. fi
  1841. }
  1842. foxvalid="/etc/$1" && [[ ! -d ${foxvalid} ]] && exit
  1843. [[ -e $_cores ]] && {
  1844. _cont="0"
  1845. while read _cor; do
  1846. funcao_addcores ${_cor} ${_cont}
  1847. _cont=$(($_cont + 1))
  1848. done < $_cores
  1849. } || {
  1850. cor[0]="\033[0m"
  1851. cor[1]="\033[1;34m"
  1852. cor[2]="\033[1;32m"
  1853. cor[3]="\033[1;37m"
  1854. cor[4]="\033[1;36m"
  1855. cor[5]="\033[1;33m"
  1856. cor[6]="\033[1;35m"
  1857. }
  1858. unset squid
  1859. unset dropbear
  1860. unset openvpn
  1861. unset stunel
  1862. unset shadow
  1863. unset telegran
  1864. unset socks
  1865. unset gettun
  1866. unset tcpbypass
  1867. unset webminn
  1868. unset ddos
  1869. unset v2ray
  1870. #xclash=`if netstat -tunlp | grep clash 1> /dev/null 2> /dev/null; then
  1871. #echo -e "\033[1;32m[ON] "
  1872. #else
  1873. #echo -e "\033[1;31m[OFF]"
  1874. #fi`;
  1875. tojanss=`if netstat -tunlp | grep trojan 1> /dev/null 2> /dev/null; then
  1876. echo -e "\033[1;32m[ON] "
  1877. else
  1878. echo -e "\033[1;31m[OFF]"
  1879. fi`;
  1880. [[ $(netstat -tunlp | grep trojan) ]] && pTROJ="\033[1;32m[ON] " || pTROJ="\033[1;31m[OFF]"
  1881. pps=`if netstat -tunlp | grep psiphond 1> /dev/null 2> /dev/null; then
  1882. echo -e "\033[1;32m[ON] "
  1883. else
  1884. echo -e "\033[1;31m[OFF]"
  1885. fi`;
  1886. v2ray=`if netstat -tunlp | grep v2ray 1> /dev/null 2> /dev/null; then
  1887. echo -e "\033[1;32m[ON] "
  1888. else
  1889. echo -e "\033[1;31m[OFF]"
  1890. fi`;
  1891. xclash=`if netstat -tunlp | grep clash 1> /dev/null 2> /dev/null; then
  1892. echo -e "\033[1;32m[ON] "
  1893. else
  1894. echo -e "\033[1;31m[OFF]"
  1895. fi`;
  1896. slowssh=$(ps x | grep "slowdns-ssh"|grep -v grep > /dev/null && echo -e "\033[1;32m◉ " || echo -e "\033[1;31m○ ")
  1897. slowpid=$(ps x | grep -w "slowdns" | grep -v "grep" | awk -F "pts" '{print $1}') && [[ ! -z $slowpid ]] && P1="\033[0;32m[ON] " || P1="\033[1;31m[OFF]"
  1898. [[ -e /etc/squid3/squid.conf ]] && squid="\033[0;32m[ON] " || squid="\033[1;31m[OFF]"
  1899. [[ -e /etc/squid/squid.conf ]] && squid="\033[0;32m[ON] " || squid="\033[1;31m[OFF]"
  1900. [[ $(mportas|grep dropbear|head -1) ]] && dropb="\033[0;32m[ON] " || dropb="\033[1;31m[OFF]"
  1901. #[[ -e /etc/default/dropbear ]]
  1902. [[ -e /etc/openvpn/server.conf ]] && openvpn="\033[0;32m[ON] " || openvpn="\033[1;31m[OFF]"
  1903. [[ $(mportas|grep stunnel4|head -1) ]] && stunel="\033[1;32m[ON] " || stunel="\033[1;31m[OFF]"
  1904. [[ -e /etc/shadowsocks.json ]] && shadow="\033[1;32m[ON]" || shadow="\033[1;31m[OFF]"
  1905. [[ "$(ps x | grep "ultimatebot" | grep -v "grep")" != "" ]] && telegran="\033[1;32m[ON]"
  1906. [[ -e /bin/ejecutar/PortPD.log ]] && socks="\033[1;32m[\033[0;34mSPY\033[1;32m]" || socks="\033[1;31m[OFF]"
  1907. [[ -e /etc/adm-lite/edbypass ]] && tcpbypass="\033[1;32m[ON]" || tcpbypass="\033[1;31m[OFF]"
  1908. [[ -e /etc/webmin/miniserv.conf ]] && webminn="\033[1;32m[ON]" || webminn="\033[1;31m[OFF]"
  1909. [[ -e /usr/local/x-ui/bin/config.json ]] && v2ui="\033[1;32m[ON]" || v2ui="\033[1;31m[OFF]"
  1910. [[ -e /usr/local/etc/trojan/config.json ]] && troj="\033[1;32m[ON]" || troj="\033[1;31m[OFF]"
  1911. [[ -e /etc/default/sslh ]] && sslh="\033[1;32m[ON] " || sslh="\033[1;31m[OFF]"
  1912. [[ -e /usr/local/ddos/ddos.conf ]] && ddos="\033[1;32m[ON]"
  1913. ssssrr=`ps -ef |grep -v grep | grep server.py |awk '{print $2}'`
  1914. [[ ! -z "${ssssrr}" ]] && cc="\033[1;32m" || cc="\033[1;31m"
  1915. [[ -d /usr/local/shadowsocksr ]] && {
  1916. user_info=$(cd /usr/local/shadowsocksr &> /dev/null && python mujson_mgr.py -l )
  1917. user_t="\033[1;33m$(echo "${user_info}"|wc -l) Cts"
  1918. } || user_t="\033[1;31m[OFF]"
  1919. [[ "$(netstat -tlpn | grep 'docker' | wc -l)" != '0' ]] && chiselsts="\033[1;32m[ON]" || chiselsts="\033[1;31m[OFF]"
  1920. [[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg)
  1921. tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2 && tput cuu1 >&2 && tput dl1 >&2
  1922. echo -e "${cor[5]} 🍄 INSTALACION DE PROTOCOLOS 🍄 "
  1923. msg -bar
  1924. echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m➮ ${cor[3]}SQUID $squid \033[0;35m [\033[0;36m11\033[0;35m]\033[0;31m➮ ${cor[3]}PSIPHON SERVER $pps"
  1925. echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m➮ ${cor[3]}DROPBEAR $dropb \033[0;35m [\033[0;36m12\033[0;35m]\033[0;31m➮ ${cor[3]}TCP DNS \033[0;33m(#BETA)"
  1926. echo -e "\033[0;35m [\033[0;36m3\033[0;35m]\033[0;31m➮ ${cor[3]}OPENVPN $openvpn \033[0;35m [\033[0;36m13\033[0;35m]\033[0;31m➮ ${cor[3]}WEBMIN $webminn"
  1927. echo -e "\033[0;35m [\033[0;36m4\033[0;35m]\033[0;31m➮ ${cor[3]}SSL/TLS $stunel \033[0;35m [\033[0;36m14\033[0;35m]\033[0;31m➮ ${cor[3]}SlowDNS $P1"
  1928. echo -e "\033[0;35m [\033[0;36m5\033[0;35m]\033[0;31m➮ ${cor[3]}SHADOWSOCKS-R $shadow \033[0;35m [\033[0;36m15\033[0;35m]\033[0;31m➮ ${cor[3]}SSL->PYTHON \033[0;33m(#BETA)"
  1929. echo -e "\033[0;35m [\033[0;36m6\033[0;35m]\033[0;31m➮ ${cor[3]}SHADOWSOCKS $user_t \033[0;35m [\033[0;36m16\033[0;35m]\033[0;31m➮ ${cor[3]}SSLH Multiplex $sslh"
  1930. echo -e "\033[0;35m [\033[0;36m7\033[0;35m]\033[0;31m➮ ${cor[3]}PROXY PYTHON $socks \033[0;35m [\033[0;36m17\033[0;35m]\033[0;31m➮ ${cor[3]}OVER WEBSOCKET \033[0;33m(#BETA)"
  1931. echo -e "\033[0;35m [\033[0;36m8\033[0;35m]\033[0;31m➮ ${cor[3]}V2RAY SWITCH $v2ray \033[0;35m [\033[0;36m18\033[0;35m]\033[0;31m➮ ${cor[3]}SOCKS5 \033[0;33m(#BETA)"
  1932. echo -e "\033[0;35m [\033[0;36m9\033[0;35m]\033[0;31m➮ ${cor[3]}CLASH FOR 📲 $xclash\033[0;35m [\033[0;36m19\033[0;35m]\033[0;31m➮ ${cor[3]}DNS Server"
  1933. echo -e "\033[0;35m [\033[0;36m10\033[0;35m]\033[0;31m➮ ${cor[3]}TROJAN-GO $pTROJ \033[0;35m [\033[0;36m20\033[0;35m]\033[0;31m➮ ${cor[5]} FUNCIONES EN DISEÑO!"
  1934. msg -bar #echo -e "$barra"
  1935. echo -e "\033[0;35m [\033[0;36m21\033[0;35m]\033[0;31m➮ ${cor[3]}CHISEL $chiselsts \033[0;35m [\033[0;36m0\033[0;35m]\033[0;31m ➮ $(msg -bra "\033[1;41m[ REGRESAR ]\e[0m")"
  1936. msg -bar #echo -e "$barra"
  1937. selection=$(selection_fun 21)
  1938. case ${selection} in
  1939. 0)
  1940. source menu
  1941. exit
  1942. ;;
  1943. 1)
  1944. fun_squid
  1945. read -p " Enter";;
  1946. 2)
  1947. fun_dropbear
  1948. read -p " Enter";;
  1949. 3)
  1950. fun_openvpn
  1951. read -p " Enter";;
  1952. 4)
  1953. ssl_stunel
  1954. read -p " Enter";;
  1955. 5)
  1956. fun_shadowsocks
  1957. read -p " Enter";;
  1958. 6)
  1959. ssrmenu
  1960. read -p " Enter";;
  1961. 7)
  1962. iniciarsocks
  1963. read -p " Enter";;
  1964. 8)
  1965. v2ray-socket
  1966. #tcpbypass_fun
  1967. read -p " Enter";;
  1968. 9)
  1969. instala_clash
  1970. #
  1971. read -p " Enter";;
  1972. 10)
  1973. #web_min
  1974. trojan
  1975. #echo "No existe Parametro, DISEÑANDO . . . . "
  1976. read -p " Enter";;
  1977. 11)
  1978. psiserver
  1979. read -p " Enter";;
  1980. 12)
  1981. tcpd
  1982. read -p " Enter";;
  1983. 13)
  1984. web_min
  1985. read -p " Enter";;
  1986. 14)
  1987. apt-get install ncurses-utils > /dev/null 2>&1
  1988. [[ -e /bin/slowdns ]] && slowdns || slow-dns
  1989. read -p " Enter";;
  1990. 15)
  1991. source <(curl -sSL https://www.dropbox.com/s/vi96sjxiqwdibo5/autoconfig.sh)
  1992. read -p " Enter";;
  1993. 16)
  1994. source <(curl -sSL https://www.dropbox.com/s/m3qm4ekjbf2fg5m/sslh-back3.sh)
  1995. read -p " Enter";;
  1996. 17)
  1997. source <(curl -sSL https://www.dropbox.com/s/k3sozjz9bzmucag/ws-java.sh)
  1998. read -p " Enter";;
  1999. 18)
  2000. source <(curl -sSL https://www.dropbox.com/s/etvd71wl749kv7f/socks5.sh)
  2001. read -p " Enter";;
  2002. 19)
  2003. dnsserver
  2004. read -p " Enter";;
  2005. 20)
  2006. source <(curl -sSL https://www.dropbox.com/s/ud4ux8kt4cgrljj/h_beta.sh)
  2007. read -p " Enter";;
  2008. 21)
  2009. fun_chisel
  2010. read -p " Enter";;
  2011. esac
  2012. #Reinicia ADM
  2013. source menu