Compare commits

..

93 Commits

Author SHA1 Message Date
世界
470173189d
documentation: Bump version 2025-05-23 11:44:36 +08:00
世界
c24ae9cf34
Update quic-go to v0.52.0 2025-05-23 11:41:48 +08:00
世界
f27cf36174
Add SSM API service 2025-05-23 11:41:37 +08:00
世界
dfb9786bd0
Add resolved service and DNS server 2025-05-23 11:41:34 +08:00
世界
fe84746aff
Add DERP service 2025-05-23 11:03:14 +08:00
世界
f236effb5f
Add service component type 2025-05-23 11:03:14 +08:00
世界
60daaeb134
Fix tproxy tcp control 2025-05-23 11:03:14 +08:00
愚者
7ba271267d
release: Fix build tags for android
Signed-off-by: 愚者 <11926619+FansChou@users.noreply.github.com>
2025-05-23 11:03:13 +08:00
世界
aa73b166ca
prevent creation of bind and mark controls on unsupported platforms 2025-05-23 11:03:13 +08:00
PuerNya
d136c489ad
documentation: Fix description of reject DNS action behavior 2025-05-23 11:03:13 +08:00
Restia-Ashbell
5c4dfabc2c
Fix TLS record fragment 2025-05-23 11:03:12 +08:00
世界
836d8c0edc
Add missing accept_routes option for Tailscale 2025-05-23 11:03:12 +08:00
世界
b45f7e62d4
Add TLS record fragment support 2025-05-23 11:03:12 +08:00
世界
5f1b210e49
release: Update Go to 1.24.3 2025-05-23 11:03:11 +08:00
世界
c0e64581be
Fix set edns0 client subnet 2025-05-23 11:03:11 +08:00
世界
69d16594f8
Update minor dependencies 2025-05-23 11:03:11 +08:00
世界
ee4853b979
Update certmagic and providers 2025-05-23 11:03:11 +08:00
世界
5ec54800bb
Update protobuf and grpc 2025-05-23 11:03:10 +08:00
世界
0c24f4cbe7
Add control options for listeners 2025-05-23 11:03:10 +08:00
世界
64c164a1ec
Update quic-go to v0.51.0 2025-05-23 11:03:10 +08:00
世界
50736b36ff
Update utls to v1.7.2 2025-05-23 11:03:04 +08:00
世界
95f536ae43
Handle EDNS version downgrade 2025-05-23 11:02:58 +08:00
世界
7b2fabc5f7
documentation: Fix anytls padding scheme description 2025-05-23 11:02:58 +08:00
安容
0b236ba700
Report invalid DNS address early 2025-05-23 11:02:58 +08:00
世界
667772e1cd
Fix wireguard listen_port 2025-05-23 11:02:58 +08:00
世界
3e6bb5865b
clash-api: Add more meta api 2025-05-23 11:02:57 +08:00
世界
7f2e236a02
Fix DNS lookup 2025-05-23 11:02:57 +08:00
世界
0b02dd5ac2
Fix fetch ECH configs 2025-05-23 11:02:57 +08:00
reletor
46efbcdacf
documentation: Minor fixes 2025-05-23 11:02:56 +08:00
caelansar
b9d48631e1
Fix callback deletion in UDP transport 2025-05-23 11:02:56 +08:00
世界
45d58c7fe3
documentation: Try to make the play review happy 2025-05-23 11:02:56 +08:00
世界
93f0a149bf
Fix missing handling of legacy domain_strategy options 2025-05-23 11:02:55 +08:00
世界
e07b412faf
Improve local DNS server 2025-05-23 11:02:55 +08:00
anytls
8d62f33232
Update anytls
Co-authored-by: anytls <anytls>
2025-05-23 11:02:55 +08:00
世界
184344cbb0
Fix DNS dialer 2025-05-23 11:02:54 +08:00
世界
8947ceea2a
release: Skip override version for iOS 2025-05-23 11:02:54 +08:00
iikira
6be05a739a
Fix UDP DNS server crash
Signed-off-by: iikira <i2@mail.iikira.com>
2025-05-23 11:02:54 +08:00
ReleTor
e6cb0003e6
Fix fetch ECH configs 2025-05-23 11:02:53 +08:00
世界
96c6560507
Allow direct outbounds without domain_resolver 2025-05-23 11:02:53 +08:00
世界
f635bf6f76
Fix Tailscale dialer 2025-05-23 11:02:53 +08:00
dyhkwong
29e89ce723
Fix DNS over QUIC stream close 2025-05-23 11:02:52 +08:00
anytls
ad8bc33032
Update anytls
Co-authored-by: anytls <anytls>
2025-05-23 11:02:52 +08:00
Rambling2076
cc5803f5a8
Fix missing with_tailscale in Dockerfile
Signed-off-by: Rambling2076 <Rambling2076@proton.me>
2025-05-23 11:02:51 +08:00
世界
74955d9a2a
Fail when default DNS server not found 2025-05-23 11:02:51 +08:00
世界
a780c49c5d
Update gVisor to 20250319.0 2025-05-23 11:02:51 +08:00
世界
02727c2e5e
Explicitly reject detour to empty direct outbounds 2025-05-23 11:02:50 +08:00
世界
174a73749e
Add netns support 2025-05-23 11:02:50 +08:00
世界
8ccf8cf4a4
Add wildcard name support for predefined records 2025-05-23 11:02:50 +08:00
世界
4b852b45ed
Remove map usage in options 2025-05-23 11:02:50 +08:00
世界
b052d5e1cb
Fix unhandled DNS loop 2025-05-23 11:02:49 +08:00
世界
0ba818a8ef
Add wildcard-sni support for shadow-tls inbound 2025-05-23 11:02:48 +08:00
k9982874
e6bb0aedcc
Add ntp protocol sniffing 2025-05-23 11:02:48 +08:00
世界
2e2ab6d83e
option: Fix marshal legacy DNS options 2025-05-23 11:02:48 +08:00
世界
b25a5eba99
Make domain_resolver optional when only one DNS server is configured 2025-05-23 11:02:48 +08:00
世界
10b663d54a
Fix DNS lookup context pollution 2025-05-23 11:02:47 +08:00
世界
9c5303deeb
Fix http3 DNS server connecting to wrong address 2025-05-23 11:02:47 +08:00
Restia-Ashbell
1fa0add096
documentation: Fix typo 2025-05-23 11:02:47 +08:00
anytls
b5acbd0f08
Update sing-anytls
Co-authored-by: anytls <anytls>
2025-05-23 11:02:46 +08:00
k9982874
ac714721bd
Fix hosts DNS server 2025-05-23 11:02:46 +08:00
世界
d872331e90
Fix UDP DNS server crash 2025-05-23 11:02:46 +08:00
世界
20c4781a49
documentation: Fix missing ip_accept_any DNS rule option 2025-05-23 11:02:46 +08:00
世界
87373efbb6
Fix anytls dialer usage 2025-05-23 11:02:45 +08:00
世界
2f34022ded
Move predefined DNS server to rule action 2025-05-23 11:02:45 +08:00
世界
cb0df4620b
Fix domain resolver on direct outbound 2025-05-23 11:02:45 +08:00
Zephyruso
5941c9ceb2
Fix missing AnyTLS display name 2025-05-23 11:02:44 +08:00
anytls
d261c74180
Update sing-anytls
Co-authored-by: anytls <anytls>
2025-05-23 11:02:44 +08:00
Estel
7e9213d72c
documentation: Fix typo
Signed-off-by: Estel <callmebedrockdigger@gmail.com>
2025-05-23 11:02:44 +08:00
TargetLocked
8419930534
Fix parsing legacy DNS options 2025-05-23 11:02:43 +08:00
世界
7f2c4999ec
Fix DNS fallback 2025-05-23 11:02:43 +08:00
世界
d5771e6029
documentation: Fix missing hosts DNS server 2025-05-23 11:02:43 +08:00
anytls
5d3f4bad0c
Add MinIdleSession option to AnyTLS outbound
Co-authored-by: anytls <anytls>
2025-05-23 11:02:42 +08:00
ReleTor
6e9dcc7b65
documentation: Minor fixes 2025-05-23 11:02:42 +08:00
libtry486
3df2b68490
documentation: Fix typo
fix typo

Signed-off-by: libtry486 <89328481+libtry486@users.noreply.github.com>
2025-05-23 11:02:42 +08:00
Alireza Ahmadi
933f179849
Fix Outbound deadlock 2025-05-23 11:02:41 +08:00
世界
3a91afdd84
documentation: Fix AnyTLS doc 2025-05-23 11:02:41 +08:00
anytls
09110d512b
Add AnyTLS protocol 2025-05-23 11:02:40 +08:00
世界
841b70855f
Migrate to stdlib ECH support 2025-05-23 11:02:39 +08:00
世界
5db3f06f6a
Add fallback local DNS server for iOS 2025-05-23 11:02:39 +08:00
世界
916a1d436c
Get darwin local DNS server from libresolv 2025-05-23 11:02:38 +08:00
世界
9719d958b8
Improve resolve action 2025-05-23 11:02:38 +08:00
世界
ae65faceec
Add back port hopping to hysteria 1 2025-05-23 11:02:38 +08:00
xchacha20-poly1305
e0b2802247
Remove single quotes of raw Moziila certs 2025-05-23 11:02:38 +08:00
世界
81c4a1efc8
Add Tailscale endpoint 2025-05-23 11:02:37 +08:00
世界
cc2654d24a
Build legacy binaries with latest Go 2025-05-23 11:02:36 +08:00
世界
863671f73c
documentation: Remove outdated icons 2025-05-23 11:02:36 +08:00
世界
30e0990e32
documentation: Certificate store 2025-05-23 11:02:36 +08:00
世界
286f007b5d
documentation: TLS fragment 2025-05-23 11:02:35 +08:00
世界
c1dbb3f3c9
documentation: Outbound domain resolver 2025-05-23 11:02:35 +08:00
世界
5b885b44b1
documentation: Refactor DNS 2025-05-23 11:02:35 +08:00
世界
d1b146f91e
Add certificate store 2025-05-23 11:02:35 +08:00
世界
fb2ff27861
Add TLS fragment support 2025-05-23 11:02:23 +08:00
世界
667dc79d2a
refactor: Outbound domain resolver 2025-05-23 11:00:16 +08:00
世界
c998c7276d
refactor: DNS 2025-05-23 11:00:03 +08:00
10 changed files with 15 additions and 23 deletions

View File

@ -1,10 +1,11 @@
NAME = sing-box
COMMIT = $(shell git rev-parse --short HEAD)
TAGS ?= with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale
TAGS ?= with_gvisor,with_dhcp,with_wireguard,with_clash_api,with_quic,with_utls,with_tailscale
TAGS_TEST ?= with_gvisor,with_quic,with_wireguard,with_grpc,with_utls
GOHOSTOS = $(shell go env GOHOSTOS)
GOHOSTARCH = $(shell go env GOHOSTARCH)
VERSION=$(shell CGO_ENABLED=0 GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) go run github.com/sagernet/sing-box/cmd/internal/read_tag@latest)
VERSION=$(shell CGO_ENABLED=0 GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) go run ./cmd/internal/read_tag)
PARAMS = -v -trimpath -ldflags "-X 'github.com/sagernet/sing-box/constant.Version=$(VERSION)' -s -w -buildid="
MAIN_PARAMS = $(PARAMS) -tags "$(TAGS)"

View File

@ -7,6 +7,7 @@ import (
"strconv"
"time"
"github.com/sagernet/sing-box"
"github.com/sagernet/sing-box/experimental/deprecated"
"github.com/sagernet/sing-box/include"
"github.com/sagernet/sing-box/log"
@ -67,5 +68,6 @@ func preRun(cmd *cobra.Command, args []string) {
if len(configPaths) == 0 && len(configDirectories) == 0 {
configPaths = append(configPaths, "config.json")
}
globalCtx = include.Context(service.ContextWith(globalCtx, deprecated.NewStderrManager(log.StdLogger())))
globalCtx = service.ContextWith(globalCtx, deprecated.NewStderrManager(log.StdLogger()))
globalCtx = box.Context(globalCtx, include.InboundRegistry(), include.OutboundRegistry(), include.EndpointRegistry(), include.DNSTransportRegistry(), include.ServiceRegistry())
}

View File

@ -2,10 +2,6 @@
icon: material/alert-decagram
---
#### 1.12.0-beta.18
* Fixes and improvements
#### 1.12.0-beta.17
* Update quic-go to v0.52.0

4
go.sum
View File

@ -165,6 +165,8 @@ github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a h1:ObwtHN2VpqE0ZN
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
github.com/sagernet/nftables v0.3.0-beta.4 h1:kbULlAwAC3jvdGAC1P5Fa3GSxVwQJibNenDW2zaXr8I=
github.com/sagernet/nftables v0.3.0-beta.4/go.mod h1:OQXAjvjNGGFxaTgVCSTRIhYB5/llyVDeapVoENYBDS8=
github.com/sagernet/quic-go v0.51.0-beta.5 h1:/mME3sJvQ8k/JKP0oC/9XoWrm0znO7hWXviB5yiipJY=
github.com/sagernet/quic-go v0.51.0-beta.5/go.mod h1:OV+V5kEBb8kJS7k29MzDu6oj9GyMc7HA07sE1tedxz4=
github.com/sagernet/quic-go v0.52.0-beta.1 h1:hWkojLg64zjV+MJOvJU/kOeWndm3tiEfBLx5foisszs=
github.com/sagernet/quic-go v0.52.0-beta.1/go.mod h1:OV+V5kEBb8kJS7k29MzDu6oj9GyMc7HA07sE1tedxz4=
github.com/sagernet/sing v0.6.9/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
@ -172,6 +174,8 @@ github.com/sagernet/sing v0.6.11-0.20250521033217-30d675ea099b h1:ZjTCYPb5f7aHdf
github.com/sagernet/sing v0.6.11-0.20250521033217-30d675ea099b/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing-mux v0.3.2 h1:meZVFiiStvHThb/trcpAkCrmtJOuItG5Dzl1RRP5/NE=
github.com/sagernet/sing-mux v0.3.2/go.mod h1:pht8iFY4c9Xltj7rhVd208npkNaeCxzyXCgulDPLUDA=
github.com/sagernet/sing-quic v0.4.1-0.20250511050139-d459f561c9c3 h1:1J+s1yyZ8+YAYaClI+az8YuFgV9NGXUUCZnriKmos6w=
github.com/sagernet/sing-quic v0.4.1-0.20250511050139-d459f561c9c3/go.mod h1:Mv7CdSyLepmqoLT8rd88Qn3QMv5AbsgjEm3DvEhDVNE=
github.com/sagernet/sing-quic v0.5.0-beta.1 h1:nC0i/s8LhlZB8ev6laZCXF/uiwAE4kRdT4PcDdE4rI4=
github.com/sagernet/sing-quic v0.5.0-beta.1/go.mod h1:SAv/qdeDN+75msGG5U5ZIwG+3Ua50jVIKNrRSY8pkx0=
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=

View File

@ -3,7 +3,6 @@ package include
import (
"context"
"github.com/sagernet/sing-box"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/adapter/endpoint"
"github.com/sagernet/sing-box/adapter/inbound"
@ -40,10 +39,6 @@ import (
E "github.com/sagernet/sing/common/exceptions"
)
func Context(ctx context.Context) context.Context {
return box.Context(ctx, InboundRegistry(), OutboundRegistry(), EndpointRegistry(), DNSTransportRegistry(), ServiceRegistry())
}
func InboundRegistry() *inbound.Registry {
registry := inbound.NewRegistry()

View File

@ -221,14 +221,6 @@ func (t *Endpoint) Start(stage adapter.StartStage) error {
}
ipStack := t.server.ExportNetstack().ExportIPStack()
gErr := ipStack.SetSpoofing(tun.DefaultNIC, true)
if gErr != nil {
return gonet.TranslateNetstackError(gErr)
}
gErr = ipStack.SetPromiscuousMode(tun.DefaultNIC, true)
if gErr != nil {
return gonet.TranslateNetstackError(gErr)
}
ipStack.SetTransportProtocolHandler(tcp.ProtocolNumber, tun.NewTCPForwarder(t.ctx, ipStack, t).HandlePacket)
udpForwarder := tun.NewUDPForwarder(t.ctx, ipStack, t, t.udpTimeout)
ipStack.SetTransportProtocolHandler(udp.ProtocolNumber, udpForwarder.HandlePacket)

View File

@ -172,6 +172,8 @@ func (r *Router) RoutePacketConnectionEx(ctx context.Context, conn N.PacketConn,
} else {
r.logger.ErrorContext(ctx, err)
}
} else if onClose != nil {
onClose(nil)
}
}

View File

@ -58,7 +58,7 @@ func NewService(ctx context.Context, logger log.ContextLogger, tag string, optio
for i, entry := range options.Servers.Entries() {
inbound, loaded := inboundManager.Get(entry.Value)
if !loaded {
return nil, E.New("parse SSM server[", i, "]: inbound ", entry.Value, " not found")
return nil, E.New("parse SSM server[", i, "]: inbound ", entry.Value, "not found")
}
managedServer, isManaged := inbound.(adapter.ManagedSSMServer)
if !isManaged {

View File

@ -55,7 +55,7 @@ func (m *UserManager) Add(username string, password string) error {
m.access.Lock()
defer m.access.Unlock()
if _, found := m.usersMap[username]; found {
return E.New("user ", username, " already exists")
return E.New("user", username, "already exists")
}
m.usersMap[username] = password
return m.postUpdate()

View File

@ -32,7 +32,7 @@ func TestMain(m *testing.M) {
var globalCtx context.Context
func init() {
globalCtx = include.Context(context.Background())
globalCtx = box.Context(context.Background(), include.InboundRegistry(), include.OutboundRegistry(), include.EndpointRegistry(), include.DNSTransportRegistry(), include.ServiceRegistry())
}
func startInstance(t *testing.T, options option.Options) *box.Box {