Shawn's Blog

蒸汽兔

安装V2ray

字数:4837 字 阅读时长:约 26 分钟 阅读

Howdy!
这是一个网络代理工具, 本文所有内容建议在 root下运行
https://github.com/ShawnJim/net-jumper 一键安装脚本

准备环境

  • docker
  • openresty
  • v2ray
  • acme.sh

安装准备

时间校准

如果客户端时区所在是东八区的话

# 调整时区
$ echo "Asia/Shanghai" > /etc/timezone
# 调整时间
$ rm -rf /etc/localtime
$ ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

docker

sudo yum remove docker \
                docker-client \
                docker-client-latest \
                docker-common \
                docker-latest \
                docker-latest-logrotate \
                docker-logrotate \
                docker-engine

sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker

sudo docker run hello-world

v2ray

仅提供大概步骤,具体明细查阅官网 安装指南

安装

# 执行脚本
$ bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

卸载

$ bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --remove

调整配置

uuid

cat /proc/sys/kernel/random/uuid

config.json

{
  "inbounds": [
    {
      "port": 13792,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "e75695ed-0fe9-4379-b01f-42437c01c3e1",
            "alterId": 0
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
            "path": "/shray_vy"
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}

acme.sh 证书

# !!!! 使用root執行
# 拉取脚本
$ curl https://get.acme.sh | sh -s email=my@example.com

# 如果异常,安装依赖 (大概率缺少 socat )
$ sudo apt-get install openssl cron socat curl

# 生成证书
$ ~/.acme.sh/acme.sh --issue -d 17112312311vp.shop --standalone --keylength ec-256 --force

# 安装证书
$ ~/.acme.sh/acme.sh --installcert -d 17112312311vp.shop --ecc \
                          --fullchain-file /etc/v2ray/v2ray.crt \
                          --key-file /etc/v2ray/v2ray.key

过期后更新证书

# 执行命令后更新证书, 更新完后需要将新证书生成到证书安装目录
$ ~/.acme.sh/acme.sh --renew -d 17112312311vp.shop --force --ecc

openresty

# 拉取容器
$ docker pull shawnjm/openresty:latest

# 运行容器
    $ docker run -e TZ="Asia/Shanghai" --net=host -v /etc/localtime:/etc/localtime:ro -v /mnt/soft/openresty/conf.d/:/etc/nginx/conf.d -v /etc/v2ray/:/etc/v2ray/ -v /mnt/soft/openresty/nginx/html/:/usr/local/openresty/nginx/html/ --name nginx -d c51effc0869f

/etc/v2ray/ 为tls证书所放位置.

其中nginx.conf配置. 所放宿主机位置 /mnt/soft/openresty/conf.d/

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

server {
        server_name  17112312311vp.shop;    #域名        
        listen 80;                         #侦听80端口        
        rewrite ^(.*) https://$server_name$1 permanent;       #${server_name}可以换成$host
}  

server {
  listen 443 ssl;
  listen [::]:443 ssl;

  access_log logs/access.log main;
  
  ssl_certificate       /etc/v2ray/v2ray.crt;
  ssl_certificate_key   /etc/v2ray/v2ray.key;
  ssl_session_timeout 1d;
  ssl_session_cache shared:MozSSL:10m;
  ssl_session_tickets off;
  
  ssl_protocols         TLSv1.2 TLSv1.3;
  ssl_ciphers           ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
  ssl_prefer_server_ciphers off;
  
  server_name           17112312311vp.shop;
  location /shray_vy { # 与 V2Ray 配置中的 path 保持一致    
    if ($http_upgrade != "websocket") { # WebSocket协商失败时返回404
        return 404;
    }
    proxy_redirect off;
    proxy_pass http://127.0.0.1:13792;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    # Show real IP in v2ray access.log
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

订阅地址

vmess 通过v2rayN导出

vmess2clash.yml

port: 7890
socks-port: 7891
redir-port: 7892
allow-lan: true
mode: rule
log-level: info
external-controller: 0.0.0.0:9090
secret: ""
proxies:
  - name: V4-264|新加坡|x2.5
    type: ssr
    server: k6gv.cdn.node.a.tddns-ounk.com
    port: 20264
    cipher: chacha20-ietf
    password: JXpZpq
    protocol: auth_aes128_md5
    protocol-param: 61088:u9sdgtzt4jr
    obfs: tls1.2_ticket_auth
    obfsparam: 740b561088.microsoft.com
  - name: Japan-cloudcone
    type: vmess
    server: 17112312311vp.shop
    port: 443
    uuid: 0a587276-7856-4f3d-97e8-d7790a4383e2
    alterId: "0"
    cipher: auto
    tls: true
    network: ws
    ws-opts:
      path: /ray
proxy-groups:
  - name: Proxy
    type: select
    proxies:
      - V4-264|新加坡|x2.5
      - Japan-cloudcone
  - name: Domestic
    type: select
    proxies:
      - DIRECT
      - Proxy
  - name: AsianTV
    type: select
    proxies:
      - Domestic
      - Proxy
  - name: GlobalTV
    type: select
    proxies:
      - Proxy
  - name: Others
    type: select
    proxies:
      - Proxy
      - Domestic
rules:
  - DOMAIN-KEYWORD,openai,Proxy
  - DOMAIN-SUFFIX,edgedatg.com,GlobalTV
  - DOMAIN-SUFFIX,go.com,GlobalTV
  - DOMAIN,linear-abematv.akamaized.net,GlobalTV
  - DOMAIN-SUFFIX,abema.io,GlobalTV
  - DOMAIN-SUFFIX,abema.tv,GlobalTV
  - DOMAIN-SUFFIX,akamaized.net,GlobalTV
  - DOMAIN-SUFFIX,ameba.jp,GlobalTV
  - DOMAIN-SUFFIX,hayabusa.io,GlobalTV
  - DOMAIN-SUFFIX,aiv-cdn.net,GlobalTV
  - DOMAIN-SUFFIX,amazonaws.com,GlobalTV
  - DOMAIN-SUFFIX,amazonvideo.com,GlobalTV
  - DOMAIN-SUFFIX,llnwd.net,GlobalTV
  - DOMAIN-SUFFIX,bahamut.com.tw,GlobalTV
  - DOMAIN-SUFFIX,gamer.com.tw,GlobalTV
  - DOMAIN-SUFFIX,hinet.net,GlobalTV
  - DOMAIN-KEYWORD,bbcfmt,GlobalTV
  - DOMAIN-KEYWORD,co.uk,GlobalTV
  - DOMAIN-KEYWORD,uk-live,GlobalTV
  - DOMAIN-SUFFIX,bbc.co,GlobalTV
  - DOMAIN-SUFFIX,bbc.co.uk,GlobalTV
  - DOMAIN-SUFFIX,bbc.com,GlobalTV
  - DOMAIN-SUFFIX,bbci.co,GlobalTV
  - DOMAIN-SUFFIX,bbci.co.uk,GlobalTV
  - DOMAIN-SUFFIX,chocotv.com.tw,GlobalTV
  - DOMAIN-KEYWORD,epicgames,GlobalTV
  - DOMAIN-SUFFIX,helpshift.com,GlobalTV
  - DOMAIN-KEYWORD,foxplus,GlobalTV
  - DOMAIN-SUFFIX,config.fox.com,GlobalTV
  - DOMAIN-SUFFIX,emome.net,GlobalTV
  - DOMAIN-SUFFIX,fox.com,GlobalTV
  - DOMAIN-SUFFIX,foxdcg.com,GlobalTV
  - DOMAIN-SUFFIX,foxnow.com,GlobalTV
  - DOMAIN-SUFFIX,foxplus.com,GlobalTV
  - DOMAIN-SUFFIX,foxplay.com,GlobalTV
  - DOMAIN-SUFFIX,ipinfo.io,GlobalTV
  - DOMAIN-SUFFIX,mstage.io,GlobalTV
  - DOMAIN-SUFFIX,now.com,GlobalTV
  - DOMAIN-SUFFIX,theplatform.com,GlobalTV
  - DOMAIN-SUFFIX,urlload.net,GlobalTV
  - DOMAIN-SUFFIX,execute-api.ap-southeast-1.amazonaws.com,GlobalTV
  - DOMAIN-SUFFIX,hbo.com,GlobalTV
  - DOMAIN-SUFFIX,hboasia.com,GlobalTV
  - DOMAIN-SUFFIX,hbogo.com,GlobalTV
  - DOMAIN-SUFFIX,hbogoasia.hk,GlobalTV
  - DOMAIN-SUFFIX,happyon.jp,GlobalTV
  - DOMAIN-SUFFIX,hulu.com,GlobalTV
  - DOMAIN-SUFFIX,huluim.com,GlobalTV
  - DOMAIN-SUFFIX,hulustream.com,GlobalTV
  - DOMAIN-SUFFIX,imkan.tv,GlobalTV
  - DOMAIN-SUFFIX,joox.com,GlobalTV
  - DOMAIN-KEYWORD,nowtv100,GlobalTV
  - DOMAIN-KEYWORD,rthklive,GlobalTV
  - DOMAIN-SUFFIX,mytvsuper.com,GlobalTV
  - DOMAIN-SUFFIX,tvb.com,GlobalTV
  - DOMAIN-SUFFIX,netflix.com,GlobalTV
  - DOMAIN-SUFFIX,netflix.net,GlobalTV
  - DOMAIN-SUFFIX,nflxext.com,GlobalTV
  - DOMAIN-SUFFIX,nflximg.com,GlobalTV
  - DOMAIN-SUFFIX,nflximg.net,GlobalTV
  - DOMAIN-SUFFIX,nflxso.net,GlobalTV
  - DOMAIN-SUFFIX,nflxvideo.net,GlobalTV
  - DOMAIN-SUFFIX,pandora.com,GlobalTV
  - DOMAIN-SUFFIX,sky.com,GlobalTV
  - DOMAIN-SUFFIX,skygo.co.nz,GlobalTV
  - DOMAIN-KEYWORD,spotify,GlobalTV
  - DOMAIN-SUFFIX,scdn.co,GlobalTV
  - DOMAIN-SUFFIX,spoti.fi,GlobalTV
  - DOMAIN-SUFFIX,viu.tv,GlobalTV
  - DOMAIN-KEYWORD,youtube,GlobalTV
  - DOMAIN-SUFFIX,googlevideo.com,GlobalTV
  - DOMAIN-SUFFIX,gvt2.com,GlobalTV
  - DOMAIN-SUFFIX,youtu.be,GlobalTV
  - DOMAIN-KEYWORD,bilibili,AsianTV
  - DOMAIN-SUFFIX,acg.tv,AsianTV
  - DOMAIN-SUFFIX,acgvideo.com,AsianTV
  - DOMAIN-SUFFIX,b23.tv,AsianTV
  - DOMAIN-SUFFIX,biliapi.com,AsianTV
  - DOMAIN-SUFFIX,biliapi.net,AsianTV
  - DOMAIN-SUFFIX,bilibili.com,AsianTV
  - DOMAIN-SUFFIX,biligame.com,AsianTV
  - DOMAIN-SUFFIX,biligame.net,AsianTV
  - DOMAIN-SUFFIX,hdslb.com,AsianTV
  - DOMAIN-SUFFIX,im9.com,AsianTV
  - DOMAIN-KEYWORD,qiyi,AsianTV
  - DOMAIN-SUFFIX,qy.net,AsianTV
  - DOMAIN-SUFFIX,api.mob.app.letv.com,AsianTV
  - DOMAIN-SUFFIX,163yun.com,AsianTV
  - DOMAIN-SUFFIX,music.126.net,AsianTV
  - DOMAIN-SUFFIX,music.163.com,AsianTV
  - DOMAIN-SUFFIX,vv.video.qq.com,AsianTV
  - DOMAIN-SUFFIX,microsoft.com,Domestic
  - DOMAIN-SUFFIX,windows.net,Domestic
  - DOMAIN-SUFFIX,sfx.ms,Domestic
  - DOMAIN-SUFFIX,sharepoint.com,Domestic
  - DOMAIN-KEYWORD,officecdn,Domestic
  - DOMAIN-SUFFIX,blizzard.com,Domestic
  - DOMAIN-SUFFIX,battle.net,Domestic
  - DOMAIN,blzddist1-a.akamaihd.net,Domestic
  - DOMAIN-SUFFIX,steampowered.com,Domestic
  - DOMAIN-SUFFIX,steam-chat.com,Domestic
  - DOMAIN-KEYWORD,steamcdn,Domestic
  - DOMAIN-KEYWORD,steamstore,Domestic
  - DOMAIN-KEYWORD,steamuserimages,Domestic
  - DOMAIN-KEYWORD,steambroadcast,Domestic
  - DOMAIN-SUFFIX,qq.com,Domestic
  - DOMAIN-SUFFIX,qpic.cn,Domestic
  - DOMAIN-SUFFIX,tencent.com,Domestic
  - DOMAIN-SUFFIX,alibaba.com,Domestic
  - DOMAIN-SUFFIX,alicdn.com,Domestic
  - DOMAIN-SUFFIX,amap.com,Domestic
  - DOMAIN-SUFFIX,dingtalk.com,Domestic
  - DOMAIN-SUFFIX,taobao.com,Domestic
  - DOMAIN-SUFFIX,tmall.com,Domestic
  - DOMAIN-SUFFIX,ykimg.com,Domestic
  - DOMAIN-SUFFIX,youku.com,Domestic
  - DOMAIN-SUFFIX,xiami.com,Domestic
  - DOMAIN-SUFFIX,xiami.net,Domestic
  - DOMAIN-SUFFIX,163.com,Domestic
  - DOMAIN-SUFFIX,126.net,Domestic
  - DOMAIN-SUFFIX,163yun.com,Domestic
  - DOMAIN-SUFFIX,sohu.com.cn,Domestic
  - DOMAIN-SUFFIX,itc.cn,Domestic
  - DOMAIN-SUFFIX,sohu.com,Domestic
  - DOMAIN-SUFFIX,v-56.com,Domestic
  - DOMAIN-SUFFIX,weibo.com,Domestic
  - DOMAIN-SUFFIX,weibo.cn,Domestic
  - DOMAIN-SUFFIX,jd.com,Domestic
  - DOMAIN-SUFFIX,jd.hk,Domestic
  - DOMAIN-SUFFIX,360buyimg.com,Domestic
  - DOMAIN-SUFFIX,duokan.com,Domestic
  - DOMAIN-SUFFIX,mi-img.com,Domestic
  - DOMAIN-SUFFIX,mifile.cn,Domestic
  - DOMAIN-SUFFIX,xiaomi.com,Domestic
  - DOMAIN-SUFFIX,acgvideo.com,Domestic
  - DOMAIN-SUFFIX,bilibili.com,Domestic
  - DOMAIN-SUFFIX,hdslb.com,Domestic
  - DOMAIN-SUFFIX,iqiyi.com,Domestic
  - DOMAIN-SUFFIX,iqiyipic.com,Domestic
  - DOMAIN-SUFFIX,71.am.com,Domestic
  - DOMAIN-SUFFIX,hitv.com,Domestic
  - DOMAIN-SUFFIX,mgtv.com,Domestic
  - DOMAIN-SUFFIX,meitu.com,Domestic
  - DOMAIN-SUFFIX,meitudata.com,Domestic
  - DOMAIN-SUFFIX,meipai.com,Domestic
  - DOMAIN-SUFFIX,zmzapi.com,Domestic
  - DOMAIN-SUFFIX,zimuzu.tv,Domestic
  - DOMAIN-SUFFIX,zmzfile.com,Domestic
  - DOMAIN-SUFFIX,zmzapi.net,Domestic
  - DOMAIN-SUFFIX,baduziyuan.com,Domestic
  - DOMAIN-SUFFIX,com-hs-hkdy.com,Domestic
  - DOMAIN-SUFFIX,czybjz.com,Domestic
  - DOMAIN-SUFFIX,dandanzan.com,Domestic
  - DOMAIN-SUFFIX,fjhps.com,Domestic
  - DOMAIN-SUFFIX,kuyunbo.club,Domestic
  - DOMAIN-SUFFIX,baidu.com,Domestic
  - DOMAIN-SUFFIX,baidubcr.com,Domestic
  - DOMAIN-SUFFIX,bdstatic.com,Domestic
  - DOMAIN-SUFFIX,189.cn,Domestic
  - DOMAIN-SUFFIX,21cn.com,Domestic
  - DOMAIN-SUFFIX,bytecdn.cn,Domestic
  - DOMAIN-SUFFIX,pstatp.com,Domestic
  - DOMAIN-SUFFIX,snssdk.com,Domestic
  - DOMAIN-SUFFIX,toutiao.com,Domestic
  - DOMAIN-SUFFIX,akadns.net,Domestic
  - DOMAIN-SUFFIX,chinanetcenter.com,Domestic
  - DOMAIN-SUFFIX,wangsu.com,Domestic
  - DOMAIN-SUFFIX,ipip.net,Domestic
  - DOMAIN-SUFFIX,ip.cn,Domestic
  - DOMAIN-SUFFIX,ip.la,Domestic
  - DOMAIN-SUFFIX,ip-cdn.com,Domestic
  - DOMAIN-SUFFIX,ipv6-test.com,Domestic
  - DOMAIN-SUFFIX,test-ipv6.com,Domestic
  - DOMAIN-SUFFIX,whatismyip.com,Domestic
  - DOMAIN,ip.bjango.com,Domestic
  - DOMAIN-SUFFIX,40017.cn,Domestic
  - DOMAIN-SUFFIX,broadcasthe.net,Domestic
  - DOMAIN-SUFFIX,cailianpress.com,Domestic
  - DOMAIN-SUFFIX,chdbits.co,Domestic
  - DOMAIN-SUFFIX,chushou.tv,Domestic
  - DOMAIN-SUFFIX,cmbchina.com,Domestic
  - DOMAIN-SUFFIX,cmbimg.com,Domestic
  - DOMAIN-SUFFIX,cmct.tv,Domestic
  - DOMAIN-SUFFIX,cmvideo.cn,Domestic
  - DOMAIN-SUFFIX,cnlang.org,Domestic
  - DOMAIN-SUFFIX,doubanio.com,Domestic
  - DOMAIN-SUFFIX,douyu.com,Domestic
  - DOMAIN-SUFFIX,douyucdn.cn,Domestic
  - DOMAIN-SUFFIX,dxycdn.com,Domestic
  - DOMAIN-SUFFIX,hicloud.com,Domestic
  - DOMAIN-SUFFIX,hdchina.org,Domestic
  - DOMAIN-SUFFIX,hdcmct.org,Domestic
  - DOMAIN-SUFFIX,ithome.com,Domestic
  - DOMAIN-SUFFIX,kkmh.com,Domestic
  - DOMAIN-SUFFIX,ksosoft.com,Domestic
  - DOMAIN-SUFFIX,maoyun.tv,Domestic
  - DOMAIN-SUFFIX,meituan.net,Domestic
  - DOMAIN-SUFFIX,mobike.com,Domestic
  - DOMAIN-SUFFIX,mubu.com,Domestic
  - DOMAIN-SUFFIX,myzaker.com,Domestic
  - DOMAIN-SUFFIX,ourbits.club,Domestic
  - DOMAIN-SUFFIX,passthepopcorn.me,Domestic
  - DOMAIN-SUFFIX,paypal.com,Domestic
  - DOMAIN-SUFFIX,paypalobjects.com,Domestic
  - DOMAIN-SUFFIX,privatehd.to,Domestic
  - DOMAIN-SUFFIX,redacted.ch,Domestic
  - DOMAIN-SUFFIX,ruguoapp.com,Domestic
  - DOMAIN-SUFFIX,smzdm.com,Domestic
  - DOMAIN-SUFFIX,sogou.com,Domestic
  - DOMAIN-SUFFIX,teamviewer.com,Domestic
  - DOMAIN-SUFFIX,totheglory.im,Domestic
  - DOMAIN-SUFFIX,tp.m-team.cc,Domestic
  - DOMAIN-SUFFIX,udacity.com,Domestic
  - DOMAIN-SUFFIX,xmcdn.com,Domestic
  - DOMAIN-SUFFIX,yangkeduo.com,Domestic
  - DOMAIN-SUFFIX,zhihu.com,Domestic
  - DOMAIN-SUFFIX,zhimg.com,Domestic
  - DOMAIN-SUFFIX,appspot.com,Proxy
  - DOMAIN-SUFFIX,blogger.com,Proxy
  - DOMAIN-SUFFIX,getoutline.org,Proxy
  - DOMAIN-SUFFIX,gvt0.com,Proxy
  - DOMAIN-SUFFIX,gvt1.com,Proxy
  - DOMAIN-SUFFIX,gvt3.com,Proxy
  - DOMAIN-SUFFIX,xn--ngstr-lra8j.com,Proxy
  - DOMAIN-KEYWORD,google,Proxy
  - DOMAIN-KEYWORD,blogspot,Proxy
  - DOMAIN-SUFFIX,cdninstagram.com,Proxy
  - DOMAIN-SUFFIX,fb.com,Proxy
  - DOMAIN-SUFFIX,fb.me,Proxy
  - DOMAIN-SUFFIX,fbaddins.com,Proxy
  - DOMAIN-SUFFIX,fbcdn.net,Proxy
  - DOMAIN-SUFFIX,fbsbx.com,Proxy
  - DOMAIN-SUFFIX,fbworkmail.com,Proxy
  - DOMAIN-SUFFIX,instagram.com,Proxy
  - DOMAIN-SUFFIX,m.me,Proxy
  - DOMAIN-SUFFIX,messenger.com,Proxy
  - DOMAIN-SUFFIX,oculus.com,Proxy
  - DOMAIN-SUFFIX,oculuscdn.com,Proxy
  - DOMAIN-SUFFIX,rocksdb.org,Proxy
  - DOMAIN-SUFFIX,whatsapp.com,Proxy
  - DOMAIN-SUFFIX,whatsapp.net,Proxy
  - DOMAIN-KEYWORD,facebook,Proxy
  - DOMAIN-SUFFIX,pscp.tv,Proxy
  - DOMAIN-SUFFIX,periscope.tv,Proxy
  - DOMAIN-SUFFIX,t.co,Proxy
  - DOMAIN-SUFFIX,twimg.co,Proxy
  - DOMAIN-SUFFIX,twimg.com,Proxy
  - DOMAIN-SUFFIX,twitpic.com,Proxy
  - DOMAIN-SUFFIX,vine.co,Proxy
  - DOMAIN-KEYWORD,twitter,Proxy
  - DOMAIN-SUFFIX,t.me,Proxy
  - DOMAIN-SUFFIX,tdesktop.com,Proxy
  - DOMAIN-SUFFIX,telegra.ph,Proxy
  - DOMAIN-SUFFIX,telegram.me,Proxy
  - DOMAIN-SUFFIX,telegram.org,Proxy
  - DOMAIN-SUFFIX,line.me,Proxy
  - DOMAIN-SUFFIX,line-apps.com,Proxy
  - DOMAIN-SUFFIX,line-scdn.net,Proxy
  - DOMAIN-SUFFIX,naver.jp,Proxy
  - DOMAIN-SUFFIX,4shared.com,Proxy
  - DOMAIN-SUFFIX,881903.com,Proxy
  - DOMAIN-SUFFIX,abc.net.au,Proxy
  - DOMAIN-SUFFIX,abebooks.com,Proxy
  - DOMAIN-SUFFIX,amazon.co.jp,Proxy
  - DOMAIN-SUFFIX,apigee.com,Proxy
  - DOMAIN-SUFFIX,apk-dl.com,Proxy
  - DOMAIN-SUFFIX,apkmirror.com,Proxy
  - DOMAIN-SUFFIX,apkmonk.com,Proxy
  - DOMAIN-SUFFIX,apkpure.com,Proxy
  - DOMAIN-SUFFIX,aptoide.com,Proxy
  - DOMAIN-SUFFIX,archive.is,Proxy
  - DOMAIN-SUFFIX,archive.org,Proxy
  - DOMAIN-SUFFIX,arte.tv,Proxy
  - DOMAIN-SUFFIX,ask.com,Proxy
  - DOMAIN-SUFFIX,avgle.com,Proxy
  - DOMAIN-SUFFIX,badoo.com,Proxy
  - DOMAIN-SUFFIX,bandwagonhost.com,Proxy
  - DOMAIN-SUFFIX,bbc.com,Proxy
  - DOMAIN-SUFFIX,behance.net,Proxy
  - DOMAIN-SUFFIX,bibox.com,Proxy
  - DOMAIN-SUFFIX,biggo.com.tw,Proxy
  - DOMAIN-SUFFIX,binance.com,Proxy
  - DOMAIN-SUFFIX,bitcointalk.org,Proxy
  - DOMAIN-SUFFIX,bitfinex.com,Proxy
  - DOMAIN-SUFFIX,bitmex.com,Proxy
  - DOMAIN-SUFFIX,bit-z.com,Proxy
  - DOMAIN-SUFFIX,bloglovin.com,Proxy
  - DOMAIN-SUFFIX,bloomberg.cn,Proxy
  - DOMAIN-SUFFIX,bloomberg.com,Proxy
  - DOMAIN-SUFFIX,book.com.tw,Proxy
  - DOMAIN-SUFFIX,booklive.jp,Proxy
  - DOMAIN-SUFFIX,books.com.tw,Proxy
  - DOMAIN-SUFFIX,box.com,Proxy
  - DOMAIN-SUFFIX,brookings.edu,Proxy
  - DOMAIN-SUFFIX,businessinsider.com,Proxy
  - DOMAIN-SUFFIX,bwh1.net,Proxy
  - DOMAIN-SUFFIX,castbox.fm,Proxy
  - DOMAIN-SUFFIX,cbc.ca,Proxy
  - DOMAIN-SUFFIX,cdw.com,Proxy
  - DOMAIN-SUFFIX,change.org,Proxy
  - DOMAIN-SUFFIX,ck101.com,Proxy
  - DOMAIN-SUFFIX,clarionproject.org,Proxy
  - DOMAIN-SUFFIX,clyp.it,Proxy
  - DOMAIN-SUFFIX,cna.com.tw,Proxy
  - DOMAIN-SUFFIX,comparitech.com,Proxy
  - DOMAIN-SUFFIX,conoha.jp,Proxy
  - DOMAIN-SUFFIX,crucial.com,Proxy
  - DOMAIN-SUFFIX,cts.com.tw,Proxy
  - DOMAIN-SUFFIX,cw.com.tw,Proxy
  - DOMAIN-SUFFIX,cyberctm.com,Proxy
  - DOMAIN-SUFFIX,dailymotion.com,Proxy
  - DOMAIN-SUFFIX,dailyview.tw,Proxy
  - DOMAIN-SUFFIX,daum.net,Proxy
  - DOMAIN-SUFFIX,daumcdn.net,Proxy
  - DOMAIN-SUFFIX,dcard.tw,Proxy
  - DOMAIN-SUFFIX,deepdiscount.com,Proxy
  - DOMAIN-SUFFIX,deezer.com,Proxy
  - DOMAIN-SUFFIX,depositphotos.com,Proxy
  - DOMAIN-SUFFIX,disconnect.me,Proxy
  - DOMAIN-SUFFIX,discordapp.com,Proxy
  - DOMAIN-SUFFIX,discordapp.net,Proxy
  - DOMAIN-SUFFIX,disqus.com,Proxy
  - DOMAIN-SUFFIX,dns2go.com,Proxy
  - DOMAIN-SUFFIX,dropbox.com,Proxy
  - DOMAIN-SUFFIX,dropboxusercontent.com,Proxy
  - DOMAIN-SUFFIX,duckduckgo.com,Proxy
  - DOMAIN-SUFFIX,dw.com,Proxy
  - DOMAIN-SUFFIX,dynu.com,Proxy
  - DOMAIN-SUFFIX,earthcam.com,Proxy
  - DOMAIN-SUFFIX,ebookservice.tw,Proxy
  - DOMAIN-SUFFIX,economist.com,Proxy
  - DOMAIN-SUFFIX,edgecastcdn.net,Proxy
  - DOMAIN-SUFFIX,edu,Proxy
  - DOMAIN-SUFFIX,elpais.com,Proxy
  - DOMAIN-SUFFIX,enanyang.my,Proxy
  - DOMAIN-SUFFIX,euronews.com,Proxy
  - DOMAIN-SUFFIX,feedly.com,Proxy
  - DOMAIN-SUFFIX,files.wordpress.com,Proxy
  - DOMAIN-SUFFIX,flickr.com,Proxy
  - DOMAIN-SUFFIX,flitto.com,Proxy
  - DOMAIN-SUFFIX,foreignpolicy.com,Proxy
  - DOMAIN-SUFFIX,friday.tw,Proxy
  - DOMAIN-SUFFIX,gate.io,Proxy
  - DOMAIN-SUFFIX,getlantern.org,Proxy
  - DOMAIN-SUFFIX,getsync.com,Proxy
  - DOMAIN-SUFFIX,globalvoices.org,Proxy
  - DOMAIN-SUFFIX,goo.ne.jp,Proxy
  - DOMAIN-SUFFIX,goodreads.com,Proxy
  - DOMAIN-SUFFIX,gov.tw,Proxy
  - DOMAIN-SUFFIX,gumroad.com,Proxy
  - DOMAIN-SUFFIX,hbg.com,Proxy
  - DOMAIN-SUFFIX,hightail.com,Proxy
  - DOMAIN-SUFFIX,hk01.com,Proxy
  - DOMAIN-SUFFIX,hkbf.org,Proxy
  - DOMAIN-SUFFIX,hkbookcity.com,Proxy
  - DOMAIN-SUFFIX,hkej.com,Proxy
  - DOMAIN-SUFFIX,hket.com,Proxy
  - DOMAIN-SUFFIX,hkgolden.com,Proxy
  - DOMAIN-SUFFIX,hootsuite.com,Proxy
  - DOMAIN-SUFFIX,hudson.org,Proxy
  - DOMAIN-SUFFIX,huobi.pro,Proxy
  - DOMAIN-SUFFIX,initiummall.com,Proxy
  - DOMAIN-SUFFIX,ipfs.io,Proxy
  - DOMAIN-SUFFIX,issuu.com,Proxy
  - DOMAIN-SUFFIX,japantimes.co.jp,Proxy
  - DOMAIN-SUFFIX,jiji.com,Proxy
  - DOMAIN-SUFFIX,jinx.com,Proxy
  - DOMAIN-SUFFIX,jkforum.net,Proxy
  - DOMAIN-SUFFIX,joinmastodon.org,Proxy
  - DOMAIN-SUFFIX,kakao.com,Proxy
  - DOMAIN-SUFFIX,lihkg.com,Proxy
  - DOMAIN-SUFFIX,live.com,Proxy
  - DOMAIN-SUFFIX,mail.ru,Proxy
  - DOMAIN-SUFFIX,matters.news,Proxy
  - DOMAIN-SUFFIX,medium.com,Proxy
  - DOMAIN-SUFFIX,mega.nz,Proxy
  - DOMAIN-SUFFIX,mil,Proxy
  - DOMAIN-SUFFIX,mobile01.com,Proxy
  - DOMAIN-SUFFIX,naver.com,Proxy
  - DOMAIN-SUFFIX,nikkei.com,Proxy
  - DOMAIN-SUFFIX,nofile.io,Proxy
  - DOMAIN-SUFFIX,now.com,Proxy
  - DOMAIN-SUFFIX,nyt.com,Proxy
  - DOMAIN-SUFFIX,nytchina.com,Proxy
  - DOMAIN-SUFFIX,nytcn.me,Proxy
  - DOMAIN-SUFFIX,nytco.com,Proxy
  - DOMAIN-SUFFIX,nytimes.com,Proxy
  - DOMAIN-SUFFIX,nytimg.com,Proxy
  - DOMAIN-SUFFIX,nytlog.com,Proxy
  - DOMAIN-SUFFIX,nytstyle.com,Proxy
  - DOMAIN-SUFFIX,ok.ru,Proxy
  - DOMAIN-SUFFIX,okex.com,Proxy
  - DOMAIN-SUFFIX,pcloud.com,Proxy
  - DOMAIN-SUFFIX,pinimg.com,Proxy
  - DOMAIN-SUFFIX,pixiv.net,Proxy
  - DOMAIN-SUFFIX,pornhub.com,Proxy
  - DOMAIN-SUFFIX,pureapk.com,Proxy
  - DOMAIN-SUFFIX,quora.com,Proxy
  - DOMAIN-SUFFIX,quoracdn.net,Proxy
  - DOMAIN-SUFFIX,rakuten.co.jp,Proxy
  - DOMAIN-SUFFIX,reddit.com,Proxy
  - DOMAIN-SUFFIX,redditmedia.com,Proxy
  - DOMAIN-SUFFIX,resilio.com,Proxy
  - DOMAIN-SUFFIX,reuters.com,Proxy
  - DOMAIN-SUFFIX,scmp.com,Proxy
  - DOMAIN-SUFFIX,scribd.com,Proxy
  - DOMAIN-SUFFIX,seatguru.com,Proxy
  - DOMAIN-SUFFIX,shadowsocks.org,Proxy
  - DOMAIN-SUFFIX,slideshare.net,Proxy
  - DOMAIN-SUFFIX,soundcloud.com,Proxy
  - DOMAIN-SUFFIX,startpage.com,Proxy
  - DOMAIN-SUFFIX,steamcommunity.com,Proxy
  - DOMAIN-SUFFIX,steemit.com,Proxy
  - DOMAIN-SUFFIX,t66y.com,Proxy
  - DOMAIN-SUFFIX,teco-hk.org,Proxy
  - DOMAIN-SUFFIX,teco-mo.org,Proxy
  - DOMAIN-SUFFIX,teddysun.com,Proxy
  - DOMAIN-SUFFIX,theinitium.com,Proxy
  - DOMAIN-SUFFIX,tineye.com,Proxy
  - DOMAIN-SUFFIX,torproject.org,Proxy
  - DOMAIN-SUFFIX,tumblr.com,Proxy
  - DOMAIN-SUFFIX,turbobit.net,Proxy
  - DOMAIN-SUFFIX,twitch.tv,Proxy
  - DOMAIN-SUFFIX,udn.com,Proxy
  - DOMAIN-SUFFIX,unseen.is,Proxy
  - DOMAIN-SUFFIX,upmedia.mg,Proxy
  - DOMAIN-SUFFIX,uptodown.com,Proxy
  - DOMAIN-SUFFIX,ustream.tv,Proxy
  - DOMAIN-SUFFIX,uwants.com,Proxy
  - DOMAIN-SUFFIX,v2ray.com,Proxy
  - DOMAIN-SUFFIX,viber.com,Proxy
  - DOMAIN-SUFFIX,videopress.com,Proxy
  - DOMAIN-SUFFIX,vimeo.com,Proxy
  - DOMAIN-SUFFIX,voxer.com,Proxy
  - DOMAIN-SUFFIX,vzw.com,Proxy
  - DOMAIN-SUFFIX,w3schools.com,Proxy
  - DOMAIN-SUFFIX,wattpad.com,Proxy
  - DOMAIN-SUFFIX,whoer.net,Proxy
  - DOMAIN-SUFFIX,wikimapia.org,Proxy
  - DOMAIN-SUFFIX,wikipedia.org,Proxy
  - DOMAIN-SUFFIX,wire.com,Proxy
  - DOMAIN-SUFFIX,worldcat.org,Proxy
  - DOMAIN-SUFFIX,wsj.com,Proxy
  - DOMAIN-SUFFIX,wsj.net,Proxy
  - DOMAIN-SUFFIX,xboxlive.com,Proxy
  - DOMAIN-SUFFIX,xvideos.com,Proxy
  - DOMAIN-SUFFIX,yahoo.com,Proxy
  - DOMAIN-SUFFIX,yesasia.com,Proxy
  - DOMAIN-SUFFIX,yes-news.com,Proxy
  - DOMAIN-SUFFIX,yomiuri.co.jp,Proxy
  - DOMAIN-SUFFIX,you-get.org,Proxy
  - DOMAIN-SUFFIX,zb.com,Proxy
  - DOMAIN-SUFFIX,zello.com,Proxy
  - DOMAIN-SUFFIX,zeronet.io,Proxy
  - DOMAIN,cdn-images.mailchimp.com,Proxy
  - DOMAIN,id.heroku.com,Proxy
  - DOMAIN-KEYWORD,github,Proxy
  - DOMAIN-KEYWORD,jav,Proxy
  - DOMAIN-KEYWORD,pinterest,Proxy
  - DOMAIN-KEYWORD,porn,Proxy
  - DOMAIN-KEYWORD,wikileaks,Proxy
  - DOMAIN-SUFFIX,apartmentratings.com,Proxy
  - DOMAIN-SUFFIX,apartments.com,Proxy
  - DOMAIN-SUFFIX,bankmobilevibe.com,Proxy
  - DOMAIN-SUFFIX,bing.com,Proxy
  - DOMAIN-SUFFIX,booktopia.com.au,Proxy
  - DOMAIN-SUFFIX,centauro.com.br,Proxy
  - DOMAIN-SUFFIX,clearsurance.com,Proxy
  - DOMAIN-SUFFIX,costco.com,Proxy
  - DOMAIN-SUFFIX,crackle.com,Proxy
  - DOMAIN-SUFFIX,depositphotos.cn,Proxy
  - DOMAIN-SUFFIX,dish.com,Proxy
  - DOMAIN-SUFFIX,dmm.co.jp,Proxy
  - DOMAIN-SUFFIX,dmm.com,Proxy
  - DOMAIN-SUFFIX,dnvod.tv,Proxy
  - DOMAIN-SUFFIX,esurance.com,Proxy
  - DOMAIN-SUFFIX,extmatrix.com,Proxy
  - DOMAIN-SUFFIX,fastpic.ru,Proxy
  - DOMAIN-SUFFIX,flipboard.com,Proxy
  - DOMAIN-SUFFIX,fnac.be,Proxy
  - DOMAIN-SUFFIX,fnac.com,Proxy
  - DOMAIN-SUFFIX,funkyimg.com,Proxy
  - DOMAIN-SUFFIX,fxnetworks.com,Proxy
  - DOMAIN-SUFFIX,gettyimages.com,Proxy
  - DOMAIN-SUFFIX,jcpenney.com,Proxy
  - DOMAIN-SUFFIX,kknews.cc,Proxy
  - DOMAIN-SUFFIX,nationwide.com,Proxy
  - DOMAIN-SUFFIX,nbc.com,Proxy
  - DOMAIN-SUFFIX,nordstrom.com,Proxy
  - DOMAIN-SUFFIX,nordstromimage.com,Proxy
  - DOMAIN-SUFFIX,nordstromrack.com,Proxy
  - DOMAIN-SUFFIX,read01.com,Proxy
  - DOMAIN-SUFFIX,superpages.com,Proxy
  - DOMAIN-SUFFIX,target.com,Proxy
  - DOMAIN-SUFFIX,thinkgeek.com,Proxy
  - DOMAIN-SUFFIX,tracfone.com,Proxy
  - DOMAIN-SUFFIX,uploader.jp,Proxy
  - DOMAIN-SUFFIX,vevo.com,Proxy
  - DOMAIN-SUFFIX,viu.tv,Proxy
  - DOMAIN-SUFFIX,vk.com,Proxy
  - DOMAIN-SUFFIX,vsco.co,Proxy
  - DOMAIN-SUFFIX,xfinity.com,Proxy
  - DOMAIN-SUFFIX,zattoo.com,Proxy
  - DOMAIN,abc.com,Proxy
  - DOMAIN,abc.go.com,Proxy
  - DOMAIN,abc.net.au,Proxy
  - DOMAIN,wego.here.com,Proxy
  - DOMAIN-SUFFIX,appsto.re,Proxy
  - DOMAIN,beta.itunes.apple.com,Proxy
  - DOMAIN,books.itunes.apple.com,Proxy
  - DOMAIN,hls.itunes.apple.com,Proxy
  - DOMAIN,itunes.apple.com,Proxy
  - DOMAIN,api-glb-sea.smoot.apple.com,Proxy
  - DOMAIN,lookup-api.apple.com,Proxy
  - DOMAIN-SUFFIX,abc.xyz,Proxy
  - DOMAIN-SUFFIX,android.com,Proxy
  - DOMAIN-SUFFIX,androidify.com,Proxy
  - DOMAIN-SUFFIX,dialogflow.com,Proxy
  - DOMAIN-SUFFIX,autodraw.com,Proxy
  - DOMAIN-SUFFIX,capitalg.com,Proxy
  - DOMAIN-SUFFIX,certificate-transparency.org,Proxy
  - DOMAIN-SUFFIX,chrome.com,Proxy
  - DOMAIN-SUFFIX,chromeexperiments.com,Proxy
  - DOMAIN-SUFFIX,chromestatus.com,Proxy
  - DOMAIN-SUFFIX,chromium.org,Proxy
  - DOMAIN-SUFFIX,creativelab5.com,Proxy
  - DOMAIN-SUFFIX,debug.com,Proxy
  - DOMAIN-SUFFIX,deepmind.com,Proxy
  - DOMAIN-SUFFIX,firebaseio.com,Proxy
  - DOMAIN-SUFFIX,getmdl.io,Proxy
  - DOMAIN-SUFFIX,ggpht.com,Proxy
  - DOMAIN-SUFFIX,gmail.com,Proxy
  - DOMAIN-SUFFIX,gmodules.com,Proxy
  - DOMAIN-SUFFIX,godoc.org,Proxy
  - DOMAIN-SUFFIX,golang.org,Proxy
  - DOMAIN-SUFFIX,gstatic.com,Proxy
  - DOMAIN-SUFFIX,gv.com,Proxy
  - DOMAIN-SUFFIX,gwtproject.org,Proxy
  - DOMAIN-SUFFIX,itasoftware.com,Proxy
  - DOMAIN-SUFFIX,madewithcode.com,Proxy
  - DOMAIN-SUFFIX,material.io,Proxy
  - DOMAIN-SUFFIX,polymer-project.org,Proxy
  - DOMAIN-SUFFIX,admin.recaptcha.net,Proxy
  - DOMAIN-SUFFIX,recaptcha.net,Proxy
  - DOMAIN-SUFFIX,shattered.io,Proxy
  - DOMAIN-SUFFIX,synergyse.com,Proxy
  - DOMAIN-SUFFIX,tensorflow.org,Proxy
  - DOMAIN-SUFFIX,tiltbrush.com,Proxy
  - DOMAIN-SUFFIX,waveprotocol.org,Proxy
  - DOMAIN-SUFFIX,waymo.com,Proxy
  - DOMAIN-SUFFIX,webmproject.org,Proxy
  - DOMAIN-SUFFIX,webrtc.org,Proxy
  - DOMAIN-SUFFIX,whatbrowser.org,Proxy
  - DOMAIN-SUFFIX,widevine.com,Proxy
  - DOMAIN-SUFFIX,x.company,Proxy
  - DOMAIN-SUFFIX,youtu.be,Proxy
  - DOMAIN-SUFFIX,yt.be,Proxy
  - DOMAIN-SUFFIX,ytimg.com,Proxy
  - DOMAIN,media.steampowered.com,Proxy
  - DOMAIN,store.steampowered.com,Proxy
  - DOMAIN-SUFFIX,0rz.tw,Proxy
  - DOMAIN-SUFFIX,4bluestones.biz,Proxy
  - DOMAIN-SUFFIX,9bis.net,Proxy
  - DOMAIN-SUFFIX,allconnected.co,Proxy
  - DOMAIN-SUFFIX,amazonaws.com,Proxy
  - DOMAIN-SUFFIX,aol.com,Proxy
  - DOMAIN-SUFFIX,bcc.com.tw,Proxy
  - DOMAIN-SUFFIX,bit.ly,Proxy
  - DOMAIN-SUFFIX,bitshare.com,Proxy
  - DOMAIN-SUFFIX,blog.jp,Proxy
  - DOMAIN-SUFFIX,blogimg.jp,Proxy
  - DOMAIN-SUFFIX,blogtd.org,Proxy
  - DOMAIN-SUFFIX,broadcast.co.nz,Proxy
  - DOMAIN-SUFFIX,camfrog.com,Proxy
  - DOMAIN-SUFFIX,cfos.de,Proxy
  - DOMAIN-SUFFIX,citypopulation.de,Proxy
  - DOMAIN-SUFFIX,cloudfront.net,Proxy
  - DOMAIN-SUFFIX,ctitv.com.tw,Proxy
  - DOMAIN-SUFFIX,cuhk.edu.hk,Proxy
  - DOMAIN-SUFFIX,cusu.hk,Proxy
  - DOMAIN-SUFFIX,discuss.com.hk,Proxy
  - DOMAIN-SUFFIX,dropboxapi.com,Proxy
  - DOMAIN-SUFFIX,edditstatic.com,Proxy
  - DOMAIN-SUFFIX,flickriver.com,Proxy
  - DOMAIN-SUFFIX,focustaiwan.tw,Proxy
  - DOMAIN-SUFFIX,free.fr,Proxy
  - DOMAIN-SUFFIX,ftchinese.com,Proxy
  - DOMAIN-SUFFIX,gigacircle.com,Proxy
  - DOMAIN-SUFFIX,gov,Proxy
  - DOMAIN-SUFFIX,hk-pub.com,Proxy
  - DOMAIN-SUFFIX,hosting.co.uk,Proxy
  - DOMAIN-SUFFIX,hwcdn.net,Proxy
  - DOMAIN-SUFFIX,jtvnw.net,Proxy
  - DOMAIN-SUFFIX,linksalpha.com,Proxy
  - DOMAIN-SUFFIX,manyvids.com,Proxy
  - DOMAIN-SUFFIX,myactimes.com,Proxy
  - DOMAIN-SUFFIX,newsblur.com,Proxy
  - DOMAIN-SUFFIX,now.im,Proxy
  - DOMAIN-SUFFIX,redditlist.com,Proxy
  - DOMAIN-SUFFIX,signal.org,Proxy
  - DOMAIN-SUFFIX,sparknotes.com,Proxy
  - DOMAIN-SUFFIX,streetvoice.com,Proxy
  - DOMAIN-SUFFIX,ttvnw.net,Proxy
  - DOMAIN-SUFFIX,tv.com,Proxy
  - DOMAIN-SUFFIX,twitchcdn.net,Proxy
  - DOMAIN-SUFFIX,typepad.com,Proxy
  - DOMAIN-SUFFIX,udnbkk.com,Proxy
  - DOMAIN-SUFFIX,whispersystems.org,Proxy
  - DOMAIN-SUFFIX,wikia.com,Proxy
  - DOMAIN-SUFFIX,wn.com,Proxy
  - DOMAIN-SUFFIX,wolframalpha.com,Proxy
  - DOMAIN-SUFFIX,x-art.com,Proxy
  - DOMAIN-SUFFIX,yimg.com,Proxy
  - DOMAIN-KEYWORD,dlercloud,Proxy
  - DOMAIN-SUFFIX,dler.cloud,Proxy
  - DOMAIN-KEYWORD,announce,DIRECT
  - DOMAIN-KEYWORD,torrent,DIRECT
  - DOMAIN-KEYWORD,tracker,DIRECT
  - DOMAIN-SUFFIX,smtp,DIRECT
  - DOMAIN-SUFFIX,local,DIRECT
  - IP-CIDR,192.168.0.0/16,DIRECT
  - IP-CIDR,10.0.0.0/8,DIRECT
  - IP-CIDR,172.16.0.0/12,DIRECT
  - IP-CIDR,127.0.0.0/8,DIRECT
  - IP-CIDR,100.64.0.0/10,DIRECT
  - IP-CIDR,101.227.0.0/16,AsianTV
  - IP-CIDR,101.224.0.0/13,AsianTV
  - IP-CIDR,119.176.0.0/12,AsianTV
  - IP-CIDR,106.11.0.0/16,AsianTV
  - IP-CIDR,67.198.55.0/24,Proxy
  - IP-CIDR,91.108.4.0/22,Proxy
  - IP-CIDR,91.108.8.0/22,Proxy
  - IP-CIDR,91.108.12.0/22,Proxy
  - IP-CIDR,91.108.16.0/22,Proxy
  - IP-CIDR,91.108.56.0/22,Proxy
  - IP-CIDR,109.239.140.0/24,Proxy
  - IP-CIDR,149.154.160.0/20,Proxy
  - IP-CIDR,205.172.60.0/22,Proxy
  - IP-CIDR,35.190.247.0/24,Proxy
  - IP-CIDR,64.233.160.0/19,Proxy
  - IP-CIDR,66.102.0.0/20,Proxy
  - IP-CIDR,66.249.80.0/20,Proxy
  - IP-CIDR,72.14.192.0/18,Proxy
  - IP-CIDR,74.125.0.0/16,Proxy
  - IP-CIDR,108.177.8.0/21,Proxy
  - IP-CIDR,172.217.0.0/16,Proxy
  - IP-CIDR,173.194.0.0/16,Proxy
  - IP-CIDR,209.85.128.0/17,Proxy
  - IP-CIDR,216.58.192.0/19,Proxy
  - IP-CIDR,216.239.32.0/19,Proxy
  - IP-CIDR,31.13.24.0/21,Proxy
  - IP-CIDR,31.13.64.0/18,Proxy
  - IP-CIDR,45.64.40.0/22,Proxy
  - IP-CIDR,66.220.144.0/20,Proxy
  - IP-CIDR,69.63.176.0/20,Proxy
  - IP-CIDR,69.171.224.0/19,Proxy
  - IP-CIDR,74.119.76.0/22,Proxy
  - IP-CIDR,103.4.96.0/22,Proxy
  - IP-CIDR,129.134.0.0/17,Proxy
  - IP-CIDR,157.240.0.0/17,Proxy
  - IP-CIDR,173.252.64.0/19,Proxy
  - IP-CIDR,173.252.96.0/19,Proxy
  - IP-CIDR,179.60.192.0/22,Proxy
  - IP-CIDR,185.60.216.0/22,Proxy
  - IP-CIDR,204.15.20.0/22,Proxy
  - IP-CIDR,69.195.160.0/19,Proxy
  - IP-CIDR,104.244.42.0/21,Proxy
  - IP-CIDR,192.133.76.0/22,Proxy
  - IP-CIDR,199.16.156.0/22,Proxy
  - IP-CIDR,199.59.148.0/22,Proxy
  - IP-CIDR,199.96.56.0/21,Proxy
  - IP-CIDR,202.160.128.0/22,Proxy
  - IP-CIDR,209.237.192.0/19,Proxy
  - GEOIP,CN,Domestic
  - MATCH,Others

vmess订阅json, 将该json base64编码后拼接 vmess:// 再次base64编码得到最终订阅文本.

sv2_vmess.txt

{"ps":"japan-vmess","add":"17112312311vp.shop","port":"42355","id":"0a587276-7856-4f3d-97e8-d7790a4383e2","aid":"0","scy":"none","net":"ws","type":"","host":"","path":"/sv2_proxy","tls":"tls","allowInsecure":false,"v":"2","protocol":"vmess"}

自动刷新端口脚本

依赖 rinetd 实现tcp连接的重定向

rinetd (过时的,可使用iptables 代替)

安装

# 克隆代码仓库
$ git clone https://github.com/ShawnJim/rinetd.git
# 创建配置文件
$ ./bootstrap
# 创建构建文件
$ ./configure
# 构建
$ make
# 安装 (需root执行)
$ make install
# 获取详细信息
$ man rinetd

代理配置

rinetd.conf

#
# this is the configuration file for rinetd, the internet redirection server
#
# you may specify global allow and deny rules here
# only ip addresses are matched, hostnames cannot be specified here
# the wildcards you may use are * and ?
#
# allow 192.168.2.*
# deny 192.168.2.1?
# allow fe80:*
# deny 2001:618:*:e43f


#
# forwarding rules come here
#
# you may specify allow and deny rules after a specific forwarding rule
# to apply to only that forwarding rule
#
# bindadress  bindport  connectaddress  connectport  options...
# 0.0.0.0     80        192.168.1.2     80
# ::1         80        192.168.1.2     80
# 0.0.0.0     80        fe80::1         80
# 127.0.0.1   4000      127.0.0.1       3000
# 127.0.0.1   4000/udp  127.0.0.1       22           [timeout=1200]
# 127.0.0.1   8000/udp  192.168.1.2     8000/udp     [src=192.168.1.2,timeout=1200]

auto_refresh_v2ray_porter.sh

#!/bin/bash

current_v2ray_port_path=~/web_rinetd_control/current_v2ray_port.txt

# 订阅配置地址
clash_2_vmess_conf_path=/mnt/soft/openresty/nginx/html/vmess2clash.yml
vmess_subscribe_conf_path=/mnt/soft/openresty/nginx/html/sv2_vmess.txt

# 获取当前维护端口
current_v2ray_port=$(cat $current_v2ray_port_path)
echo "当前维护端口: $current_v2ray_port"

# 将当前维护端口+1创建更新端口
((upgrade_port=current_v2ray_port+1))
echo "替换端口为: $upgrade_port"

# 删除旧 iptables 转发规则
sudo iptables -t nat -L --line-numbers | grep $current_v2ray_port | awk '{print $1}' | xargs -I {} sudo iptables -t nat -D PREROUTING {}

# iptables 转发调整
sudo iptables -t nat -A PREROUTING -p tcp --dport $upgrade_port -j REDIRECT --to-port 443

# 调整clash订阅链接
sed -i "s/$current_v2ray_port/$upgrade_port/g" $clash_2_vmess_conf_path

# 调整Vmess订阅链接
# 节点1
subscribe_txt="{\"ps\":\"japan-vmess\",\"add\":\"17112312311vp.shop\",\"port\":\"$upgrade_port\",\"id\":\"9c9004c5-f053-4cae-9e24-7a7ae5b422c3\",\"aid\":\"0\",\"scy\":\"none\",\"net\":\"ws\",\"type\":\"\",\"host\":\"\",\"path\":\"/sv2_proxy\",\"tls\":\"tls\",\"allowInsecure\":false,\"v\":\"2\",\"protocol\":\"vmess\"}"
echo "vmess订阅文本: $subscribe_txt"
echo ""
subscribe_txt_base64=$(echo -n "$subscribe_txt" | base64 | tr -d '\n')
# 节点2
node2_subscribe_txt="{\"ps\":\"korea-vmess\",\"add\":\"iting.beauty\",\"port\":\"$upgrade_port\",\"id\":\"640fac30-c463-4e2a-bbad-1ea5d05168f8\",\"aid\":\"0\",\"scy\":\"none\",\"net\":\"ws\",\"type\":\"\",\"host\":\"\",\"path\":\"/amazon_ray\",\"tls\":\"tls\",\"allowInsecure\":false,\"v\":\"2\",\"protocol\":\"vmess\"}"
echo "vmess订阅文本: $node2_subscribe_txt"
echo ""
node2_subscribe_txt_base64=$(echo -n "$node2_subscribe_txt" | base64 | tr -d '\n')
# 最终地址
final_subscribe_txt_base64=$(echo -e "vmess://$subscribe_txt_base64\nvmess://$node2_subscribe_txt_base64" | base64)
echo "vmess最终base64: $final_subscribe_txt_base64"
echo -n "$final_subscribe_txt_base64" | tr -d '\n' > $vmess_subscribe_conf_path


# 调整当前端口维护地址
sed -i "s/$current_v2ray_port/$upgrade_port/g" $current_v2ray_port_path

流量告警脚本

依赖

  • vnstat (流量监测工具)

  • postfix (邮件发信)
  • mailx
  • bc (数值比较工具)
  • ca-certificates (ssl)
sudo yum install postfix cyrus-sasl-plain vnstat ca-certificates bc mailx

配置

vnstat

# 创建数据库
sudo vnstat --create -i eth0
# 授权
sudo chown -R vnstat:vnstat /var/lib/vnstat
sudo chmod -R 755 /var/lib/vnstat

systemctl restart vnstat
systemctl status vnstat

postfix

/etc/postfix/main.cf
# 新增
relayhost = [smtp.gmail.com]:587
smtp_tls_wrappermode = yes
smtp_tls_security_level = encrypt
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

# 需注意检查是否存在ca证书
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt

# 修改
inet_protocols = ipv4
/etc/postfix/sasl_passwd

密码需在google 账户安全下生成应用密码,而不是账户密码

[smtp.gmail.com]:587 cn.shawnjim@gmail.com:zgwuuenizynzacky
更新 Postfix 的查找表并重新加载 Postfix:

sudo chmod 600 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
sudo systemctl restart postfix

cron 每五分钟

*/5 * * * * /root/web_rinetd_control/alert_network_traffic.sh

流量告警脚本

alert_network_traffic.sh

#!/bin/bash

# 配置
interface="eth0"                 # 网络接口
threshold=28                   # 流量阈值(GiB)
email="15502531057@163.com"      # 收件人邮箱
sender_name="66yun-vps-流量告警"
sender_email="cn.shawnjim@gmail.com"  # 发件人邮箱

# 获取当日总流量(接收 + 发送)
# vnstat 版本为1.x
#total=$(vnstat --days | grep "$(date '+%m/%d/%Y')" | awk '{if ($9 == "MiB") print $8 / 1024; else print $8}')
# vnstat 版本为2.x 
#total=$(vnstat -d 1 --oneline | awk -F";" '{print $6}' | awk '{if ($2 == "MiB") print $1 / 1024; else print $1}')

# 检查流量是否超过阈值
if (( $(echo "$total > $threshold" | bc -l) )); then
    # 发送告警邮件
    mailx -s "流量告警:$interface 使用超过 ${threshold}GiB" -r "$sender_email" -S from="$sender_name <$sender_email>" "$email" <<< "警告:$interface 当日使用流量已达 ${total}GiB,超过了设定阈值 ${threshold}GiB。"
    echo "邮件已发送"
fi

© Shawn Jim. All rights reserved. 本站总访问量 次, 访客数 人次.