qjebbs / sing-box Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sagernet/sing-box
The universal proxy platform
Home Page: https://sing-box.sagernet.org
License: Other
This project forked from sagernet/sing-box
The universal proxy platform
Home Page: https://sing-box.sagernet.org
License: Other
Windows
Windows 11
Original sing-box Command Line
No response
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
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,请问是否可以修复?
谢谢
导入包含 vless 的机场链接,若需要可私发。
2023-09-11 21:25:09 �[33mWARN�[0m provider[sub1]: links parsed with error:unsupported link scheme: vless
Edit 1: 补充说明
Edit 2: 补充 trojan 配置
Windows
Windows 11 Enterprise 22H2
Original sing-box Command Line
No response
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
配置文件带有 provider 有关配置时无法启动,去掉则可以正常启动
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
尝试了下exclude正则:"exclude": "^(?!.*(?:https://t.me/qidian_yun|卐奇点㊣|卐奇点卐)).*",报错:[31mFATAL [0m[0000] parse provider[1]: error parsing regexp: invalid or unsupported Perl syntax: (?!
使用内核https://github.com/CHIZI-0618/sing-box/suites/13078823103/artifacts/709606981
Android
13
sing-box 原始命令行程序
No response
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
$ sing-box version
# Paste output here
# paste json here
# 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"
]
}
}
请问win如何编译这个项目
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命令?
Delete
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.