ohp-ovpn.sh 2.3 KB

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