v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.01k stars 8.95k forks source link

Firefox + Proxy Switcher 0.1.7 are not woking with V2Ray 1.22. Unknown protocol version 67 #227

Closed vieuxport closed 7 years ago

vieuxport commented 7 years ago

提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。 Please answer the following questions before submitting your issue. Thank you.

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) 1) What version of V2Ray are you using? 1.22

2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 2) What your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy.

Visiting google.com in Firefox + Proxy Switcher 0.1.7 (Addon)

3) 你看到的不正常的现象是什么? 3) What did you see?

Secure Connection Failed

The connection to the server was reset while the page was loading.

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

V2Ray has output:

2016/08/04 15:05:49 [Warning]Socks: Unknown protocol version 67 2016/08/04 15:05:49 [Warning]Socks: failed to read authentication: Invalid protocol version.

4) 你期待看到的正确表现是怎样的? 4) What do you expected to see instead?

google.com homepage

no problem with Chrome + SwitchySharp (Extension)

5) 请附上你的配置文件。 5) Please attach your configuration file.

{
  "log": {
    "loglevel": "warning"
  },
  "inbound": {
    "port": 1080,
    "listen": "127.0.0.1",
    "protocol": "socks",
    "settings": {
      "auth": "noauth",
      "udp": false,
      "ip": "127.0.0.1"
    }
  },
  "outbound": {
    "protocol": "vmess",
    "settings": {
      "vnext": [
        {
          "address": "v2ray.cool",
          "port": 10086,
          "users": [
            {
              "id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
              "alterId": 64
            }
          ]
        }
      ]
    }
  },
  "outboundDetour": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    }
  ],
  "dns": {
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "strategy": "rules",
    "settings": {
      "domainStrategy": "IPIfNonMatch",
      "rules": [
        {
          "type": "field",
          "port": "1-52",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "port": "54-79",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "port": "81-442",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "port": "444-65535",
          "outboundTag": "direct"
        },
        {
          "type": "chinasites",
          "outboundTag": "direct"
        },
        {
          "type": "field",
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "outboundTag": "direct"
        },
        {
          "type": "chinaip",
          "outboundTag": "direct"
        }
      ]
    }
  },
  "transport": {
    "kcpSettings": {
      "uplinkCapacity": 1,
      "downlinkCapacity": 10
    }
  }
}
v2ray commented 7 years ago

你的 Proxy Switcher 上使用了 HTTP 代理,改成 socks5 就可以了。

vieuxport commented 7 years ago

got it. solved. thanks

marxangels commented 5 years ago

你的 Proxy Switcher 上使用了 HTTP 代理,改成 socks5 就可以了。

不兼容 http 代理是吧?

kslr commented 5 years ago

@toruksmakto 配置文件没有写http,而插件默认设置不是socks5

marxangels commented 5 years ago

@toruksmakto 配置文件没有写http,而插件默认设置不是socks5

可能客户端有区别吧,V2rayN 客户端好像仅支持 sock5 代理; ShadowSocks 的客户端是一个 1080 端口既可以处理 http 代理请求,又可以处理 socks5 代理请求。

marxangels commented 5 years ago

@2dust

{
  "port": 1080,
  "listen": "127.0.0.1",
  "protocol": ["http", "socks"],  # 有没有这种写法呢?多种协议一起用
  "settings": {},
  "streamSettings": {},
  "tag": "标识",
  "sniffing": {
    "enabled": false,
    "destOverride": ["http", "tls"]
  },
  "allocate": {
    "strategy": "always",
    "refresh": 5,
    "concurrency": 3
  }
}
fbens commented 4 years ago

我也遇到了这个问题,按照这个说明无法解决。 局域网PC上的V2Ray 已开启局域网访问 和 PAC,socket监听2333,PAC 端口2335。iPhone连接WiFi开启HTTP代理,端口2333,iPhone Safari 一访问网站,PC 的日志报错提示 unknown Socks version: 67。

2019/07/12 09:47:58 tcp:10.168.181.17:60298 rejected  v2ray.com/core/proxy/socks: unknown Socks version: 67
2019/07/12 09:47:58 [Info] [4017385232] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: failed to read request > v2ray.com/core/proxy/socks: unknown Socks version: 67
kslr commented 4 years ago

@fbens unknown Socks version: 67 这是个很经典的错误,你必须使用支持socks5或者http

fbens commented 4 years ago

@fbens unknown Socks version: 67 这是个很经典的错误,你必须使用支持socks5或者http

我现在发现怎么解决这个问题了,端口不对导致。 PC客户端socks端口是2333,而PAC网址的端口是2334,实际上他监听的HTTP代理端口是2334. 通过浏览器打开 http://127.0.0.1:2335/pac/?t=20190712165038410. 下载这个JS里面有如下一行

var proxy = "PROXY 127.0.0.1:2334;";

所以HTTP代理端口是2334,而既不是socks端口也不是PAC的端口!现在解决了~

zyfyy commented 2 years ago

你的 Proxy Switcher 上使用了 HTTP 代理,改成 socks5 就可以了。

为啥socks5就可以呢,firefox浏览器出于什么样的安全策略考虑的?

JounQin commented 5 months ago

For reference:

alias proxy="export PROXY=127.0.0.1:1080"