Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法访问raw.githubusercontent.com #60

Open
marillindie opened this issue Jun 30, 2020 · 5 comments
Open

无法访问raw.githubusercontent.com #60

marillindie opened this issue Jun 30, 2020 · 5 comments

Comments

@marillindie
Copy link

配置文件我觉得已经足够全局了,是不是在v2ray本体上层存在对 raw.githubusercontent.com 的强制豁免?如有,希望去除,因为该网站无法直连但是可以用其他代理软件连接。

以下是配置文件:

// Uncomment entries below to satisfy your needs. Also read our manual for more detail at
// https://www.v2ray.com/
{
  "log": {
    // By default, V2Ray writes access log to stdout.
    // "access": "/path/to/access/log/file",

    // By default, V2Ray write error log to stdout.
    // "error": "/path/to/error/log/file",
    "error": "/data/v2ray/run/error.log",

    // Log level, one of "debug", "info", "warning", "error", "none"
    "loglevel": "info"
  },
  // List of inbound proxy configurations.
  "inbounds": [{
    // Just listen for DNS proxy.
    "port": 65534,

    // Tag of the inbound for DNS proxy routing.
    "tag": "dns-in",

    // DNS proxy protocol must be dokodemo-door.
    "protocol": "dokodemo-door",

    // Setting of DNS proxy.
    "settings": {
      "port": 53,
      "address": "1.1.1.1",
      "network": "tcp,udp"
    }
  },{
    // Port to listen on. You may need root access if the value is less than 1024.
    "port": 65535,

    // IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
    "listen": "0.0.0.0",

    // Tag of the inbound proxy. May be used for routing.
    "tag": "proxy-inbound",

    // Protocol name of inbound proxy.
    "protocol": "dokodemo-door",

    // Settings of the protocol. Varies based on protocol.
    "settings": {
      // Disable timeout setting for keeping persistent connection. Such as FCM.   
      //  "timeout": 10,
      "network": "tcp,udp",
      "followRedirect": true
    },

    // Enable sniffing on TCP connection.
    "sniffing": {
      "enabled": true,
      // Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS.
      "destOverride": ["http", "tls"]
    }
  }],
  // List of outbound proxy configurations.
  "outbounds": [{
    "protocol": "vmess",
    "settings": {...},
    "streamSettings":{
      "network": "http",
      "security": "tls",
      "tlsSettings": {...},
      "httpSettings": {...}
    },
    "tag": "http/2"
  },{
    // Protocol name of the outbound proxy.
    "protocol": "freedom",

    // Settings of the protocol. Varies based on protocol.
    "settings": {
      "domainStrategy": "UseIP"
    },

    // Tag of the outbound. May be used for routing.
    "tag": "direct"
  },{
    // DNS Proxy Outbond
    "protocol": "dns",

    // Tag of the outbound for DNS proxy routing.
    "tag": "dns-out"
  },{
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  },{
    "protocol": "freedom",
    "tag": "unchanged"
  }],

  // Transport is for global transport settings. If you have multiple transports with same settings
  // (say mKCP), you may put it here, instead of in each individual inbound/outbounds.
  //"transport": {},

  // Routing controls how traffic from inbounds are sent to outbounds.
  "routing": {
    "domainStrategy": "IPOnDemand",
    "balancers": [
      {
        "tag": "proxy",
        "selector": ["http/2"]
      }
    ],
    "rules": [
      // DNS
      {
        // Proxy DNS request
        "type": "field",
        "inboundTag": ["dns-in"],
        "outboundTag": "dns-out"
      },
      {
        "type": "field",
        "domain": ["domain:...(服务器域名)"],
        "outboundTag": "unchanged"
      },
      // Fallback: Proxy
      {
        "type": "field",
        "network": "tcp,udp",
        "balancerTag": "proxy"
      }
    ]
  },

  // Dns settings for domain resolution.
  "dns": {
    // Static hosts, similar to hosts file.
    "hosts": {
      // Match v2ray.com to another domain on CloudFlare. This domain will be used when querying IPs for v2ray.com.
      "domain:v2ray.com": "www.vicemc.net",

      // The following settings help to eliminate DNS poisoning in mainland China.
      // It is safe to comment these out if this is not the case for you.
      "domain:github.io": "pages.github.com",
      "domain:wikipedia.org": "www.wikimedia.org",
      "domain:shadowsocks.org": "electronicsrealm.com"
    },
    "servers": [
      "1.1.1.1",
      "localhost"
    ]
  },

  // Policy controls some internal behavior of how V2Ray handles connections.
  // It may be on connection level by user levels in 'levels', or global settings in 'system.'
  "policy": {
    // Connection policys by user levels
    "levels": {
      "0": {
        "uplinkOnly": 0,
        "downlinkOnly": 0
      }
    },
    "system": {
      "statsInboundUplink": false,
      "statsInboundDownlink": false
    }
  }
}
@marillindie
Copy link
Author

marillindie commented Jun 30, 2020

当然,可以用systemless-hosts添加hosts记录解决

@marillindie
Copy link
Author

又获得了新方案:用hosts将网站重定向回127.0.0.1,再用iptables将443端口转发至其他端口(>1000),然后用V2Ray代理

@lyq1996
Copy link

lyq1996 commented Aug 12, 2020

你解决了吗?看起来根本就没走v2ray的DNS proxy

@whalechoi
Copy link
Contributor

使用dnscrypt-proxy接管系统dns,彻底解决内网污染。 #71

@gouwenyong0000
Copy link

在host文件下添加 185.199.108.133 raw.githubusercontent.com
参考https://www.ioiox.com/archives/62.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants