dalaolala / blog

用issue来写博客 和别人学的
MIT License
73 stars 24 forks source link

获取telegram的常用ip段 #16

Open dalaolala opened 4 years ago

dalaolala commented 4 years ago

获取telegram的ip段 可以直接从这里获取

https://ipinfo.io/AS44907 https://ipinfo.io/AS59930 https://ipinfo.io/AS62041

从上面的地址可以知道,目前telegram的ip段为

149.154.160.0/22 
149.154.164.0/22
149.154.172.0/22 
91.108.4.0/22
91.108.20.0/22
91.108.56.0/22
91.108.8.0/22
95.161.64.0/20
91.108.12.0/22

下面分享一个v2ray客户端只代理telegram的配置

{
  "policy": {
    "system": {
      "statsInboundUplink": true,
      "statsInboundDownlink": true
    }
  },
  "log": {
    "access": "",
    "error": "",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": "proxy",
      "port": 10082,
      "listen": "0.0.0.0",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "ip": null,
        "address": null,
        "clients": null
      },
      "streamSettings": null
    },
    {
      "tag": "api",
      "port": 63222,
      "listen": "127.0.0.1",
      "protocol": "dokodemo-door",
      "sniffing": null,
      "settings": {
        "auth": null,
        "udp": false,
        "ip": null,
        "address": "127.0.0.1",
        "clients": null
      },
      "streamSettings": null
    }
  ],
  "outbounds": [
    {
      "tag": "proxy",
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "youdomain.com",
            "port": 443,
            "users": [
              {
                "id": "c8efbe2b-95ef-3706-8012-7e78ddddd",
                "alterId": 2,
                "email": "t@t.tt",
                "security": "auto"
              }
            ]
          }
        ],
        "servers": null,
        "response": null
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "tlsSettings": {
          "allowInsecure": true,
          "serverName": "kr-node2.xtown.ru"
        },
        "tcpSettings": null,
        "kcpSettings": null,
        "wsSettings": {
          "connectionReuse": true,
          "path": "/v2ray",
          "headers": {
            "Host": "kr-node2.xtown.ru"
          }
        },
        "httpSettings": null,
        "quicSettings": null
      },
      "mux": {
        "enabled": true
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {
        "vnext": null,
        "servers": null,
        "response": null
      },
      "streamSettings": null,
      "mux": null
    },
    {
      "tag": "block",
      "protocol": "blackhole",
      "settings": {
        "vnext": null,
        "servers": null,
        "response": {
          "type": "http"
        }
      },
      "streamSettings": null,
      "mux": null
    }
  ],
  "stats": {},
  "api": {
    "tag": "api",
    "services": [
      "StatsService"
    ]
  },
  "dns": null,
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "port": null,
        "inboundTag": "api",
        "outboundTag": "api",
        "ip": null,
        "domain": null
      },
      {
        "type": "field",
        "port": null,
        "inboundTag": null,
        "outboundTag": "proxy",
        "ip": [
          "149.154.160.0/22",
          "149.154.164.0/22",
          "149.154.172.0/22",
          "91.108.4.0/22",
          "91.108.20.0/22",
          "91.108.56.0/22",
          "91.108.8.0/22",
          "95.161.64.0/20",
          "91.108.12.0/22"
        ],
        "domain": null
      },
      {
        "type": "field",
        "port": null,
        "inboundTag": null,
        "outboundTag": "direct",
        "ip": null,
        "domain": [
          "google.com",
          "facebook.com",
          "youtube.com",
          "twitter.com",
          "instagram.com"
        ]
      },
      {
        "type": "field",
        "port": null,
        "inboundTag": null,
        "outboundTag": "direct",
        "ip": [
          "geoip:cn",
          "geoip:us",
          "geoip:gb"
        ],
        "domain": null
      }
    ]
  }
}
comdotwww commented 3 years ago

别忘记了AS62014,它也是AS之一 image