Compare commits

..
Author SHA1 Message Date
世界 f0463a2182 documentation: Bump version 2024-03-02 00:48:44 +08:00
PuerNyaand世界 cd71e29440 Always disable cache for fake-ip DNS transport if independent_cache disabled 2024-03-02 00:48:30 +08:00
世界 e471255511 Fix missing rule_set_ipcidr_match_source item in DNS rules 2024-03-02 00:48:30 +08:00
世界 7f96e2c9b5 Add bypass_domain and search_domain platform HTTP proxy options 2024-03-02 00:48:30 +08:00
世界 63da3feb4a Update gVisor to 20240206.0 2024-03-02 00:48:30 +08:00
世界 4349dc7f10 Update quic-go to v0.41.0 2024-03-02 00:48:30 +08:00
世界 626f2b8bc0 Fixed order for Clash modes 2024-03-02 00:48:30 +08:00
世界 3d62227684 Improve DNS truncate behavior 2024-03-02 00:48:30 +08:00
世界 da11b8e49f Add rejected DNS response cache support 2024-03-02 00:48:24 +08:00
世界 7cb8a3898c Add support for client-subnet DNS options 2024-03-02 00:48:24 +08:00
世界 3f642f08b6 Add address filter support for DNS rules 2024-03-02 00:48:24 +08:00
世界 825963737f Fix timezone for Android and iOS 2024-02-29 13:08:26 +08:00
世界 d0e1fb1c03 Handle Windows power events 2024-02-29 13:08:26 +08:00
世界 ca53d40396 Improve domain suffix match behavior
For historical reasons, sing-box's `domain_suffix` rule matches literal prefixes instead of the same as other projects.

This change modifies the behavior of `domain_suffix`: If the rule value is prefixed with `.`,
the behavior is unchanged, otherwise it matches `(domain|.+\.domain)` instead.
2024-02-29 13:08:11 +08:00
世界 5a61ba1987 Remove PROCESS_NAME_NATIVE dwFlag in process query output
The `process_path` rule of sing-box is inherited from Clash,
the original code uses the local system's path format (e.g. `\Device\HarddiskVolume1\folder\program.exe`),
but when the device has multiple disks, the HarddiskVolume serial number is not stable.

This change make QueryFullProcessImageNameW output a Win32 path (such as `C:\folder\program.exe`),
which will disrupt the existing `process_path` use cases in Windows.
2024-02-29 13:06:52 +08:00
世界 9690fd03ef badtls: Support uTLS and TLS ECH for read waiter 2024-02-29 13:06:52 +08:00
世界 2b93b74d38 Fix SO_BINDTOIFINDEX usage 2024-02-29 13:03:05 +08:00
4 changed files with 21 additions and 14 deletions
+12 -1
View File
@@ -2,10 +2,21 @@
icon: material/alert-decagram
---
#### 1.9.0-beta.4
#### 1.9.0-beta.7
* Fixes and improvements
#### 1.9.0-beta.6
* Fix address filter DNS rule items **1**
* Fix DNS outbound responding with wrong data
* Fixes and improvements
**1**:
Fixed an issue where address filter DNS rule was incorrectly rejected under certain circumstances.
If you have enabled `store_rdrc` to save results, consider clearing the cache file.
#### 1.8.7
* Fixes and improvements
+2 -2
View File
@@ -26,8 +26,8 @@ require (
github.com/sagernet/gvisor v0.0.0-20240214044702-a3d61928a32f
github.com/sagernet/quic-go v0.41.0-beta.2
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691
github.com/sagernet/sing v0.3.3-beta.2
github.com/sagernet/sing-dns v0.2.0-beta.12
github.com/sagernet/sing v0.3.4-beta.1
github.com/sagernet/sing-dns v0.2.0-beta.14
github.com/sagernet/sing-mux v0.2.0
github.com/sagernet/sing-quic v0.1.9-beta.1
github.com/sagernet/sing-shadowsocks v0.2.6
+4 -4
View File
@@ -109,10 +109,10 @@ github.com/sagernet/quic-go v0.41.0-beta.2/go.mod h1:X10Mf9DVHuSEReOLov/XuflD13M
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 h1:5Th31OC6yj8byLGkEnIYp6grlXfo1QYUfiYFGjewIdc=
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU=
github.com/sagernet/sing v0.2.18/go.mod h1:OL6k2F0vHmEzXz2KW19qQzu172FDgSbUSODylighuVo=
github.com/sagernet/sing v0.3.3-beta.2 h1:ZQkONX/Vwu0p3qxWMlQDDABwAxdH8jVD3rKUB/o1f1o=
github.com/sagernet/sing v0.3.3-beta.2/go.mod h1:qHySJ7u8po9DABtMYEkNBcOumx7ZZJf/fbv2sfTkNHE=
github.com/sagernet/sing-dns v0.2.0-beta.12 h1:d9rd5YKYW1DleHHflgsLivPbnruKc7SEYXKZbmz48VM=
github.com/sagernet/sing-dns v0.2.0-beta.12/go.mod h1:gfs585rEu+ZgsXJJiecEIK5avrF5SYlCAbFfZ1B66hs=
github.com/sagernet/sing v0.3.4-beta.1 h1:y1jKu9u11drNO00ycJ6KOZd1axQdozU92MdhWuAmWnU=
github.com/sagernet/sing v0.3.4-beta.1/go.mod h1:qHySJ7u8po9DABtMYEkNBcOumx7ZZJf/fbv2sfTkNHE=
github.com/sagernet/sing-dns v0.2.0-beta.14 h1:/lelsvJa5S/BWokuYyeCkYdi3hf7DlKGdgsKuamJ9V8=
github.com/sagernet/sing-dns v0.2.0-beta.14/go.mod h1:gfs585rEu+ZgsXJJiecEIK5avrF5SYlCAbFfZ1B66hs=
github.com/sagernet/sing-mux v0.2.0 h1:4C+vd8HztJCWNYfufvgL49xaOoOHXty2+EAjnzN3IYo=
github.com/sagernet/sing-mux v0.2.0/go.mod h1:khzr9AOPocLa+g53dBplwNDz4gdsyx/YM3swtAhlkHQ=
github.com/sagernet/sing-quic v0.1.9-beta.1 h1:rCmgLUq2d4EA643EAvjbfUYYVMPCss0GpmS4pJCT2Lw=
+3 -7
View File
@@ -46,8 +46,8 @@ func (d *DNS) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.Pa
}
func (d *DNS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
metadata.Destination = M.Socksaddr{}
defer conn.Close()
ctx = adapter.WithContext(ctx, &metadata)
for {
err := d.handleConnection(ctx, conn, metadata)
if err != nil {
@@ -98,6 +98,7 @@ func (d *DNS) handleConnection(ctx context.Context, conn net.Conn, metadata adap
}
func (d *DNS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error {
metadata.Destination = M.Socksaddr{}
var reader N.PacketReader = conn
var counters []N.CountFunc
var cachedPackets []*N.PacketBuffer
@@ -116,7 +117,6 @@ func (d *DNS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metada
}
break
}
ctx = adapter.WithContext(ctx, &metadata)
fastClose, cancel := common.ContextWithCancelCause(ctx)
timeout := canceler.New(fastClose, cancel, C.DNSTimeout)
var group task.Group
@@ -165,15 +165,11 @@ func (d *DNS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metada
return err
}
timeout.Update()
responseBuffer := buf.NewPacket()
responseBuffer.Resize(1024, 0)
n, err := response.PackBuffer(responseBuffer.FreeBytes())
responseBuffer, err := dns.TruncateDNSMessage(&message, response, 1024)
if err != nil {
cancel(err)
responseBuffer.Release()
return err
}
responseBuffer.Truncate(len(n))
err = conn.WritePacket(responseBuffer, destination)
if err != nil {
cancel(err)