wget https://github.com/shawn1m/overture/releases/download/v1.6.1/overture-linux-amd64.zip

unzip -d /usr/local/overture overture-linux-amd64.zip

配置开机启动 nano /etc/systemd/system/overture.service
内容如下:

[Unit]  
Description=overture  
After=network.target  
[Service]  
ExecStart=/usr/local/overture/overture-linux-amd64 -c /usr/local/overture/config.json  
Restart=on-abort  
[Install]  
WantedBy=multi-user.target  

systemctl enable overture
systemctl start overture

这里我用中科大的dns,没被污染,还支持ecs,配置文件如下:

{
  "BindAddress": ":38325",
  "DebugHTTPAddress": "127.0.0.1:5555",
  "PrimaryDNS": [
    {
      "Name": "ZhongKeDa_CT",
      "Address": "202.141.162.123:5353",
      "Protocol": "udp",
      "SOCKS5Address": "",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "manual",
        "ExternalIP": "国外vps的ip",
        "NoCookie": true
      }
    }
  ],
  "AlternativeDNS": [
    {
      "Name": "ZhongKeDa_CM",
      "Address": "202.141.176.93:5353",
      "Protocol": "udp",
      "SOCKS5Address": "",
      "Timeout": 6,
      "EDNSClientSubnet": {
        "Policy": "manual",
        "ExternalIP": "国外vps的ip",
        "NoCookie": true
      }
    }
  ],
  "OnlyPrimaryDNS": true,
  "IPv6UseAlternativeDNS": false,
  "AlternativeDNSConcurrent": false,
  "PoolIdleTimeout": 15,
  "PoolMaxCapacity": 15,
  "WhenPrimaryDNSAnswerNoneUse": "PrimaryDNS",
  "IPNetworkFile": {
    "Primary": "./ip_network_primary_sample",
    "Alternative": "./ip_network_alternative_sample"
  },
  "DomainFile": {
    "Primary": "./domain_primary_sample",
    "Alternative": "./domain_alternative_sample",
    "Matcher":  "full-map"
  },
  "HostsFile": {
    "HostsFile": "./hosts_sample",
    "Finder": "full-map"
  },
  "MinimumTTL": 0,
  "DomainTTLFile" : "./domain_ttl_sample",
  "CacheSize" : 9000,
  "RejectQType": [255]
}

测试一下,ecs已经生效。

dig +nocl TXT o-o.myaddr.l.google.com +short
返回如下:
"xx.xx.xx.xx"
"edns0-client-subnet vps ip/25"