sodosok.sh 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #!/bin/bash
  2. #shadowsocks-libev obfs install by OkkayKayyo
  3. source /etc/os-release
  4. OS=$ID
  5. ver=$VERSION_ID
  6. #Install_Packages
  7. echo "Install Paket..."
  8. apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev libev-dev asciidoc xmlto automake -y
  9. echo "Install Paket Selesai."
  10. echo "#############################################"
  11. #Install_Shadowsocks_libev
  12. echo "Install Shadowsocks-libev..."
  13. apt-get install software-properties-common -y
  14. if [[ $OS == 'ubuntu' ]]; then
  15. apt install shadowsocks-libev -y
  16. apt install simple-obfs -y
  17. elif [[ $OS == 'debian' ]]; then
  18. if [[ "$ver" = "9" ]]; then
  19. echo "deb http://deb.debian.org/debian stretch-backports main" | tee /etc/apt/sources.list.d/stretch-backports.list
  20. apt update
  21. apt -t stretch-backports install shadowsocks-libev -y
  22. apt -t stretch-backports install simple-obfs -y
  23. elif [[ "$ver" = "10" ]]; then
  24. echo "deb http://deb.debian.org/debian buster-backports main" | tee /etc/apt/sources.list.d/buster-backports.list
  25. apt update
  26. apt -t buster-backports install shadowsocks-libev -y
  27. apt -t buster-backports install simple-obfs -y
  28. fi
  29. fi
  30. echo "Install Shadowsocks-libev Selesai."
  31. echo "#############################################"
  32. #Server konfigurasi
  33. echo "#############################################"
  34. echo "Konfigurasi Server."
  35. cat > /etc/shadowsocks-libev/config.json <<END
  36. {
  37. "server":"0.0.0.0",
  38. "server_port":8488,
  39. "password":"tes",
  40. "timeout":60,
  41. "method":"aes-256-cfb",
  42. "fast_open":true,
  43. "nameserver":"8.8.8.8",
  44. "mode":"tcp_and_udp",
  45. }
  46. END
  47. echo "#############################################"
  48. #mulai ~shadowsocks-libev~ server
  49. echo "#############################################"
  50. echo "mulai ss server"
  51. systemctl enable shadowsocks-libev.service
  52. systemctl start shadowsocks-libev.service
  53. echo "#############################################"
  54. #buat client config
  55. echo "#############################################"
  56. echo "buat config obfs"
  57. cat > /etc/shadowsocks-libev.json <<END
  58. {
  59. "server":"127.0.0.1",
  60. "server_port":8388,
  61. "local_port":1080,
  62. "password":"",
  63. "timeout":60,
  64. "method":"chacha20-ietf-poly1305",
  65. "mode":"tcp_and_udp",
  66. "fast_open":true,
  67. "plugin":"/usr/bin/obfs-local",
  68. "plugin_opts":"obfs=tls;failover=127.0.0.1:1443;fast-open"
  69. }
  70. END
  71. chmod +x /etc/shadowsocks-libev.json
  72. echo -e "">>"/etc/shadowsocks-libev/akun.conf"
  73. echo "Menambahkan Perintah Shadowsocks-libev"
  74. iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 2443:3543 -j ACCEPT
  75. iptables -I INPUT -m state --state NEW -m udp -p udp --dport 2443:3543 -j ACCEPT
  76. iptables-save > /etc/iptables.up.rules
  77. ip6tables-save > /etc/ip6tables.up.rules
  78. cd /usr/bin
  79. wget -O add-ss "https://raw.githubusercontent.com/EvoTeamMalaysia/AutoScript/main/add-ss.sh"
  80. wget -O del-ss "https://raw.githubusercontent.com/EvoTeamMalaysia/AutoScript/main/del-ss.sh"
  81. wget -O cek-ss "https://raw.githubusercontent.com/EvoTeamMalaysia/AutoScript/main/cek-ss.sh"
  82. wget -O renew-ss "https://raw.githubusercontent.com/EvoTeamMalaysia/AutoScript/main/renew-ss.sh"
  83. chmod +x add-ss
  84. chmod +x del-ss
  85. chmod +x cek-ss
  86. chmod +x renew-ss
  87. cd
  88. rm -f /root/sodosok.sh