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

今天遇到了两次服务端崩溃,是 BUG 吗?还是我的配置有问题 #1122

Closed
loveqianool opened this issue Jun 27, 2022 · 5 comments

Comments

@loveqianool
Copy link

早上六点

2022/06/27 06:42:07 172.26.0.1:30964 accepted mtalk.google.com:5228 [Direct]                                            panic: runtime error: slice bounds out of range [:1024] with capacity 16                                                                                                                                                                        goroutine 65735 [running]:                                                                                              github.com/sagernet/sing/common/buf.(*Buffer).Index(...)                                                                        github.com/sagernet/sing@v0.0.0-20220619130320-8793fe5e067d/common/buf/buffer.go:398                            github.com/sagernet/sing-shadowsocks/shadowaead_2022.(*Service).newPacket(0x40014562d0, {0xcbe420, 0x4000970180}, {0xcc2500, 0x4000fdaac0}, 0x40009701e0, {{0x0, 0x0}, {{{0x0, 0xffffac1a0001}, ...}, ...}, ...})                                       github.com/sagernet/sing-shadowsocks@v0.0.0-20220619134218-830a2f478eb1/shadowaead_2022/service.go:420 +0xc60   github.com/sagernet/sing-shadowsocks/shadowaead_2022.(*Service).NewPacket(0x0?, {0xcbe420?, 0x4000970180?}, {0xcc2500?, 0x4000fdaac0?}, 0x40002915c0?, {{0x0, 0x0}, {{{0x0, 0xffffac1a0001}, ...}, ...}, ...})                                          github.com/sagernet/sing-shadowsocks@v0.0.0-20220619134218-830a2f478eb1/shadowaead_2022/service.go:362 +0x4c    github.com/xtls/xray-core/proxy/shadowsocks_2022.(*Inbound).Process(0x400025ce40, {0xcbe420, 0x4000970150}, 0x3, {0xcc2f10?, 0x4001238280}, {0xcc04a0?, 0x400145e520})                                                                                  github.com/xtls/xray-core/proxy/shadowsocks_2022/inbound.go:89 +0x3e8                                           github.com/xtls/xray-core/app/proxyman/inbound.(*udpWorker).callback.func1()                                                    github.com/xtls/xray-core/app/proxyman/inbound/worker.go:329 +0x31c                                             created by github.com/xtls/xray-core/app/proxyman/inbound.(*udpWorker).callback                                                 github.com/xtls/xray-core/app/proxyman/inbound/worker.go:306 +0x2c8    

晚上九点

2022/06/27 21:39:26 172.26.0.1:14810 accepted sp.udp-over-tcp.arpa:0 [Direct]
panic: runtime error: slice bounds out of range [:1024] with capacity 16
goroutine 45815 [running]:
github.com/sagernet/sing/common/buf.(*Buffer).Index(...)
github.com/sagernet/sing@v0.0.0-20220619130320-8793fe5e067d/common/buf/buffer.go:398
github.com/sagernet/sing-shadowsocks/shadowaead_2022.(*Service).newPacket(0x400144e2d0, {0xcbe420, 0x40003eabd0}, {0xcc2500, 0x40002be180}, 0x40003eac00, {{0x0, 0x0}, {{{0x0, 0xffffac1a0001}, ...}, ...}, ...})
github.com/sagernet/sing-shadowsocks@v0.0.0-20220619134218-830a2f478eb1/shadowaead_2022/service.go:420 +0xc60   github.com/sagernet/sing-shadowsocks/shadowaead_2022.(*Service).NewPacket(0x400116db30?, {0xcbe420?, 0x40003eabd0?}, {0xcc2500?, 0x40002be180?}, 0xfffe96a96750?, {{0x0, 0x0}, {{{0x0, 0xffffac1a0001}, ...}, ...}, ...})
github.com/sagernet/sing-shadowsocks@v0.0.0-20220619134218-830a2f478eb1/shadowaead_2022/service.go:362 +0x4c
github.com/xtls/xray-core/proxy/shadowsocks_2022.(*Inbound).Process(0x400026ce40, {0xcbe420, 0x40003eaba0}, 0x3, {0xcc2f10?, 0x4000672900}, {0xcc04a0?, 0x40002798f0})
github.com/xtls/xray-core/proxy/shadowsocks_2022/inbound.go:89 +0x3e8
github.com/xtls/xray-core/app/proxyman/inbound.(*udpWorker).callback.func1()
github.com/xtls/xray-core/app/proxyman/inbound/worker.go:329 +0x31c
created by github.com/xtls/xray-core/app/proxyman/inbound.(*udpWorker).callback
github.com/xtls/xray-core/app/proxyman/inbound/worker.go:306 +0x2c8  

服务端配置

{
  "log": {
    "loglevel": "warning"
  },
  "dns": {
    "servers": [
      "172.26.0.53"
    ]
  },
  "inbounds": [
    {
      "port": 2**6,
      "protocol": "shadowsocks",
      "settings": {
        "method": "2022-blake3-aes-128-gcm",
        "password": "OtFi9V*****QSrOe7Q==",
        "network": "tcp,udp"
      }
    },
    {
      "port": 80,
      "protocol": "shadowsocks",
      "settings": {
        "method": "2022-blake3-aes-128-gcm",
        "password": "OtFi9******rOe7Q==",
        "network": "tcp,udp"
      },
      "streamSettings": {
        "network": "tcp",
        "tcpSettings": {
          "header": {
            "type": "http",
            "response": {
              "version": "1.1",
              "status": "200",
              "reason": "OK",
              "headers": {
                "Content-Type": [
                  "application/octet-stream",
                  "video/mpeg",
                  "application/x-msdownload",
                  "text/html",
                  "application/x-shockwave-flash"
                ],
                "Transfer-Encoding": [
                  "chunked"
                ],
                "Connection": [
                  "keep-alive"
                ],
                "Pragma": "no-cache"
              }
            }
          }
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "tag": "Direct"
    },
    {
      "protocol": "socks",
      "tag": "socks",
      "settings": {
        "servers": [
          {
            "address": "172.26.0.9",
            "port": 1234
          }
        ]
      }
    }
  ],
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "domainMatcher": "mph",
    "rules": [
      {
        "type": "field",
        "outboundTag": "Reject",
        "domain": [
          "geosite:category-ads-all"
        ]
      },
      {
        "type": "field",
        "outboundTag": "socks",
        "domain": [
          "domain:18comic.vip",
          "domain:johren.net",
          "domain:fakku.net",
          "domain:johren.games",
          "domain:hanime1.me"
        ]
      }
    ]
  }
}

还有服务端经常遇到下面这个,是因为广告过滤的原因吗,是不是可以不用理,因为出现的时候也能正常上网。

2022/06/27 21:47:05 172.26.0.1:58246 rejected  proxy/vmess/encoding: failed to read request header > malformed HTTP request "\x16\x03\x01\x01\xfd\x01\x00\x01\xf9\x03\x03,\xb9ׅ\xedC\xcc{\xde\xfde(\xe9\x18\xff\xcao\xd6\xee\xc1\x16\xc3\xeb<\xc0(\x11\x83|\xa6]\x10\x00\x01<\xcc\x14\xcc\x13\xcc\x15\xc00\xc0,\xc0(\xc0$\xc0\x14\xc0"
@yuhan6665
Copy link
Member

感谢反馈 麻烦 @nekohasekai 看一下

@FranzKafkaYu
Copy link
Contributor

看着像是密钥长度不标准,2022-blake3-aes-128-gcm需要16位,是否按照openssl rand -base64 <长度> 生成对应密钥?

@loveqianool
Copy link
Author

看着像是密钥长度不标准,2022-blake3-aes-128-gcm需要16位,是否按照openssl rand -base64 <长度> 生成对应密钥?

是使用 openssl rand -base64 16 生成的密钥,那几个 ** 是我打码的,用是能正常用,就是崩的次数有点频繁,要上去重启一下。

nekohasekai added a commit that referenced this issue Jun 27, 2022
@yuhan6665
Copy link
Member

大佬修了 @loveqianool 你可以试试最新的建构还有没有问题
https://github.com/XTLS/Xray-core/actions/runs/2572804983

@loveqianool
Copy link
Author

大佬修了 @loveqianool 你可以试试最新的建构还有没有问题 https://github.com/XTLS/Xray-core/actions/runs/2572804983

thx

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