Compare commits

..

34 Commits

Author SHA1 Message Date
世界
3341b62269 documentation: Bump version 2024-04-28 18:45:28 +08:00
世界
45087ff796 documentation: Update DNS manual 2024-04-28 18:45:28 +08:00
世界
086080a863 dialer: Allow nil router 2024-04-28 18:45:28 +08:00
世界
ea24a7c02c Add rule-set match command 2024-04-28 18:45:28 +08:00
世界
c31a717434 Add bypass_domain and search_domain platform HTTP proxy options 2024-04-28 18:45:28 +08:00
世界
b3bb64b365 Update gVisor to 20240422.0 2024-04-28 18:45:28 +08:00
世界
9dddf9e57b Update quic-go to v0.43.0 2024-04-28 18:45:28 +08:00
世界
81527902e6 Fixed order for Clash modes 2024-04-28 18:45:28 +08:00
气息
c66118da5f Fix DNS exchange index
Signed-off-by: 气息 <qdshizh@gmail.com>
2024-04-28 18:45:28 +08:00
dyhkwong
5575d34b4f Always disable cache for fake-ip servers 2024-04-28 18:45:28 +08:00
PuerNya
6201cf4191 Always disable cache for fake-ip DNS transport if independent_cache disabled 2024-04-28 13:22:55 +08:00
世界
0da8285374 Fix missing rule_set_ipcidr_match_source item in DNS rules 2024-04-28 13:22:55 +08:00
世界
8c2343616f Improve DNS truncate behavior 2024-04-28 13:22:55 +08:00
世界
2771d3d7c2 Fix DNS fallthrough incorrectly 2024-04-28 13:22:54 +08:00
世界
25b7c9a0ec Add rejected DNS response cache support 2024-04-28 13:22:54 +08:00
世界
bc6d8dd8fb Add support for client-subnet DNS options 2024-04-28 13:22:43 +08:00
世界
276ad14435 Add address filter support for DNS rules 2024-04-28 13:22:42 +08:00
世界
ca13132f17 Fix timezone for Android and iOS 2024-04-28 13:22:42 +08:00
世界
eb55eecadf Improve loopback detector 2024-04-28 13:22:42 +08:00
世界
bb8e2bb8f9 Remove unused fakeip packet conn 2024-04-28 13:22:42 +08:00
世界
b95ecc232d Set the default TCP keep alive period 2024-04-28 13:22:41 +08:00
世界
ef287bafc2 Migrate ntp service to library 2024-04-28 13:22:41 +08:00
世界
04069996d6 Handle Windows power events 2024-04-28 13:22:41 +08:00
世界
08eddf6c24 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-04-28 13:22:41 +08:00
世界
8ac28db3ba 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-04-28 13:22:41 +08:00
世界
76ad7ffcf1 badtls: Support uTLS and TLS ECH for read waiter 2024-04-28 13:22:41 +08:00
世界
88c47c753a Fix usage of github actions 2024-04-28 13:22:14 +08:00
dyhkwong
3cd3807b27 Fix fake-ip mapping 2024-04-27 23:49:22 +08:00
HystericalDragon
2616f2ae7a Remove unused encoder 2024-04-27 23:49:22 +08:00
renovate[bot]
96f8d9d740 [dependencies] Update golangci/golangci-lint-action action to v5 2024-04-27 23:49:22 +08:00
renovate[bot]
94bb9ed7d2 [dependencies] Update actions/checkout digest to 0ad4b8f 2024-04-27 23:49:22 +08:00
世界
50197a3f49 documentation: Update TestFlight 2024-04-26 20:45:28 +08:00
世界
0aa43d6c01 documentation: Fix strict_route description 2024-04-26 20:24:42 +08:00
世界
dccc3a9fc0 Fix linux workflow 2024-04-26 20:24:36 +08:00
7 changed files with 9 additions and 39 deletions

View File

@@ -24,7 +24,6 @@ jobs:
${{ secrets.GPG_KEY }}
echo "HOME=$HOME" >> "$GITHUB_ENV"
EOF
echo "HOME=$HOME" >> "$GITHUB_ENV"
- name: Publish release
uses: goreleaser/goreleaser-action@v5
with:

View File

@@ -99,12 +99,3 @@ func ExtendContext(ctx context.Context) (context.Context, *InboundContext) {
}
return WithContext(ctx, &newMetadata), &newMetadata
}
func OverrideContext(ctx context.Context) context.Context {
if metadata := ContextFrom(ctx); metadata != nil {
var newMetadata InboundContext
newMetadata = *metadata
return WithContext(ctx, &newMetadata)
}
return ctx
}

View File

@@ -1,16 +1,11 @@
package mux
import (
"context"
"net"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-mux"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
)
@@ -35,7 +30,7 @@ func NewClientWithOptions(dialer N.Dialer, logger logger.Logger, options option.
}
}
return mux.NewClient(mux.Options{
Dialer: &clientDialer{dialer},
Dialer: dialer,
Logger: logger,
Protocol: options.Protocol,
MaxConnections: options.MaxConnections,
@@ -45,15 +40,3 @@ func NewClientWithOptions(dialer N.Dialer, logger logger.Logger, options option.
Brutal: brutalOptions,
})
}
type clientDialer struct {
N.Dialer
}
func (d *clientDialer) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) {
return d.Dialer.DialContext(adapter.OverrideContext(ctx), network, destination)
}
func (d *clientDialer) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) {
return d.Dialer.ListenPacket(adapter.OverrideContext(ctx), destination)
}

View File

@@ -27,10 +27,11 @@ func (c *echClientConfig) DialEarly(ctx context.Context, conn net.PacketConn, ad
return quic.DialEarly(ctx, conn, addr, c.config, config)
}
func (c *echClientConfig) CreateTransport(conn net.PacketConn, quicConnPtr *quic.EarlyConnection, serverAddr M.Socksaddr, quicConfig *quic.Config) http.RoundTripper {
func (c *echClientConfig) CreateTransport(conn net.PacketConn, quicConnPtr *quic.EarlyConnection, serverAddr M.Socksaddr, quicConfig *quic.Config, enableDatagrams bool) http.RoundTripper {
return &http3.RoundTripper{
TLSClientConfig: c.config,
QUICConfig: quicConfig,
EnableDatagrams: enableDatagrams,
Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
quicConn, err := quic.DialEarly(ctx, conn, serverAddr.UDPAddr(), tlsCfg, cfg)
if err != nil {

View File

@@ -2,10 +2,6 @@
icon: material/alert-decagram
---
#### 1.9.0-rc.14
* Fixes and improvements
#### 1.9.0-rc.13
* Update Hysteria protocol

4
go.mod
View File

@@ -24,12 +24,12 @@ require (
github.com/sagernet/cloudflare-tls v0.0.0-20231208171750-a4483c1b7cd1
github.com/sagernet/gomobile v0.1.3
github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f
github.com/sagernet/quic-go v0.43.0-beta.2
github.com/sagernet/quic-go v0.43.0-beta.1
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691
github.com/sagernet/sing v0.4.0-beta.18
github.com/sagernet/sing-dns v0.2.0-beta.16
github.com/sagernet/sing-mux v0.2.0
github.com/sagernet/sing-quic v0.1.13-beta.5
github.com/sagernet/sing-quic v0.1.13-beta.3
github.com/sagernet/sing-shadowsocks v0.2.6
github.com/sagernet/sing-shadowsocks2 v0.2.0
github.com/sagernet/sing-shadowtls v0.1.4

8
go.sum
View File

@@ -101,8 +101,8 @@ github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f h1:NkhuupzH5ch7b/Y
github.com/sagernet/gvisor v0.0.0-20240428053021-e691de28565f/go.mod h1:KXmw+ouSJNOsuRpg4wgwwCQuunrGz4yoAqQjsLjc6N0=
github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97 h1:iL5gZI3uFp0X6EslacyapiRz7LLSJyr4RajF/BhMVyE=
github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
github.com/sagernet/quic-go v0.43.0-beta.2 h1:O10Saj7TkujwFGD0TG47HTcVkrEl3tbW6adtu+BFKqs=
github.com/sagernet/quic-go v0.43.0-beta.2/go.mod h1:3EtxR1Yaa1FZu6jFPiBHpOAdhOxL4A3EPxmiVgjJvVM=
github.com/sagernet/quic-go v0.43.0-beta.1 h1:q0ZCY5THUT3RutEHQzGJyV0qaqLLNb3diHqz4Jv0PEM=
github.com/sagernet/quic-go v0.43.0-beta.1/go.mod h1:3EtxR1Yaa1FZu6jFPiBHpOAdhOxL4A3EPxmiVgjJvVM=
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=
@@ -112,8 +112,8 @@ github.com/sagernet/sing-dns v0.2.0-beta.16 h1:bzd4B8eHD7/WO3HrYknvgE8A56/R3n5oX
github.com/sagernet/sing-dns v0.2.0-beta.16/go.mod h1:XU6Vqr6aHcMz/34Fcv8jmXpRCEuShzW+B7Qg1Xe1nxY=
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.13-beta.5 h1:smhCPV+U4nM9phDIuxsPvSkCHuqFb23Gq7tf2VXh6So=
github.com/sagernet/sing-quic v0.1.13-beta.5/go.mod h1:tHO6VRzZlnLOEZnD/D9WfDOcZpYwp8UYbvVt6gEM28s=
github.com/sagernet/sing-quic v0.1.13-beta.3 h1:llApU20jCMAPjSbeysJWCaY90iW35eV+EM2l132Llqg=
github.com/sagernet/sing-quic v0.1.13-beta.3/go.mod h1:bXXE+1DqIwnWvqQD8wYLGgqNbaxfOzpyiH565ikAaxY=
github.com/sagernet/sing-shadowsocks v0.2.6 h1:xr7ylAS/q1cQYS8oxKKajhuQcchd5VJJ4K4UZrrpp0s=
github.com/sagernet/sing-shadowsocks v0.2.6/go.mod h1:j2YZBIpWIuElPFL/5sJAj470bcn/3QQ5lxZUNKLDNAM=
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=