jhoel99

json

Feb 7th, 2021 (edited)
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 3.68 KB | None | 0 0
  1. apt remove apache2 -y
  2. sudo apt-get update -y && sudo apt-get upgrade
  3. apt install -y sudo curl nano
  4. #!/bin/bash
  5. #Auto Script By : Jhoe Xii
  6. bash <(curl -s -L https://git.io/v2ray.sh)
  7. sudo apt install software-properties-common
  8. sudo add-apt-repository ppa:certbot/certbot
  9. sudo apt-get install certbot -y
  10. dns='s2.gtmnoload.ml';
  11. sudo rm -rf /etc/letsencrypt/{live,renewal,archive}/{$dns,$dns.conf}
  12. sudo certbot certonly --standalone --preferred-challenges http --agree-tos --email codeph99@gmail.com -d $dns
  13.  
  14. cat << EOF > /etc/v2ray/config.json
  15. {
  16.     "log": {
  17.         "access": "/var/log/v2ray/access.log",
  18.         "error": "/var/log/v2ray/error.log",
  19.         "loglevel": "warning"
  20.     },
  21.     "inbounds": [
  22.         {
  23.             "port": 443,
  24.             "protocol": "vmess",
  25.             "settings": {
  26.                 "clients": [
  27.                     {"id": "1630d1f3-3a91-44ac-8d32-8f4e0050b722", "level": 1, "alterId": 44}
  28.                     {
  29.                 ]
  30.             },
  31.             "streamSettings": {
  32.                 "network": "ws",
  33.                 "security": "tls",
  34.              "tlsSettings": {
  35.          "certificates": [
  36.             {
  37.               "certificateFile": "/etc/letsencrypt/live/$dns/cert.pem",
  38.               "keyFile": "/etc/letsencrypt/live/$dns/privkey.pem"
  39.             }
  40.           ],
  41.           "serverName": "$dns"
  42.         },
  43.         "wsSettings": {
  44.           "headers": {},
  45.           "path": "/"
  46.         }
  47.          },
  48.             "sniffing": {
  49.                 "enabled": true,
  50.                 "destOverride": [
  51.                     "http",
  52.                     "tls"
  53.                 ]
  54.             }
  55.         }
  56.         ],
  57.     "outbounds": [
  58.         {
  59.             "protocol": "freedom",
  60.             "settings": {
  61.                 "domainStrategy": "UseIP"
  62.             },
  63.             "tag": "direct"
  64.         },
  65.         {
  66.             "protocol": "blackhole",
  67.             "settings": {},
  68.             "tag": "blocked"
  69.         },
  70.         {
  71.             "protocol": "mtproto",
  72.             "settings": {},
  73.             "tag": "tg-out"
  74.         }
  75.     ],
  76.     "dns": {
  77.         "servers": [
  78.             "https+local://cloudflare-dns.com/dns-query",
  79.             "1.1.1.1",
  80.             "1.0.0.1",
  81.             "8.8.8.8",
  82.             "8.8.4.4",
  83.             "localhost"
  84.         ]
  85.     },
  86.     "routing": {
  87.         "domainStrategy": "IPOnDemand",
  88.         "rules": [
  89.             {
  90.                 "type": "field",
  91.                 "ip": [
  92.                     "0.0.0.0/8",
  93.                     "10.0.0.0/8",
  94.                     "100.64.0.0/10",
  95.                     "127.0.0.0/8",
  96.                     "169.254.0.0/16",
  97.                     "172.16.0.0/12",
  98.                     "192.0.0.0/24",
  99.                     "192.0.2.0/24",
  100.                     "192.168.0.0/16",
  101.                     "198.18.0.0/15",
  102.                     "198.51.100.0/24",
  103.                     "203.0.113.0/24",
  104.                     "::1/128",
  105.                     "fc00::/7",
  106.                     "fe80::/10"
  107.                 ],
  108.                 "outboundTag": "blocked"
  109.             },
  110.             {
  111.                 "type": "field",
  112.                 "inboundTag": ["tg-in"],
  113.                 "outboundTag": "tg-out"
  114.             },
  115.             {
  116.                 "type": "field",
  117.                 "domain": [
  118.                     "domain:epochtimes.com",
  119.                     "domain:epochtimes.com.tw",
  120.                     "domain:epochtimes.fr",
  121.                     "domain:epochtimes.de",
  122.                     "domain:epochtimes.jp",
  123.                     "domain:epochtimes.ru",
  124.                     "domain:epochtimes.co.il",
  125.                     "domain:epochtimes.co.kr",
  126.                     "domain:epochtimes-romania.com",
  127.                     "domain:erabaru.net",
  128.                     "domain:lagranepoca.com",
  129.                     "domain:theepochtimes.com",
  130.                     "domain:ntdtv.com",
  131.                     "domain:ntd.tv",
  132.                     "domain:ntdtv-dc.com",
  133.                     "domain:ntdtv.com.tw",
  134.                     "domain:minghui.org",
  135.                     "domain:renminbao.com",
  136.                     "domain:dafahao.com",
  137.                     "domain:dongtaiwang.com",
  138.                     "domain:falundafa.org",
  139.                     "domain:wujieliulan.com",
  140.                     "domain:ninecommentaries.com",
  141.                     "domain:shenyun.com"
  142.                 ],
  143.                 "outboundTag": "blocked"
  144.             }           ,
  145.                {
  146.                     "type": "field",
  147.                     "protocol": [
  148.                         "bittorrent"
  149.                     ],
  150.                     "outboundTag": "blocked"
  151.                 }
  152.         ]
  153.     },
  154.     "transport": {
  155.         "kcpSettings": {
  156.             "uplinkCapacity": 100,
  157.             "downlinkCapacity": 100,
  158.             "congestion": true
  159.         }
  160.     }
  161. }
  162. EOF
  163.  
  164. apt install -y apache2
  165. service apache restart
  166. service cron restart
  167. v2ray restart
  168.  
Add Comment
Please, Sign In to add comment