Compare commits

..
Author SHA1 Message Date
世界 327df8cab6 documentation: Bump version 2024-07-27 16:31:49 +08:00
世界 954be11647 Add AdGuard DNS filter support 2024-07-27 16:31:15 +08:00
世界 aff6768ff6 Improve QUIC sniffer 2024-07-27 11:14:15 +08:00
世界 102b08a43b Add inline rule-set & Add reload for local rule-set 2024-07-27 11:06:13 +08:00
世界 fb0aa5f490 Unique rule-set names 2024-07-27 11:06:13 +08:00
世界 616d0cdfff Add accept empty DNS rule option 2024-07-27 11:06:13 +08:00
世界 be4c958c42 Add custom options for TUN auto-route and auto-redirect 2024-07-27 11:06:13 +08:00
世界 e89218441e Improve base DNS transports & Minor fixes 2024-07-27 11:06:02 +08:00
世界 d8d4be325c Add auto-redirect & Improve auto-route 2024-07-27 11:05:29 +08:00
世界 633371418e Add rule-set decompile command 2024-07-27 11:05:29 +08:00
世界 5f5f576bb9 Add IP address support for rule-set match match 2024-07-27 11:05:28 +08:00
世界 6040ccfc4b Improve usages of json.Unmarshal 2024-07-27 11:05:28 +08:00
世界 13268c52e0 Bump rule-set version 2024-07-27 11:05:28 +08:00
世界 050b429485 WTF is this 2024-07-27 11:05:28 +08:00
世界 eaa8e2dc70 platform: Fix clash server reload on android 2024-07-27 11:05:12 +08:00
世界 34f2c32ad1 platform: Add log update interval 2024-07-27 11:05:12 +08:00
世界 2c4d03cb48 platform: Prepare connections list 2024-07-27 11:05:12 +08:00
世界 d8c1247cd8 Drop support for go1.18 and go1.19 2024-07-27 11:05:12 +08:00
世界 3a351ee301 Introduce DTLS sniffer 2024-07-27 11:05:11 +08:00
iosmanthusand世界 91892aefe9 Introduce bittorrent related protocol sniffers
* Introduce bittorrent related protocol sniffers

including, sniffers of
1. BitTorrent Protocol (TCP)
2. uTorrent Transport Protocol (UDP)

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Co-authored-by: 世界 <i@sekai.icu>
2024-07-27 11:05:11 +08:00
世界 2c8a8303cd dns: Minor fixes 2024-07-27 11:04:57 +08:00
8 changed files with 18 additions and 34 deletions
+2 -2
View File
@@ -63,14 +63,14 @@ func convertRuleSet(sourcePath string) error {
return err
}
var outputPath string
if flagRuleSetCompileOutput == flagRuleSetCompileDefaultOutput {
if flagRuleSetConvertOutput == flagRuleSetCompileDefaultOutput {
if strings.HasSuffix(sourcePath, ".txt") {
outputPath = sourcePath[:len(sourcePath)-4] + ".srs"
} else {
outputPath = sourcePath + ".srs"
}
} else {
outputPath = flagRuleSetCompileOutput
outputPath = flagRuleSetConvertOutput
}
outputFile, err := os.Create(outputPath)
if err != nil {
+4
View File
@@ -2,6 +2,10 @@
icon: material/alert-decagram
---
#### 1.10.0-alpha.27
* Fixes and improvements
#### 1.10.0-alpha.25
* Add AdGuard DNS Filter support **1**
+2 -2
View File
@@ -4,9 +4,9 @@ icon: material/alert-decagram
!!! quote "sing-box 1.10.0 中的更改"
:material-plus: [client](#client)
:material-plus: [client](#client)
:material-delete-clock: [rule_set_ipcidr_match_source](#rule_set_ipcidr_match_source)
:material-plus: [rule_set_ip_cidr_match_source](#rule_set_ip_cidr_match_source)
:material-plus: [rule_set_ip_cidr_match_source](#rule_set_ip_cidr_match_source)
!!! quote "sing-box 1.8.0 中的更改"
+3 -3
View File
@@ -4,9 +4,9 @@ icon: material/new-box
!!! quote "Changes in sing-box 1.10.0"
:material-plus: QUIC client type detect support for QUIC
:material-plus: Chromium support for QUIC
:material-plus: BitTorrent support
:material-plus: QUIC client type detect support for QUIC
:material-plus: Chromium support for QUIC
:material-plus: BitTorrent support
:material-plus: DTLS support
If enabled in the inbound, the protocol and domain name (if present) of by the connection can be sniffed.
+3 -3
View File
@@ -4,9 +4,9 @@ icon: material/new-box
!!! quote "sing-box 1.10.0 中的更改"
:material-plus: QUIC 的 客户端类型探测支持
:material-plus: QUIC 的 Chromium 支持
:material-plus: BitTorrent 支持
:material-plus: QUIC 的 客户端类型探测支持
:material-plus: QUIC 的 Chromium 支持
:material-plus: BitTorrent 支持
:material-plus: DTLS 支持
如果在入站中启用,则可以嗅探连接的协议和域名(如果存在)。
+1 -1
View File
@@ -27,7 +27,7 @@ require (
github.com/sagernet/quic-go v0.45.1-beta.2
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691
github.com/sagernet/sing v0.5.0-alpha.13.0.20240726000009-a2f9fef93663
github.com/sagernet/sing-dns v0.3.0-beta.12
github.com/sagernet/sing-dns v0.3.0-beta.14
github.com/sagernet/sing-mux v0.2.0
github.com/sagernet/sing-quic v0.2.0-beta.12
github.com/sagernet/sing-shadowsocks v0.2.7
+2 -2
View File
@@ -117,8 +117,8 @@ github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4Wk
github.com/sagernet/sing v0.2.18/go.mod h1:OL6k2F0vHmEzXz2KW19qQzu172FDgSbUSODylighuVo=
github.com/sagernet/sing v0.5.0-alpha.13.0.20240726000009-a2f9fef93663 h1:BrOz4sPkDVvOxtcup8P3Fh9b9tk/lZyAMl+gkGEOLEE=
github.com/sagernet/sing v0.5.0-alpha.13.0.20240726000009-a2f9fef93663/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing-dns v0.3.0-beta.12 h1:mdTsaVU+0jopEKUDLwLmo8AbiSGZOly97oSPBDX3O8I=
github.com/sagernet/sing-dns v0.3.0-beta.12/go.mod h1:rscgSr5ixOPk8XM9ZMLuMXCyldEQ1nLvdl0nfv+lp00=
github.com/sagernet/sing-dns v0.3.0-beta.14 h1:/s+fJzYKsvLaNDt/2rjpsrDcN8wmCO2JbX6OFrl8Nww=
github.com/sagernet/sing-dns v0.3.0-beta.14/go.mod h1:rscgSr5ixOPk8XM9ZMLuMXCyldEQ1nLvdl0nfv+lp00=
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.2.0-beta.12 h1:BhvA5mmrDFEyDUQB5eeu+9UhF+ieyuNJ5Rsb0dAG3QY=
+1 -21
View File
@@ -4,13 +4,10 @@ import (
"context"
"io"
"net"
"time"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common/buf"
"github.com/sagernet/sing/common/bufio"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
)
@@ -49,24 +46,7 @@ func (h *Block) NewConnection(ctx context.Context, conn net.Conn, metadata adapt
}
func (h *Block) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error {
conn.Close()
h.logger.InfoContext(ctx, "blocked packet connection to ", metadata.Destination)
writer := &discardPacketWriter{
timer: time.AfterFunc(C.UDPTimeout, func() {
_ = conn.Close()
}),
}
_, _ = bufio.CopyPacket(writer, conn)
return nil
}
type discardPacketWriter struct {
timer *time.Timer
}
func (w *discardPacketWriter) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error {
if w.timer.Stop() {
w.timer.Reset(C.UDPTimeout)
}
buffer.Release()
return nil
}