ovpnssl.sh 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. #!/bin/bash
  2. # Created by http://www.vps-murah.net
  3. # Remodified by reputation
  4. MYIP=`ifconfig eth0 | awk 'NR==2 {print $2}'`
  5. MYIP2="s/xxxxxxxxx/$MYIP/g";
  6. if [[ $USER != 'root' ]]; then
  7. echo "Oops! root privileges needed"
  8. exit
  9. fi
  10. while :
  11. do
  12. clear
  13. echo " "
  14. echo " "
  15. echo "-----------------------------------------"
  16. echo " Change OpenVPN RP Port "
  17. echo "-----------------------------------------"
  18. echo "Change your default port"
  19. echo " "
  20. echo " [ MENU ]"
  21. echo "1. Change to SQUID Port 3128 (Currently Not Working)"
  22. echo "2. Change to SQUID Port 8080"
  23. echo "3. Change to Privoxy Port 8020"
  24. echo "4. Exit"
  25. read -p "Choose from 1 to 4 : " option2
  26. case $option2 in
  27. 1)
  28. clear
  29. cat > /home/vps/public_html/client.ovpn <<-END
  30. # Created by reputation aka Hiratechi
  31. # TEAM Epiphany | www.pinoythread.com
  32. # Discord Group : https://discord.gg/EHq4XjH
  33. # RULES [ NO TORRENT | NO DDOS | NO BULLSHIT PLS ]
  34. client
  35. dev tun
  36. proto tcp
  37. remote $MYIP 1720
  38. persist-key
  39. persist-tun
  40. pull
  41. resolv-retry infinite
  42. nobind
  43. user nobody
  44. comp-lzo
  45. remote-cert-tls server
  46. verb 3
  47. mute 2
  48. connect-retry 3
  49. connect-retry-max 3128
  50. keepalive 15 45
  51. mute-replay-warnings
  52. redirect-gateway def1
  53. script-security 2
  54. route-method exe
  55. route-delay 2
  56. auth-user-pass
  57. cipher none
  58. auth none
  59. http-proxy-retry
  60. # If squid is not working try to install Privoxy in your vps
  61. http-proxy $MYIP 3128
  62. http-proxy-option CUSTOM-HEADER ""
  63. http-proxy-option CUSTOM-HEADER "POST https://viber.com HTTP/1.0"
  64. http-proxy-option CUSTOM-HEADER "Connection: Keep-Alive"
  65. http-proxy-option CUSTOM-HEADER "Proxy-Connection: Keep-Alive"
  66. ## Uncomment below if you like to do auto-login in mobile
  67. #<auth-user-pass>
  68. #your_username
  69. #your_password
  70. #</auth-user-pass>
  71. END
  72. echo "<ca>" >> /home/vps/public_html/client.ovpn
  73. cat /etc/openvpn/ca.crt >> /home/vps/public_html/client.ovpn
  74. echo "</ca>" >> /home/vps/public_html/client.ovpn
  75. cat > /home/vps/public_html/client.ovpn <<-END
  76. # Created by reputation aka Hiratechi
  77. # TEAM Epiphany | www.pinoythread.com
  78. # Discord Group : https://discord.gg/EHq4XjH
  79. # RULES [ NO TORRENT | NO DDOS | NO BULLSHIT PLS ]
  80. client
  81. dev tun
  82. proto tcp
  83. remote 127.0.0.1 1720
  84. route $MYIP 255.255.255.255 net_gateway
  85. persist-key
  86. persist-tun
  87. pull
  88. resolv-retry infinite
  89. nobind
  90. user nobody
  91. comp-lzo
  92. remote-cert-tls server
  93. verb 3
  94. mute 2
  95. connect-retry 5
  96. connect-retry-max 3128
  97. mute-replay-warnings
  98. redirect-gateway def1
  99. script-security 2
  100. auth-user-pass
  101. cipher none
  102. auth none
  103. ## Uncomment below if you like to do auto-login in mobile
  104. #<auth-user-pass>
  105. #your_username
  106. #your_password
  107. #</auth-user-pass>
  108. END
  109. echo "<ca>" >> /home/vps/public_html/clientssl.ovpn
  110. cat /etc/openvpn/ca.crt >> /home/vps/public_html/clientssl.ovpn
  111. echo "</ca>" >> /home/vps/public_html/clientssl.ovpn
  112. cd /home/vps/public_html
  113. rm -f openvpn.zip
  114. zip openvpn.zip client.ovpn clientssl.ovpn stunnel.conf
  115. clear
  116. echo "OVPN files updated! Download your ovpn file from http://$MYIP/#configs"
  117. echo "Remote proxy was patched successfully updated in your ovpn from VPS!"
  118. sleep 5
  119. ;;
  120. 2)
  121. clear
  122. cat > /home/vps/public_html/client.ovpn <<-END
  123. # Created by reputation aka Hiratechi
  124. # TEAM Epiphany | www.pinoythread.com
  125. # Discord Group : https://discord.gg/EHq4XjH
  126. # RULES [ NO TORRENT | NO DDOS | NO BULLSHIT PLS ]
  127. client
  128. dev tun
  129. proto tcp
  130. remote $MYIP 1720
  131. persist-key
  132. persist-tun
  133. pull
  134. resolv-retry infinite
  135. nobind
  136. user nobody
  137. comp-lzo
  138. remote-cert-tls server
  139. verb 3
  140. mute 2
  141. connect-retry 3
  142. connect-retry-max 8080
  143. keepalive 15 45
  144. mute-replay-warnings
  145. redirect-gateway def1
  146. script-security 2
  147. route-method exe
  148. route-delay 2
  149. auth-user-pass
  150. cipher none
  151. auth none
  152. http-proxy-retry
  153. # If squid is not working try to install Privoxy in your vps
  154. http-proxy $MYIP 8080
  155. http-proxy-option CUSTOM-HEADER ""
  156. http-proxy-option CUSTOM-HEADER "POST https://viber.com HTTP/1.0"
  157. http-proxy-option CUSTOM-HEADER "Connection: Keep-Alive"
  158. http-proxy-option CUSTOM-HEADER "Proxy-Connection: Keep-Alive"
  159. ## Uncomment below if you like to do auto-login in mobile
  160. #<auth-user-pass>
  161. #your_username
  162. #your_password
  163. #</auth-user-pass>
  164. END
  165. echo "<ca>" >> /home/vps/public_html/client.ovpn
  166. cat /etc/openvpn/ca.crt >> /home/vps/public_html/client.ovpn
  167. echo "</ca>" >> /home/vps/public_html/client.ovpn
  168. cat > /home/vps/public_html/clientssl.ovpn <<-END
  169. # Created by reputation aka Hiratechi
  170. # TEAM Epiphany | www.pinoythread.com
  171. # Discord Group : https://discord.gg/EHq4XjH
  172. # RULES [ NO TORRENT | NO DDOS | NO BULLSHIT PLS ]
  173. client
  174. dev tun
  175. proto tcp
  176. remote 127.0.0.1 1720
  177. route $MYIP 255.255.255.255 net_gateway
  178. persist-key
  179. persist-tun
  180. pull
  181. resolv-retry infinite
  182. nobind
  183. user nobody
  184. comp-lzo
  185. remote-cert-tls server
  186. verb 3
  187. mute 2
  188. connect-retry 5
  189. connect-retry-max 8080
  190. mute-replay-warnings
  191. redirect-gateway def1
  192. script-security 2
  193. auth-user-pass
  194. cipher none
  195. auth none
  196. ## Uncomment below if you like to do auto-login in mobile
  197. #<auth-user-pass>
  198. #your_username
  199. #your_password
  200. #</auth-user-pass>
  201. END
  202. echo "<ca>" >> /home/vps/public_html/clientssl.ovpn
  203. cat /etc/openvpn/ca.crt >> /home/vps/public_html/clientssl.ovpn
  204. echo "</ca>" >> /home/vps/public_html/clientssl.ovpn
  205. cd /home/vps/public_html
  206. rm -f openvpn.zip
  207. zip openvpn.zip client.ovpn clientssl.ovpn stunnel.conf
  208. clear
  209. echo "OVPN files updated! Download your ovpn file from http://$MYIP/#configs"
  210. echo "Remote proxy was patched successfully updated in your ovpn from VPS!"
  211. sleep 5
  212. ;;
  213. 3)
  214. clear
  215. cat > /home/vps/public_html/client.ovpn <<-END
  216. # Created by reputation aka Hiratechi
  217. # TEAM Epiphany | www.pinoythread.com
  218. # Discord Group : https://discord.gg/EHq4XjH
  219. # RULES [ NO TORRENT | NO DDOS | NO BULLSHIT PLS ]
  220. client
  221. dev tun
  222. proto tcp
  223. remote $MYIP 1720
  224. persist-key
  225. persist-tun
  226. pull
  227. resolv-retry infinite
  228. nobind
  229. user nobody
  230. comp-lzo
  231. remote-cert-tls server
  232. verb 3
  233. mute 2
  234. connect-retry 3
  235. connect-retry-max 8020
  236. keepalive 15 45
  237. mute-replay-warnings
  238. redirect-gateway def1
  239. script-security 2
  240. route-method exe
  241. route-delay 2
  242. auth-user-pass
  243. cipher none
  244. auth none
  245. http-proxy-retry
  246. # If squid is not working try to install Privoxy in your vps
  247. http-proxy $MYIP 8020
  248. http-proxy-option CUSTOM-HEADER ""
  249. http-proxy-option CUSTOM-HEADER "POST https://viber.com HTTP/1.0"
  250. http-proxy-option CUSTOM-HEADER "Connection: Keep-Alive"
  251. http-proxy-option CUSTOM-HEADER "Proxy-Connection: Keep-Alive"
  252. ## Uncomment below if you like to do auto-login in mobile
  253. #<auth-user-pass>
  254. #your_username
  255. #your_password
  256. #</auth-user-pass>
  257. END
  258. echo "<ca>" >> /home/vps/public_html/client.ovpn
  259. cat /etc/openvpn/ca.crt >> /home/vps/public_html/client.ovpn
  260. echo "</ca>" >> /home/vps/public_html/client.ovpn
  261. cat > /home/vps/public_html/clientssl.ovpn <<-END
  262. # Created by reputation aka Hiratechi
  263. # TEAM Epiphany | www.pinoythread.com
  264. # Discord Group : https://discord.gg/EHq4XjH
  265. # RULES [ NO TORRENT | NO DDOS | NO BULLSHIT PLS ]
  266. client
  267. dev tun
  268. proto tcp
  269. remote 127.0.0.1 1720
  270. route $MYIP 255.255.255.255 net_gateway
  271. persist-key
  272. persist-tun
  273. pull
  274. resolv-retry infinite
  275. nobind
  276. user nobody
  277. comp-lzo
  278. remote-cert-tls server
  279. verb 3
  280. mute 2
  281. connect-retry 5
  282. connect-retry-max 8020
  283. mute-replay-warnings
  284. redirect-gateway def1
  285. script-security 2
  286. auth-user-pass
  287. cipher none
  288. auth none
  289. ## Uncomment below if you like to do auto-login in mobile
  290. #<auth-user-pass>
  291. #your_username
  292. #your_password
  293. #</auth-user-pass>
  294. END
  295. echo "<ca>" >> /home/vps/public_html/clientssl.ovpn
  296. cat /etc/openvpn/ca.crt >> /home/vps/public_html/clientssl.ovpn
  297. echo "</ca>" >> /home/vps/public_html/clientssl.ovpn
  298. cd /home/vps/public_html
  299. rm -f openvpn.zip
  300. zip openvpn.zip client.ovpn clientssl.ovpn stunnel.conf
  301. clear
  302. echo "OVPN files updated! Download your ovpn file from http://$MYIP/#configs"
  303. echo "Remote proxy was patched successfully updated in your ovpn from VPS!"
  304. sleep 5
  305. ;;
  306. 4)
  307. clear
  308. exit
  309. ;;
  310. esac
  311. done
  312. cd