ohp.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/bin/bash
  2. #Open HTTP Puncher By EvoTeamMalaysia Project
  3. #Direct Proxy Squid For OpenVPN TCP
  4. #Telegram: @EvoTeamMalaysia
  5. RED='\e[1;31m'
  6. GREEN='\e[0;32m'
  7. BLUE='\e[0;34m'
  8. NC='\e[0m'
  9. MYIP=$(wget -qO- https://icanhazip.com);
  10. MYIP2="s/xxxxxxxxx/$MYIP/g";
  11. #Update Repository VPS
  12. clear
  13. apt update
  14. apt-get -y upgrade
  15. #Port Server
  16. #Jika Ingiin Mengubah Port Silahkan Sesuaikan Dengan Port Yang Ada Di VPS Mu
  17. Port_OpenVPN_TCP='1194';
  18. Port_Squid='3128';
  19. Port_OHP='8087';
  20. #Installing ohp Server
  21. cd
  22. wget -O /usr/local/bin/ohp "https://raw.githubusercontent.com/EvoTeamMalaysia/AutoScript/main/ohp"
  23. chmod +x /usr/local/bin/ohp
  24. #Buat File OpenVPN TCP OHP
  25. cat > /etc/openvpn/tcp-ohp.ovpn <<END
  26. ############# WELCOME TO #############
  27. ########## OKKAY KAYYO VPN ############
  28. ###### OKKAY KAYYO OHP SERVER ########
  29. setenv CLIENT_CERT 0
  30. setenv opt block-outside-dns
  31. client
  32. dev tun
  33. proto tcp
  34. remote "bug" 1194
  35. persist-tun
  36. persist-key
  37. persist-remote-ip
  38. comp-lzo
  39. reneg-sec 0
  40. pull
  41. resolv-retry infinite
  42. remote-cert-tls server
  43. verb 3
  44. auth-user-pass
  45. cipher none
  46. auth none
  47. auth-nocache
  48. script-security 2
  49. tls-version-min 1.2
  50. tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
  51. http-proxy xxxxxxxxx 8087
  52. http-proxy-option VERSION 1.1
  53. http-proxy-option CUSTOM-HEADER ""
  54. http-proxy-option CUSTOM-HEADER "Host: "
  55. http-proxy-option CUSTOM-HEADER "X-Forwarded-Host: "
  56. http-proxy-option CUSTOM-HEADER ""
  57. END
  58. sed -i $MYIP2 /etc/openvpn/tcp-ohp.ovpn;
  59. # masukkan certificatenya ke dalam config client TCP 1194
  60. echo '<ca>' >> /etc/openvpn/tcp-ohp.ovpn
  61. cat /etc/openvpn/server/ca.crt >> /etc/openvpn/tcp-ohp.ovpn
  62. echo '</ca>' >> /etc/openvpn/tcp-ohp.ovpn
  63. cp /etc/openvpn/tcp-ohp.ovpn /home/vps/public_html/tcp-ohp.ovpn
  64. clear
  65. cd
  66. #Buat Service Untuk OHP
  67. cat > /etc/systemd/system/ohp.service <<END
  68. [Unit]
  69. Description=Direct Squid Proxy For OpenVPN TCP By OKKAY KAYYO
  70. Documentation=https://okkaykayyo.my
  71. Documentation=https://t.me/okkaykayyo
  72. Wants=network.target
  73. After=network.target
  74. [Service]
  75. ExecStart=/usr/local/bin/ohp -port 8087 -proxy 127.0.0.1:3128 -tunnel 127.0.0.1:1194
  76. Restart=always
  77. RestartSec=3
  78. [Install]
  79. WantedBy=multi-user.target
  80. END
  81. systemctl daemon-reload
  82. systemctl enable ohp
  83. systemctl restart ohp
  84. echo ""
  85. echo -e "${GREEN}Done Installing OHP Server${NC}"
  86. echo -e "Port OVPN OHP TCP: $ohpp"
  87. echo -e "Link Download OVPN OHP: http://$MYIP:81/tcp-ohp.ovpn"
  88. echo -e "Script By EvoTeamMalaysia"