ohp.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash
  2. wget https://github.com/lfasmpao/open-http-puncher/releases/download/0.1/ohpserver-linux32.zip
  3. unzip ohpserver-linux32.zip
  4. rm ohpserver-linux32.zip
  5. mv ohpserver /usr/local/bin/
  6. chmod +x /usr/local/bin/ohpserver
  7. cat > /etc/systemd/system/dropbear-ohp.service << END
  8. [Unit]
  9. Description=DROPBEAR OHP Redirection Service
  10. Documentation=https://t.me/sampiiiiu
  11. After=network.target nss-lookup.target
  12. [Service]
  13. Type=simple
  14. User=root
  15. CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
  16. AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
  17. NoNewPrivileges=true
  18. ExecStart=/usr/local/bin/ohpserver -port 8181 -proxy 127.0.0.1:3128 -tunnel 127.0.0.1:143
  19. Restart=on-failure
  20. LimitNOFILE=infinity
  21. [Install]
  22. WantedBy=multi-user.target
  23. END
  24. cat > /etc/systemd/system/ovpn-ohp.service << END
  25. [Unit]
  26. Description=OpenVPN OHP Redirection Service
  27. Documentation=https://t.me/sampiiiiu
  28. After=network.target nss-lookup.target
  29. [Service]
  30. Type=simple
  31. User=root
  32. CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
  33. AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
  34. NoNewPrivileges=true
  35. ExecStart=/usr/local/bin/ohpserver -port 8282 -proxy 127.0.0.1:3128 -tunnel 127.0.0.1:1194
  36. Restart=on-failure
  37. LimitNOFILE=infinity
  38. [Install]
  39. WantedBy=multi-user.target
  40. END
  41. systemctl enable dropbear-ohp.service
  42. systemctl enable ovpn-ohp.service
  43. systemctl start dropbear-ohp.service
  44. systemctl start ovpn-ohp.service