Git Product home page Git Product logo

sing-box's People

Contributors

0x7d274284 avatar aire1 avatar arm64v8a avatar database64128 avatar drprofesq avatar dyhkwong avatar h1jk avatar ikirby avatar johnthecoderpro avatar kkocdko avatar longmoon77 avatar lyc8503 avatar mahdi-zarei avatar mazzz1y avatar nekohasekai avatar printfer avatar qjebbs avatar reeceyng avatar renovate[bot] avatar seiuneko avatar septs avatar shadow750d6 avatar tarvfx avatar testwill avatar weltolk avatar wwqgtxx avatar xiaokangwang avatar xyenon avatar zakuwaki avatar zedifen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sing-box's Issues

当订阅包含vless时所有节点不可用

Operating system

Windows

System version

Windows 11

Installation type

Original sing-box Command Line

If you are using a graphical client, please provide the version of the client.

No response

Version

Environment: go1.21.0 windows/amd64
Tags: with_quic,with_grpc,with_reality_server,with_utls,with_clash_api,with_gvisor
Revision: aacda975d53edbd4339f2a020888a913079d7143
CGO: enabled

Description

BASE64 转换后节点配置如下

vless://UUID@IP:443?mode=multi&security=reality&encryption=none&type=tcp&flow=xtls-rprx-vision&servername=servername&pbk=pbk&sid=sid&sni=sni&fp=chrome&spx=节点名
trojan://UUID@IP:443?allowInsecure=0&peer=peer&sni=sni#节点名

可正确导入其他非 vless 节点,但所有节点不可用。未包含 vless 的机场导入与使用无任何问题

参考过 #5 ,但是可成功导入的节点依旧无法使用,如 trojan 配置并不包含 &type=tcp

尝试过使用 exclude 排除 vless 节点,无效;使用 订阅链接&flag=clash 方式获取不包含 vless 的节点,提示无法导入(这个应该不算 bug)。

由于 sing-box 本身支持 vless+REALITY,请问是否可以修复?

谢谢

Reproduction

导入包含 vless 的机场链接,若需要可私发。

Logs

2023-09-11 21:25:09 �[33mWARN�[0m provider[sub1]: links parsed with error:unsupported link scheme: vless

Edit 1: 补充说明
Edit 2: 补充 trojan 配置

带有 provider 字段时无法启动

Operating system

Windows

System version

Windows 11 Enterprise 22H2

Installation type

Original sing-box Command Line

If you are using a graphical client, please provide the version of the client.

No response

Version

console output: sing-box version unknown

Environment: go1.21.1 windows/amd64
Tags: with_gvisor,with_quic,with_clash_api,with_ech,with_utls,with_dhcp
Revision: e888176
CGO: enabled

GitHub Action: https://github.com/txyyh/sing-box-build/actions/runs/6217173644

Description

配置文件带有 provider 有关配置时无法启动,去掉则可以正常启动

Reproduction

  1. 编写一份带有 provider 字段的 config.json
  2. 使用该配置文件启动
  3. 程序报错

Logs

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/sagernet/sing-box/outbound.(*Selector).Start(0xc0002140e0)
github.com/sagernet/sing-box/outbound/selector.go:78 +0x3c5
github.com/sagernet/sing-box.(*Box).startOutbounds(0xc000162d10)
github.com/sagernet/sing-box/box_outbound.go:47 +0x671
github.com/sagernet/sing-box.(*Box).preStart(0xc000162d10)
github.com/sagernet/sing-box/box.go:262 +0x457
github.com/sagernet/sing-box.(*Box).start(0xc000162d10)
github.com/sagernet/sing-box/box.go:270 +0x2a
github.com/sagernet/sing-box.(*Box).Start(0xc000162d10)
github.com/sagernet/sing-box/box.go:222 +0x36
main.create()
github.com/sagernet/sing-box/cmd/sing-box/cmd_run.go:178 +0x425
main.run()
github.com/sagernet/sing-box/cmd/sing-box/cmd_run.go:191 +0x10d
main.glob..func7(0xc00019d300?, {0x169ffce?, 0x4?, 0x169ffd2?})
github.com/sagernet/sing-box/cmd/sing-box/cmd_run.go:30 +0x17
github.com/spf13/cobra.(*Command).execute(0x2151e40, {0x21b32a0, 0x0, 0x0})
github.com/spf13/[email protected]/command.go:944 +0x863
github.com/spf13/cobra.(*Command).ExecuteC(0x21529c0)
github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:992
main.main()
github.com/sagernet/sing-box/cmd/sing-box/main.go:36 +0x1e

or

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x20 pc=0x1222ed9]

goroutine 5 [running]:
github.com/sagernet/sing-box/outbound.(*Selector).DialContext(0x15bde6bbec8?, {0x187b0e0?, 0xc00009e000?}, {0x169fa1c?, 0xc000269990?}, {{{0x0, 0x0}, 0x0}, 0x1bb, {0xc0000381e0, ...}})
github.com/sagernet/sing-box/outbound/selector.go:104 +0x39
github.com/sagernet/sing-box/provider.(*Remote).download.func1({0x187b0e0, 0xc00009e000}, {0x169fa1c, 0x3}, {0xc0000381e0?, 0x96b591?})
github.com/sagernet/sing-box/provider/remote.go:405 +0xd6
net/http.(*Transport).dial(0xc000269c40?, {0x187b0e0?, 0xc00009e000?}, {0x169fa1c?, 0xc000269a90?}, {0xc0000381e0?, 0x215ae00?})
net/http/transport.go:1183 +0xd2
net/http.(*Transport).dialConn(0xc000098000, {0x187b0e0, 0xc00009e000}, {{}, 0x0, {0xc0001b4230, 0x5}, {0xc0000381e0, 0x1f}, 0x0})
net/http/transport.go:1625 +0x7e8
net/http.(*Transport).dialConnFor(0x10b90c5?, 0xc0000a2000)
net/http/transport.go:1467 +0x9f
created by net/http.(*Transport).queueForDial in goroutine 25
net/http/transport.go:1436 +0x3cb

can't start core

操作系统

Android

系统版本

13

安装类型

sing-box 原始命令行程序

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

No response

版本

```console ❯ ./sing-box version sing-box version 1.4.0

Environment: go1.21.0 android/arm64
Tags: with_quic,with_gvisor,with_ech,with_utls,with_ech,with_clash_api,with_provider_loadbalance
Revision: 6d90977
CGO: enabled

</details>

### 描述

启动脚本无法启动内核

### 重现方式

sing-box run -c config.json -D /somewhere

### 日志

<details>
```console
panic: runtime error: index out of range [0] with length 0

goroutine 18 [running, locked to thread]:
github.com/sagernet/sing-box/outbound.(*Selector).Start(0x40000d60e0)
	/home/runner/work/sing-box-sub/sing-box-sub/outbound/selector.go:78 +0x374
github.com/sagernet/sing-box.(*Box).startOutbounds(0x40000ac2c0)
	/home/runner/work/sing-box-sub/sing-box-sub/box_outbound.go:47 +0x524
github.com/sagernet/sing-box.(*Box).preStart(0x40000ac2c0)
	/home/runner/work/sing-box-sub/sing-box-sub/box.go:262 +0x3a0
github.com/sagernet/sing-box.(*Box).start(0x40000ac2c0)
	/home/runner/work/sing-box-sub/sing-box-sub/box.go:270 +0x28
github.com/sagernet/sing-box.(*Box).Start(0x40000ac2c0)
	/home/runner/work/sing-box-sub/sing-box-sub/box.go:222 +0x30
github.com/sagernet/sing-box/experimental/libbox.(*BoxService).Start(...)
	/home/runner/work/sing-box-sub/sing-box-sub/experimental/libbox/service.go:67
main.proxylibbox_BoxService_Start(0x942a8101?)
	/tmp/gomobile-work-707860006/src-android-arm64/gobind/go_libboxmain.go:48 +0x3c

可以增加在outbounds下使用节点过滤字段的功能吗

Welcome

  • Yes, I'm using the latest major release. Only such installations are supported.
  • Yes, I'm using the latest Golang release. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, FULL config, FULL log, etc).

Description of the problem

屏幕截图 2023-05-25 170730
如图所示

Version of sing-box

$ sing-box version
# Paste output here

Server and client configuration file

# paste json here

Server and client log file

# paste log here

我认为这样更直观

{
  "providers": [
    {
      "tag": "provider",
      "url": "https://url.to/provider.txt",
      "interval": "24h",  
      "download_detour": "",
      "cache_file": "provider.txt"

      ... // 拨号字段
    }
  ],
"providers1": [
    {
      "tag": "provider",
      "url": "https://url.to/provider.txt",
      "interval": "24h",  
      "download_detour": "",
      "cache_file": "provider.txt"

      ... // 拨号字段
    }
  ],
  {
    // 通过出站组引用,否则订阅不起作用。
    "type": "hk", // selector, loadbalance, urltest...    
    "exclude": "",
    "include": "hk",
    "providers": [
      "provider1"
    ]
  },
 {
    // 通过出站组引用,否则订阅不起作用。
    "type": "usa", // selector, loadbalance, urltest...    
    "exclude": "",
    "include": "usa",
    "providers": [
      "provider",
      "provider1"
    ]
  }
}

更直观,更容易进行多个订阅的合并,也符合clash难民的直觉

hello

unsupported transport tcp | part error: {"v":"2","ps":"剩余流量:94.88% 86.71GB","add":"www.g00gle.com","port":"10086","id":"2661b","aid":"2","net":"tcp","type":"none","host":"","tls":""} | invalid port: strconv.ParseUint: parsing ""剩余流量:94.88% 86.71GB","add":"www.g00gle.com","port":"10086","id":"26614a5-9371-a44313a75b6b","aid":"2","net":"tcp","type":"none","host":"","tls":""}": invalid syntax 订阅成功没有节点

编译时的错误信息

编译时出现一条错误信息:
GOOS=windows GOARCH=amd64 go build -v -trimpath -ldflags "-X 'github.com/sagernet/sing-box/constant.Version=unknown' -s -w -buildid=" -o ./dist/sing-box-windows-amd64.exe ./cmd/sing-box

编译命令:
make windows-amd64 TAGS=with_clash_api

可以编译出sing-box-windows-amd64.exe这个文件,但是check配置文件时,还是报错:create clash api server: clash api is not included in this build, rebuild with -tags with_clash_api

对make编译完全陌生,是谷歌边查边学写的编译命令,请问下这个错误是我编译命令的问题吗?如果是的话,能否给出正确的make命令?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.