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

设置了 TLS 传出代理无法正常连接 #368

Closed
ToutyRater opened this issue Jan 24, 2017 · 6 comments
Closed

设置了 TLS 传出代理无法正常连接 #368

ToutyRater opened this issue Jan 24, 2017 · 6 comments

Comments

@ToutyRater
Copy link
Contributor

ToutyRater commented Jan 24, 2017

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

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    What version of V2Ray are you using (If you deploy different version on server and client, please explicitly point out)?
    v2.15.1

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

  3. 你看到的不正常的现象是什么?
    What did you see?
    当配置了传出代理之后,有 proxySettings 的 outbound 如果使用了 TLS,则无法联网(已经单独对每个outbound 测试过都可以正常连接)。
    另外,如果是proxySettings 的 outbound 使用了 ws 也是无法联网(这一点我没有大量多次测试,无法肯定)。
    也许这个问题与 当 streamSettings.network 为 kcp 时使用传出代理无法联网 #307 有一定关联

  4. 你期待看到的正确表现是怎样的?
    What's your expectation?

  5. 请附上你的配置文件(提交 Issue 前请隐藏服务器端IP地址)。
    Please attach your configuration file (Mask IP addresses before submit this issue).

    Server Configuration File(服务器端配置文件):
    以下是开启了 TLS 的配置

{
  "inbound": {
    "protocol": "vmess",
    "port": 443,
    "settings": {
      "clients": [
        {
          "id": "----",
          "level": 0,
          "alterid": 64
        }
      ]
    },
    "streamsettings": {
      "network": "tcp",
      "security": "tls",
      "tlsSettings": {
        "certificates": [
          {
            "certificatefile": "/etc/v2ray/v2ray.crt",
            "keyfile": "/etc/v2ray/v2ray.key"
          }
        ]
      }
    }
  },
  "outbound": {
    "protocol": "freedom",
    "settings": {},
    "tag": "direct"
  }
}

另一个服务器的配置:

{
  "inbound": {
    "protocol": "vmess",
    "port": 1053,
    "settings": {
      "clients": [
        {
          "id": "----",
          "level": 1,
          "alterid": 64
        }
      ]
    }
  },
  "outbound": {
    "protocol": "freedom",
    "settings": {},
    "tag": "direct"
  }
}
Client Configuration File(客户端配置文件):
{
 "inbound": {
   "port": 2323,
   "protocol": "socks",
   "settings": {
     "auth": "noauth",
     "udp": true,
     "ip": "127.0.0.1",
     "timeout": 120
   }
 },
 "outbound": {  
   "proxySettings": {
     "tag": "tcp" 
   },
   "protocol": "vmess",
   "settings": {
     "vnext": [
       {
         "address": "",
         "port": 443,
         "users": [
           {
             "alterId": 64,
             "id": "",
             "security": "aes-128-gcm"
           }
         ]
       }
     ]
   },
   "streamSettings": {
     "network": "tcp",
     "security": "tls",
     "tlsSettings": {
       "serverName": "domain",
       "allowInsecure": false
     }
   },
   "tag": "tls"
 },
 "outboundDetour": [
   {
     "tag": "tcp",
     "protocol": "vmess",
     "settings": {
       "vnext": [
         {
           "address": "",
           "port": 1053, 
           "users": [
             {
               "alterId": 64,
               "security": "aes-128-gcm",
               "id": ""
             }
           ]
         }
       ]
     },
     "streamSettings": {
       "network": "tcp",
       "tcpSettings": {
         "connectionReuse": true,
         "header": {
           "type": "none"
         }
       }
     }
   }
 ]
}
  1. 请附上出错时软件输出的日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。
    Please attach the log file, especially the bottom lines if the file is large. Log file is usually /var/log/v2ray/error.log on Linux.

    Server Log File(服务器端日志):

    
    // 在这里附上服务器端日志
    // Please attach your server log here.
    

    Client Log File(客户端日志):

2017/01/24 22:46:14 [Info]VMess|Outbound: Tunneling request to tcp:x.x.x.x:443 via tcp:x.x.x.x:1053
2017/01/24 22:46:15 [Info]VMess|Outbound: Connection ending with [VMess|Client: Unexpected response header. Expecting 122 but actually 156]
2017/01/24 22:46:15 [Info]VMess|Outbound: Connection ending with [VMess|Client: Unexpected response header. Expecting 105 but actually 18]
@v2ray
Copy link
Collaborator

v2ray commented Jan 24, 2017

服务器端的配置?

@ToutyRater
Copy link
Contributor Author

已更新,添加了服务器配置

@v2ray
Copy link
Collaborator

v2ray commented Jan 29, 2017

系统是什么?macOS Sierra? Go 1.7.5 修复了一个 TLS 相关的问题: golang/go#18688

我把编译环境升到了 1.7.5,不过要等下周发布了

@ToutyRater
Copy link
Contributor Author

客户端:Windows 10 amd64;服务器 Debian 8.7 amd64。
至于你提到的 Golang 的 bug,我不清楚在 Windows 上是否存在,等下个 V2Ray 版本更新了我再测试还有没有这个问题

@husy8
Copy link
Contributor

husy8 commented Jan 30, 2017

客户端:Windows 7 6.1.7601 x64 服务器:Debian 8.7 amd64
均使用v2.16.6版V2Ray 工作正常,更新到最新版本再试?

@DarienRaymond
Copy link
Contributor

assume fixed.

github-actions bot pushed a commit to 3gZ2jA/v2ray-core that referenced this issue Oct 29, 2020
Bumps [github.com/pires/go-proxyproto](https://github.com/pires/go-proxyproto) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/pires/go-proxyproto/releases)
- [Commits](pires/go-proxyproto@v0.2.0...v0.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
xiocode pushed a commit to going/v2ray-core that referenced this issue Jun 3, 2021
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

3 participants