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

开启 sniffing 后,MTG FakeTLS 将无法使用 #63

Closed
betaxab opened this issue Jul 22, 2020 · 12 comments
Closed

开启 sniffing 后,MTG FakeTLS 将无法使用 #63

betaxab opened this issue Jul 22, 2020 · 12 comments

Comments

@betaxab
Copy link

betaxab commented Jul 22, 2020

提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。
除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。
如果你遇到的问题不是 V2Ray 的 bug,比如你不清楚要如何配置,请使用Discussion进行讨论。

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)

v4.26.0

  1. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。

手机通过 vmess+tls 连接 9seconds 的 MTG 使用 Telegram。

  1. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)

    9seconds 的 MTG 开启 FakeTLS,并将 FakeTLS 设置为 bing.com。
    V2ray 服务器端启用 sniffing。
    打开代理工具连接到 V2ray 服务器端后,Telegram 将无法正常连接到该 MTG 代理服务器,且 MTG 代理服务器端收不到 Telegram 发来的任何数据。

  2. 你期待看到的正确表现是怎样的?

MTG 数据可通过 V2ray 传输。但从错误日志来看,像是 V2ray 把 MTG 的数据发给了 bing.com 而不是 MTG 服务器端?如果不开 sniffing,MTG 是可以正常经过 V2ray 连上的。

  1. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

    // 在这里附上服务器端配置文件
    {
  "log": {
    "access": "access.log",
    "error": "error.log",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "port": 1111,
      "listen": "0.0.0.0",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "31859220-2bd4-54ac-ab18-fb297a951680",
            "alterId": 2
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "tls",
        "tlsSettings": {
          "certificates": [
            {
              "certificateFile": "/etc/v2ray/server.crt",
              "keyFile": "/etc/v2ray/server.key"
            }
          ]
        }
      },
      "tag": "",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "routing": {
    "rules": [
      {
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked",
        "type": "field"
      },
      {
        "outboundTag": "blocked",
        "protocol": [
          "bittorrent"
        ],
        "type": "field"
      }
    ]
  }
}

客户端配置:

    // 在这里附上客户端配置
    不重要
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

    // 在这里附上服务器端日志

2020/07/22 21:53:09 [Info] v2ray.com/core/transport/internet/tcp: listening TCP on 0.0.0.0:1111
2020/07/22 21:53:09 [Warning] v2ray.com/core: V2Ray 4.26.0 started
2020/07/22 21:53:10 [Info] [902122793] v2ray.com/core/proxy/vmess/inbound: received request for tcp:172.105.*.*:443
2020/07/22 21:53:10 [Info] [902122793] v2ray.com/core/app/dispatcher: sniffed domain: bing.com
2020/07/22 21:53:10 [Info] [902122793] v2ray.com/core/app/dispatcher: default route for tcp:bing.com:443
2020/07/22 21:53:10 [Info] [902122793] v2ray.com/core/proxy/freedom: opening connection to tcp:bing.com:443
2020/07/22 21:53:10 [Info] [902122793] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:bing.com:443
2020/07/22 21:53:10 [Info] [2286644073] v2ray.com/core/proxy/vmess/inbound: received request for tcp:172.105.*.*:443
2020/07/22 21:53:10 [Info] [2286644073] v2ray.com/core/app/dispatcher: sniffed domain: bing.com
2020/07/22 21:53:10 [Info] [2286644073] v2ray.com/core/app/dispatcher: default route for tcp:bing.com:443
2020/07/22 21:53:10 [Info] [2286644073] v2ray.com/core/proxy/freedom: opening connection to tcp:bing.com:443
2020/07/22 21:53:10 [Info] [2286644073] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:bing.com:443
2020/07/22 21:53:17 [Info] [3232294754] v2ray.com/core/proxy/vmess/inbound: received request for tcp:172.105.*.*:443
2020/07/22 21:53:17 [Info] [3232294754] v2ray.com/core/app/dispatcher: sniffed domain: bing.com
2020/07/22 21:53:17 [Info] [3232294754] v2ray.com/core/app/dispatcher: default route for tcp:bing.com:443
2020/07/22 21:53:17 [Info] [3232294754] v2ray.com/core/proxy/freedom: opening connection to tcp:bing.com:443
2020/07/22 21:53:17 [Info] [3232294754] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:bing.com:443
2020/07/22 21:53:17 [Info] [3762363108] v2ray.com/core/proxy/vmess/inbound: received request for tcp:172.105.*.*:443
2020/07/22 21:53:17 [Info] [3762363108] v2ray.com/core/app/dispatcher: sniffed domain: bing.com
2020/07/22 21:53:17 [Info] [3762363108] v2ray.com/core/app/dispatcher: default route for tcp:bing.com:443
2020/07/22 21:53:17 [Info] [3762363108] v2ray.com/core/proxy/freedom: opening connection to tcp:bing.com:443
2020/07/22 21:53:17 [Info] [3762363108] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:bing.com:443
2020/07/22 21:53:17 [Info] [4025568090] v2ray.com/core/proxy/vmess/inbound: received request for tcp:172.105.*.*:443
2020/07/22 21:53:17 [Info] [4025568090] v2ray.com/core/app/dispatcher: sniffed domain: bing.com
2020/07/22 21:53:17 [Info] [4025568090] v2ray.com/core/app/dispatcher: default route for tcp:bing.com:443
2020/07/22 21:53:17 [Info] [4025568090] v2ray.com/core/proxy/freedom: opening connection to tcp:bing.com:443
2020/07/22 21:53:17 [Info] [4025568090] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:bing.com:443
2020/07/22 21:53:22 [Info] [22665937] v2ray.com/core/proxy/vmess/inbound: received request for tcp:172.105.*.*:443

客户端错误日志:

    // 在这里附上客户端日志
    不重要
  1. 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。
    // 在这里附上服务器端日志

2020/07/22 21:53:10 120.15.*.*:62086 accepted tcp:172.105.*.*:443
2020/07/22 21:53:10 120.15.*.*:62087 accepted tcp:172.105.*.*:443
2020/07/22 21:53:17 120.15.*.*:62091 accepted tcp:172.105.*.*:443
2020/07/22 21:53:17 120.15.*.*:62092 accepted tcp:172.105.*.*:443
2020/07/22 21:53:17 120.15.*.*:62093 accepted tcp:172.105.*.*:443
2020/07/22 21:53:22 120.15.*.*:62097 accepted tcp:172.105.*.*:443
  1. 其它相关的配置文件(如 Nginx)和相关日志。

MTG 启动命令:

./mtg run -b 0.0.0.0:443 ee6792a48f01b8a87cd757170e00493cd262696e672e636f6d -d

MTG 仓库:https://github.com/9seconds/mtg

  1. 如果 V2Ray 无法启动,请附上 --test 输出。

通常的命令为 /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json。请按实际情况修改。

  1. 如果 V2Ray 服务运行不正常,请附上 journal 日志。

通常的命令为 journalctl -u v2ray

请预览一下你填的内容再提交。

@kslr
Copy link
Contributor

kslr commented Jul 23, 2020

MTG 是什么

@zlhdd108
Copy link

MTG 是什么

https://github.com/9seconds/mtg
应该是这个吧,MTProxy的一个分支

@betaxab
Copy link
Author

betaxab commented Jul 23, 2020

对 MTG = MTProxy Go

@betaxab
Copy link
Author

betaxab commented Jul 30, 2020

大佬们快来修一下啊。。

@KirbyKFC
Copy link

我觉得这不属于bug而是sniffing和FakeTLS在设计上的冲突。
绕过冲突的方式一是关闭TLS的sniffing,二是将发给bing.com的数据重定向到MTG(可能会干扰对bing的正常访问)

@wekingchen
Copy link

wekingchen commented Sep 1, 2020

V2Ray能不能直接更新到支持MTProto的FakeTLS模式?这样就不用再开一个程序了。目前V2ray 内置的支持 MTProto 只有第一代。
https://guide.v2fly.org/app/mtproto.html

@oneday-nobody
Copy link

題主日誌的IP暴露了位置。

@liberal-boy
Copy link
Member

FakeTLS 本来就是把自己伪装成 tls,v2ray 当然会安照 tls 进行 sniff,用把 fake 的域名对应到 mtp 服务器上即可

@betaxab
Copy link
Author

betaxab commented Oct 10, 2020

用把 fake 的域名对应到 mtp 服务器上即可

这是什么?

@liberal-boy
Copy link
Member

用把 fake 的域名对应到 mtp 服务器上即可

这是什么?

{
    "dns": {
        "hosts": {
            "mtp.fake.domain": "mtp.server.ip"
        }
    }
}

@betaxab
Copy link
Author

betaxab commented Oct 11, 2020

这样就失去了意义,搭建 MTG 的初衷是方便用户使用 Telegram 代理,客户端不受我控制。要是能简单解决我就不提 issue 了。

@liberal-boy
Copy link
Member

这个问题是无解的,fake tls 目的就是反识别,如果 v2ray 能识别其他人当然也可以识别

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

No branches or pull requests

7 participants