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

版本1.7.1之后部分情况下链式代理无法正常工作 #1916

Open
4 of 5 tasks
trimgop opened this issue Jul 4, 2024 · 0 comments
Open
4 of 5 tasks

版本1.7.1之后部分情况下链式代理无法正常工作 #1916

trimgop opened this issue Jul 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@trimgop
Copy link

trimgop commented Jul 4, 2024

操作系统

Windows

系统版本

23H2

安装类型

sing-box 原始命令行程序

如果您使用图形客户端程序,请提供该程序版本。

No response

版本

sing-box version 1.9.3

Environment: go1.22.4 windows/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: 085f60337799afc906069b540a38368968c123e4
CGO: disabled

描述

sing-box 1.7.1及之后的版本,两个使用了tls的代理节点,组成的链式代理无法使用

重现方式

设置如下:

  1. 两个开启了tls的vless节点proxy-1和proxy-2
  2. http入站走proxy-1,proxy-1的detour设为proxy-2

可复现的配置文件:

{
    "inbounds": [
        {
            "listen": "127.0.0.1",
            "listen_port": 2080,
            "sniff": true,
            "sniff_override_destination": false,
            "tag": "mixed-in",
            "type": "mixed"
        }
    ],
    "log": {
        "level": "debug"
    },
    "outbounds": [
        {
            "tag": "proxy-1",
            "detour": "proxy-2",
            "type": "vless",
            "server": "154.219.5.16",
            "server_port": 2053,
            "uuid": "17565eb3-3535-4fc1-bbaa-e9fbd94b2f0c",
            "packet_encoding": "xudp",
            "tls": {
                "enabled": true,
                "insecure": false,
                "server_name": "fi1.v2vless.xyz"
            },
            "transport": {
                "type": "ws",
                "path": "/",
                "headers": {
                    "Host": "fi1.v2vless.xyz"
                }
            }
        },
        {
            "tag": "proxy-2",
            "type": "vless",
            "server": "185.159.247.35",
            "server_port": 443,
            "uuid": "5da27733-3527-479e-bb81-4c5a9c75d83f",
            "packet_encoding": "xudp",
            "tls": {
              "enabled": true,
              "insecure": false,
              "server_name": "viphamester.wolfmoon.ir"
            },
            "transport": {
              "type": "grpc",
              "service_name": "okala.com"
            }
        },
        {
            "tag": "direct",
            "type": "direct"
        },
        {
            "tag": "block",
            "type": "block"
        },
        {
            "tag": "dns-out",
            "type": "dns"
        }
    ],
    "route": {        
        "rules": [
            {
                "outbound": "dns-out",
                "protocol": "dns"
            }
        ],
        "final": "proxy-1"
    },
    "dns": {
    "servers": [
      {
        "tag": "remote-dns",
        "address": "tls://8.8.8.8",
        "detour": "proxy-1"
      },
      {
        "tag": "local-dns",
        "address": "https://223.5.5.5/dns-query",
        "detour": "direct"
      }
    ],
    "rules": [
      {
        "outbound": "any",
        "server": "local-dns"
      }
    ],
    "final": "remote-dns"
  }
}

执行 curl.exe -x "http://127.0.0.1:2080" www.google.com 发起请求

sing-box 1.9.3 版本报错: set read deadline: invalid argument
sing-box 1.7.0 版本正常工作

日志

INFO[0000] router: updated default interface 以太网, index 16
INFO[0000] inbound/mixed[mixed-in]: tcp server started at 127.0.0.1:2080
INFO[0000] sing-box started (0.00s)
INFO[0005] [1292959826 0ms] inbound/mixed[mixed-in]: inbound connection from 127.0.0.1:54430
INFO[0005] [1292959826 7ms] inbound/mixed[mixed-in]: inbound connection to www.google.com:80
DEBUG[0005] [1292959826 9ms] router: sniffed protocol: http, domain: www.google.com
INFO[0005] [1292959826 9ms] outbound/vless[proxy-1]: outbound connection to www.google.com:80
INFO[0005] [1292959826 9ms] outbound/vless[proxy-2]: outbound connection to 154.219.5.16:2053
INFO[0005] [1292959826 9ms] outbound/vless[proxy-2]: outbound connection to 154.219.5.16:2053
DEBUG[0006] [1292959826 1.16s] inbound/mixed[mixed-in]: connection closed: process connection from 127.0.0.1:54430: set read deadline: invalid argument | Get "http://www.google.com/": io: read/write on closed pipe

支持我们

完整性要求

  • 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
  • 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。
@nekohasekai nekohasekai added the bug Something isn't working label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants