Compare commits

...

7 Commits

Author SHA1 Message Date
世界
e586d9e9bc Bump version 2024-09-20 23:37:06 +08:00
世界
8c7eaa4477 Fix docker build 2024-09-20 23:37:06 +08:00
世界
8464c8cb7c Fix version script 2024-09-20 21:10:15 +08:00
世界
39d7127651 Revert "Fix stream sniffer" 2024-09-20 20:40:02 +08:00
世界
e2077009c4 documentation: Update client status 2024-09-20 20:13:55 +08:00
世界
700a8eb425 Minor fixes 2024-09-20 20:13:14 +08:00
世界
3b0cba0852 Fix wireguard start 2024-09-20 20:12:52 +08:00
9 changed files with 39 additions and 26 deletions

View File

@@ -27,12 +27,22 @@ jobs:
- linux/ppc64le
- linux/riscv64
- linux/s390x
- linux/mips64le
steps:
- name: Get commit to build
id: ref
run: |-
if [[ -z "${{ github.event.inputs.tag }}" ]]; then
ref="${{ github.ref_name }}"
else
ref="${{ github.event.inputs.tag }}"
fi
echo "ref=$ref"
echo "ref=$ref" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: ${{ steps.ref.outputs.ref }}
fetch-depth: 0
- name: Prepare
run: |
platform=${{ matrix.platform }}

View File

@@ -150,7 +150,6 @@ build_macos_dmg:
--hide-extension "SFM.app" \
--app-drop-link 0 0 \
--skip-jenkins \
--codesign "B2324162A090F01F96111CF802A83F0F36674F80" \
--notarize "notarytool-password" \
"../sing-box/dist/SFM/SFM.dmg" "build/SFM.System/SFM.app"

View File

@@ -27,7 +27,7 @@ func main() {
objectsMap := project["objects"].(map[string]any)
projectContent := string(common.Must1(os.ReadFile("sing-box.xcodeproj/project.pbxproj")))
newContent, updated0 := findAndReplace(objectsMap, projectContent, []string{"io.nekohasekai.sfavt"}, newVersion.VersionString())
newContent, updated1 := findAndReplace(objectsMap, newContent, []string{"io.nekohasekai.sfa.standalone", "io.nekohasekai.sfa.system"}, newVersion.String())
newContent, updated1 := findAndReplace(objectsMap, newContent, []string{"io.nekohasekai.sfavt.standalone", "io.nekohasekai.sfavt.system"}, newVersion.String())
if updated0 || updated1 {
log.Info("updated version to ", newVersion.VersionString(), " (", newVersion.String(), ")")
}

View File

@@ -40,22 +40,28 @@ func PeekStream(ctx context.Context, conn net.Conn, buffer *buf.Buffer, timeout
}
deadline := time.Now().Add(timeout)
var errors []error
err := conn.SetReadDeadline(deadline)
if err != nil {
return nil, E.Cause(err, "set read deadline")
}
defer conn.SetReadDeadline(time.Time{})
var metadata *adapter.InboundContext
for _, sniffer := range sniffers {
if buffer.IsEmpty() {
metadata, err = sniffer(ctx, io.TeeReader(conn, buffer))
} else {
metadata, err = sniffer(ctx, io.MultiReader(bytes.NewReader(buffer.Bytes()), io.TeeReader(conn, buffer)))
for i := 0; ; i++ {
err := conn.SetReadDeadline(deadline)
if err != nil {
return nil, E.Cause(err, "set read deadline")
}
if metadata != nil {
return metadata, nil
_, err = buffer.ReadOnceFrom(conn)
_ = conn.SetReadDeadline(time.Time{})
if err != nil {
if i > 0 {
break
}
return nil, E.Cause(err, "read payload")
}
errors = nil
var metadata *adapter.InboundContext
for _, sniffer := range sniffers {
metadata, err = sniffer(ctx, bytes.NewReader(buffer.Bytes()))
if metadata != nil {
return metadata, nil
}
errors = append(errors, err)
}
errors = append(errors, err)
}
return nil, E.Errors(errors...)
}

View File

@@ -2,6 +2,10 @@
icon: material/alert-decagram
---
### 1.9.6
* Fixes and improvements
### 1.9.5
* Update quic-go to v0.47.0

View File

@@ -7,12 +7,6 @@ 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.
We are working on getting sing-box apps back on the App Store, which should be completed within a week (SFI on the App Store and others on TestFlight are already available).
## :material-graph: Requirements
* iOS 15.0+ / macOS 13.0+ / Apple tvOS 17.0+

View File

@@ -57,7 +57,7 @@ func NewSystemDevice(router adapter.Router, interfaceName string, localPrefixes
inet4Addresses: inet4Addresses,
inet6Addresses: inet6Addresses,
gso: gso,
events: make(chan wgTun.Event),
events: make(chan wgTun.Event, 1),
}, nil
}