Compare commits

..

59 Commits

Author SHA1 Message Date
世界
f70ca3d190
documentation: Bump version 2025-03-27 19:55:23 +08:00
dyhkwong
f16ab5e3df
Fix DNS over QUIC stream close 2025-03-27 19:25:27 +08:00
anytls
7ad655dec6
Update anytls
Co-authored-by: anytls <anytls>
2025-03-27 19:25:27 +08:00
Rambling2076
581b7a2a6d
Fix missing with_tailscale in Dockerfile
Signed-off-by: Rambling2076 <Rambling2076@proton.me>
2025-03-27 19:25:27 +08:00
世界
cebd6118fd
Fail when default DNS server not found 2025-03-27 19:25:27 +08:00
世界
a492586308
Update gVisor to 20250319.0 2025-03-27 19:25:27 +08:00
世界
2f27a9c307
release: Do not build tailscale on iOS and tvOS 2025-03-27 19:25:26 +08:00
世界
b710519728
Explicitly reject detour to empty direct outbounds 2025-03-27 19:25:25 +08:00
世界
acf433fb83
Ignore UDP offload error 2025-03-27 19:25:25 +08:00
世界
0071a4586a
Add netns support 2025-03-27 19:25:25 +08:00
世界
45ebaabcd7
Add wildcard name support for predefined records 2025-03-27 19:25:24 +08:00
世界
b2f456d6c5
Remove map usage in options 2025-03-27 19:25:24 +08:00
世界
08534c277e
Fix unhandled DNS loop 2025-03-27 19:25:23 +08:00
世界
bbd3b5b054
Add wildcard-sni support for shadow-tls inbound 2025-03-27 19:25:23 +08:00
世界
374647601d
Fix Tailscale DNS 2025-03-27 19:25:23 +08:00
k9982874
c934365929
Add ntp protocol sniffing 2025-03-27 19:25:23 +08:00
世界
f33287c50f
option: Fix marshal legacy DNS options 2025-03-27 19:25:22 +08:00
世界
477c1c32f8
Make domain_resolver optional when only one DNS server is configured 2025-03-27 19:25:22 +08:00
世界
4e01443a26
Fix DNS lookup context pollution 2025-03-27 19:25:21 +08:00
世界
d9e9a589db
Fix http3 DNS server connecting to wrong address 2025-03-27 19:25:21 +08:00
Restia-Ashbell
1339dcddce
documentation: Fix typo 2025-03-27 19:25:21 +08:00
anytls
84de755eb6
Update sing-anytls
Co-authored-by: anytls <anytls>
2025-03-27 19:25:21 +08:00
k9982874
7058c8e0d0
Fix hosts DNS server 2025-03-27 19:25:20 +08:00
世界
12b4205c3c
Fix UDP DNS server crash 2025-03-27 19:25:20 +08:00
世界
374eaa9301
documentation: Fix missing ip_accept_any DNS rule option 2025-03-27 19:25:20 +08:00
世界
9ddcd1c154
Fix anytls dialer usage 2025-03-27 19:25:20 +08:00
世界
7473db9515
Move predefined DNS server to rule action 2025-03-27 19:25:19 +08:00
世界
6d6789a4c5
Fix domain resolver on direct outbound 2025-03-27 19:25:19 +08:00
Zephyruso
f9d5927101
Fix missing AnyTLS display name 2025-03-27 19:25:19 +08:00
anytls
57c866c4d4
Update sing-anytls
Co-authored-by: anytls <anytls>
2025-03-27 19:25:18 +08:00
Estel
4d36ebe654
documentation: Fix typo
Signed-off-by: Estel <callmebedrockdigger@gmail.com>
2025-03-27 19:25:18 +08:00
TargetLocked
182c9adf00
Fix parsing legacy DNS options 2025-03-27 19:25:18 +08:00
世界
b43d8d2298
Fix DNS fallback 2025-03-27 19:25:17 +08:00
世界
f17b6fe703
documentation: Fix missing hosts DNS server 2025-03-27 19:25:17 +08:00
anytls
e2303234e8
Add MinIdleSession option to AnyTLS outbound
Co-authored-by: anytls <anytls>
2025-03-27 19:25:16 +08:00
ReleTor
96e4fe5125
documentation: Minor fixes 2025-03-27 19:25:16 +08:00
libtry486
f6fe6312bc
documentation: Fix typo
fix typo

Signed-off-by: libtry486 <89328481+libtry486@users.noreply.github.com>
2025-03-27 19:25:16 +08:00
Alireza Ahmadi
4c4d5e70c6
Fix Outbound deadlock 2025-03-27 19:25:16 +08:00
世界
d6f46598ff
documentation: Fix AnyTLS doc 2025-03-27 19:25:16 +08:00
anytls
78a7577575
Add AnyTLS protocol 2025-03-27 19:25:16 +08:00
世界
e56e6f9565
Migrate to stdlib ECH support 2025-03-27 19:25:15 +08:00
世界
6a4ae71992
Add fallback local DNS server for iOS 2025-03-27 19:25:15 +08:00
世界
fd97777f91
Get darwin local DNS server from libresolv 2025-03-27 19:25:15 +08:00
世界
13e9dc9cd6
Improve resolve action 2025-03-27 19:25:15 +08:00
世界
51b9d7fce1
Fix toolchain version 2025-03-27 19:25:15 +08:00
世界
3d37d37d38
Add back port hopping to hysteria 1 2025-03-27 19:25:14 +08:00
世界
f1fe1c5f4e
Update dependencies 2025-03-27 19:25:14 +08:00
xchacha20-poly1305
b830ef72e1
Remove single quotes of raw Moziila certs 2025-03-27 19:25:14 +08:00
世界
1ac3b3565f
Add Tailscale endpoint 2025-03-27 19:25:13 +08:00
世界
76d1f8cf5c
Build legacy binaries with latest Go 2025-03-27 19:25:13 +08:00
世界
70d64b0da1
documentation: Remove outdated icons 2025-03-27 19:25:13 +08:00
世界
d10dba568d
documentation: Certificate store 2025-03-27 19:25:12 +08:00
世界
2c6d0dba9e
documentation: TLS fragment 2025-03-27 19:25:12 +08:00
世界
dfd56bbcb3
documentation: Outbound domain resolver 2025-03-27 19:25:12 +08:00
世界
a7a3b4e2e1
documentation: Refactor DNS 2025-03-27 19:25:11 +08:00
世界
ed1ea104eb
Add certificate store 2025-03-27 19:25:10 +08:00
世界
511ba9bd6a
Add TLS fragment support 2025-03-27 19:25:10 +08:00
世界
ea442e0608
refactor: Outbound domain resolver 2025-03-27 19:25:10 +08:00
世界
86116b9423
refactor: DNS 2025-03-27 19:25:10 +08:00
8 changed files with 11 additions and 77 deletions

View File

@ -27,8 +27,11 @@ func main() {
)
if flagRunNightly {
var version badversion.Version
version, err = build_shared.ReadTagVersion()
version, err = build_shared.ReadTagVersionRev()
if err == nil {
if version.PreReleaseIdentifier == "" {
version.Patch++
}
versionStr = version.String()
}
} else {

View File

@ -102,12 +102,12 @@ func NewWithOptions(options Options) (N.Dialer, error) {
}
dnsQueryOptions.Transport = transport
resolveFallbackDelay = time.Duration(dialOptions.FallbackDelay)
} else if options.NewDialer {
return nil, E.New("missing domain resolver for domain server address")
} else {
transports := dnsTransport.Transports()
if len(transports) < 2 {
dnsQueryOptions.Transport = dnsTransport.Default()
} else if options.NewDialer {
return nil, E.New("missing domain resolver for domain server address")
} else {
deprecated.Report(options.Context, deprecated.OptionMissingDomainResolver)
}

View File

@ -15,8 +15,6 @@ func TruncateDNSMessage(request *dns.Msg, response *dns.Msg, headroom int) (*buf
}
responseLen := response.Len()
if responseLen > maxLen {
copyResponse := *response
response = &copyResponse
response.Truncate(maxLen)
}
buffer := buf.NewSize(headroom*2 + 1 + responseLen)

View File

@ -2,7 +2,7 @@
icon: material/alert-decagram
---
#### 1.12.0-alpha.23
#### 1.12.0-alpha.21
* Fixes and improvements

2
go.mod
View File

@ -35,7 +35,7 @@ require (
github.com/sagernet/sing-tun v0.6.2-0.20250319123703-35b5747b44ec
github.com/sagernet/sing-vmess v0.2.0
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7
github.com/sagernet/tailscale v1.80.3-mod.2
github.com/sagernet/tailscale v1.80.3-mod.0
github.com/sagernet/utls v1.6.7
github.com/sagernet/wireguard-go v0.0.1-beta.5
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854

4
go.sum
View File

@ -196,8 +196,8 @@ github.com/sagernet/sing-vmess v0.2.0 h1:pCMGUXN2k7RpikQV65/rtXtDHzb190foTfF9IGT
github.com/sagernet/sing-vmess v0.2.0/go.mod h1:jDAZ0A0St1zVRkyvhAPRySOFfhC+4SQtO5VYyeFotgA=
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 h1:DImB4lELfQhplLTxeq2z31Fpv8CQqqrUwTbrIRumZqQ=
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7/go.mod h1:FP9X2xjT/Az1EsG/orYYoC+5MojWnuI7hrffz8fGwwo=
github.com/sagernet/tailscale v1.80.3-mod.2 h1:hT0CI74q727EuCcgQ+T4pvon8V0aoi4vTAxah7GsNMQ=
github.com/sagernet/tailscale v1.80.3-mod.2/go.mod h1:EBxXsWu4OH2ELbQLq32WoBeIubG8KgDrg4/Oaxjs6lI=
github.com/sagernet/tailscale v1.80.3-mod.0 h1:oHIdivbR/yxoiA9d3a2rRlhYn2shY9XVF35Rr8jW508=
github.com/sagernet/tailscale v1.80.3-mod.0/go.mod h1:EBxXsWu4OH2ELbQLq32WoBeIubG8KgDrg4/Oaxjs6lI=
github.com/sagernet/utls v1.6.7 h1:Ep3+aJ8FUGGta+II2IEVNUc3EDhaRCZINWkj/LloIA8=
github.com/sagernet/utls v1.6.7/go.mod h1:Uua1TKO/FFuAhLr9rkaVnnrTmmiItzDjv1BUb2+ERwM=
github.com/sagernet/wireguard-go v0.0.1-beta.5 h1:aBEsxJUMEONwOZqKPIkuAcv4zJV5p6XlzEN04CF0FXc=

View File

@ -4,7 +4,6 @@ import (
"bytes"
"context"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
)
@ -32,7 +31,7 @@ func (o *Options) UnmarshalJSONContext(ctx context.Context, content []byte) erro
return err
}
o.RawMessage = content
return checkOptions(o)
return nil
}
type LogOptions struct {
@ -44,52 +43,3 @@ type LogOptions struct {
}
type StubOptions struct{}
func checkOptions(options *Options) error {
err := checkInbounds(options.Inbounds)
if err != nil {
return err
}
err = checkOutbounds(options.Outbounds, options.Endpoints)
if err != nil {
return err
}
return nil
}
func checkInbounds(inbounds []Inbound) error {
seen := make(map[string]bool)
for _, inbound := range inbounds {
if inbound.Tag == "" {
continue
}
if seen[inbound.Tag] {
return E.New("duplicate inbound tag: ", inbound.Tag)
}
seen[inbound.Tag] = true
}
return nil
}
func checkOutbounds(outbounds []Outbound, endpoints []Endpoint) error {
seen := make(map[string]bool)
for _, outbound := range outbounds {
if outbound.Tag == "" {
continue
}
if seen[outbound.Tag] {
return E.New("duplicate outbound/endpoint tag: ", outbound.Tag)
}
seen[outbound.Tag] = true
}
for _, endpoint := range endpoints {
if endpoint.Tag == "" {
continue
}
if seen[endpoint.Tag] {
return E.New("duplicate outbound/endpoint tag: ", endpoint.Tag)
}
seen[endpoint.Tag] = true
}
return nil
}

View File

@ -2,10 +2,8 @@ package tailscale
import (
"context"
"crypto/tls"
"fmt"
"net"
"net/http"
"net/netip"
"net/url"
"os"
@ -149,17 +147,6 @@ func NewEndpoint(ctx context.Context, router adapter.Router, logger log.ContextL
return dnsRouter.Lookup(ctx, host, outboundDialer.(dialer.ResolveDialer).QueryOptions())
},
DNS: &dnsConfigurtor{},
HTTPClient: &http.Client{
Transport: &http.Transport{
ForceAttemptHTTP2: true,
DialContext: func(ctx context.Context, network, address string) (net.Conn, error) {
return outboundDialer.DialContext(ctx, network, M.ParseSocksaddr(address))
},
TLSClientConfig: &tls.Config{
RootCAs: adapter.RootPoolFromContext(ctx),
},
},
},
}
return &Endpoint{
Adapter: endpoint.NewAdapter(C.TypeTailscale, tag, []string{N.NetworkTCP, N.NetworkUDP}, nil),
@ -459,10 +446,6 @@ func (t *Endpoint) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn,
t.router.RoutePacketConnectionEx(ctx, conn, metadata, onClose)
}
func (t *Endpoint) Server() *tsnet.Server {
return t.server
}
func addressFromAddr(destination netip.Addr) tcpip.Address {
if destination.Is6() {
return tcpip.AddrFrom16(destination.As16())