forked from SagerNet/sing-box
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
572 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
release: | ||
types: | ||
- released | ||
- prereleased | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder | ||
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder | ||
LABEL maintainer="nekohasekai <[email protected]>" | ||
COPY . /go/src/github.com/sagernet/sing-box | ||
WORKDIR /go/src/github.com/sagernet/sing-box | ||
|
@@ -15,7 +15,7 @@ RUN set -ex \ | |
&& go build -v -trimpath -tags \ | ||
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api" \ | ||
-o /go/bin/sing-box \ | ||
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid=" \ | ||
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid= -checklinkname=0" \ | ||
./cmd/sing-box | ||
FROM --platform=$TARGETPLATFORM alpine AS dist | ||
LABEL maintainer="nekohasekai <[email protected]>" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule apple
updated
7 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package sniff | ||
|
||
import ( | ||
"bufio" | ||
"context" | ||
"io" | ||
"os" | ||
"strings" | ||
|
||
"github.com/sagernet/sing-box/adapter" | ||
C "github.com/sagernet/sing-box/constant" | ||
) | ||
|
||
func SSH(_ context.Context, metadata *adapter.InboundContext, reader io.Reader) error { | ||
scanner := bufio.NewScanner(reader) | ||
if !scanner.Scan() { | ||
return os.ErrInvalid | ||
} | ||
fistLine := scanner.Text() | ||
if !strings.HasPrefix(fistLine, "SSH-2.0-") { | ||
return os.ErrInvalid | ||
} | ||
metadata.Protocol = C.ProtocolSSH | ||
metadata.Client = fistLine[8:] | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package sniff_test | ||
|
||
import ( | ||
"bytes" | ||
"context" | ||
"encoding/hex" | ||
"testing" | ||
|
||
"github.com/sagernet/sing-box/adapter" | ||
"github.com/sagernet/sing-box/common/sniff" | ||
C "github.com/sagernet/sing-box/constant" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestSniffSSH(t *testing.T) { | ||
t.Parallel() | ||
|
||
pkt, err := hex.DecodeString("5353482d322e302d64726f70626561720d0a000001a40a1492892570d1223aef61b0d647972c8bd30000009f637572766532353531392d7368613235362c637572766532353531392d736861323536406c69627373682e6f72672c6469666669652d68656c6c6d616e2d67726f757031342d7368613235362c6469666669652d68656c6c6d616e2d67726f757031342d736861312c6b6578677565737332406d6174742e7563632e61736e2e61752c6b65782d7374726963742d732d763030406f70656e7373682e636f6d000000207373682d656432353531392c7273612d736861322d3235362c7373682d7273610000003363686163686132302d706f6c7931333035406f70656e7373682e636f6d2c6165733132382d6374722c6165733235362d6374720000003363686163686132302d706f6c7931333035406f70656e7373682e636f6d2c6165733132382d6374722c6165733235362d63747200000017686d61632d736861312c686d61632d736861322d32353600000017686d61632d736861312c686d61632d736861322d323536000000046e6f6e65000000046e6f6e65000000000000000000000000002aa6ed090585b7d635b6") | ||
require.NoError(t, err) | ||
var metadata adapter.InboundContext | ||
err = sniff.SSH(context.TODO(), &metadata, bytes.NewReader(pkt)) | ||
require.NoError(t, err) | ||
require.Equal(t, C.ProtocolSSH, metadata.Protocol) | ||
require.Equal(t, "dropbear", metadata.Client) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,41 @@ | |
icon: material/alert-decagram | ||
--- | ||
|
||
!!! failure "Help needed" | ||
|
||
Due to problems with our Apple developer account, sing-box apps on Apple platforms are temporarily unavailable for download or update. | ||
|
||
If your company or organization is willing to help us return to the App Store, please [contact us](mailto:[email protected]). | ||
|
||
#### 1.10.0-beta.4 | ||
|
||
* Fixes and improvements | ||
|
||
#### 1.10.0-beta.3 | ||
|
||
* Add SSH sniffer | ||
* Fixes and improvements | ||
|
||
#### 1.10.0-beta.2 | ||
|
||
* Build with go1.23 | ||
* Fixes and improvements | ||
|
||
### 1.9.4 | ||
|
||
* Update quic-go to v0.46.0 | ||
* Update Hysteria2 BBR congestion control | ||
* Filter HTTPS ipv4hint/ipv6hint with domain strategy | ||
* Fix crash on Android when using process rules | ||
* Fix non-IP queries accepted by address filter rules | ||
* Fix UDP server for shadowsocks AEAD multi-user inbounds | ||
* Fix default next protos for v2ray QUIC transport | ||
* Fix default end value of port range configuration options | ||
* Fix reset v2ray transports | ||
* Fix panic caused by rule-set generation of duplicate keys for `domain_suffix` | ||
* Fix UDP connnection leak when sniffing | ||
* Fixes and improvements | ||
|
||
#### 1.10.0-alpha.29 | ||
|
||
* Update quic-go to v0.46.0 | ||
|
@@ -13,7 +48,7 @@ icon: material/alert-decagram | |
|
||
**1**: | ||
|
||
The new feature allows you to use AdGuard DNS Filter lists in a sing-box without AdGuard Home. | ||
The new feature allows you to use AdGuard DNS Filter lists in a sing-box without AdGuard Home. | ||
|
||
See [AdGuard DNS Filter](/configuration/rule-set/adguard/). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,13 @@ icon: material/apple | |
SFI/SFM/SFT allows users to manage and run local or remote sing-box configuration files, and provides | ||
platform-specific function implementation, such as TUN transparent proxy implementation. | ||
|
||
!!! failure "Unavailable" | ||
|
||
Due to problems with our Apple developer account, sing-box apps on Apple platforms are temporarily unavailable for download or update. | ||
|
||
If your company or organization is willing to help us return to the App Store, please [contact us](mailto:[email protected]). | ||
|
||
|
||
## :material-graph: Requirements | ||
|
||
* iOS 15.0+ / macOS 13.0+ / Apple tvOS 17.0+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.