diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
deleted file mode 100644
index 6133e7657e..0000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ /dev/null
@@ -1,77 +0,0 @@
-name: Bug report
-description: "Report sing-box bug"
-body:
- - type: dropdown
- attributes:
- label: Operating system
- description: Operating system type
- options:
- - iOS
- - macOS
- - Apple tvOS
- - Android
- - Windows
- - Linux
- - Others
- validations:
- required: true
- - type: input
- attributes:
- label: System version
- description: Please provide the operating system version
- validations:
- required: true
- - type: dropdown
- attributes:
- label: Installation type
- description: Please provide the sing-box installation type
- options:
- - Original sing-box Command Line
- - sing-box for iOS Graphical Client
- - sing-box for macOS Graphical Client
- - sing-box for Apple tvOS Graphical Client
- - sing-box for Android Graphical Client
- - Third-party graphical clients that advertise themselves as using sing-box (Windows)
- - Third-party graphical clients that advertise themselves as using sing-box (Android)
- - Others
- validations:
- required: true
- - type: input
- attributes:
- description: Graphical client version
- label: If you are using a graphical client, please provide the version of the client.
- - type: textarea
- attributes:
- label: Version
- description: If you are using the original command line program, please provide the output of the `sing-box version` command.
- value: |-
-
- ```console
- # Replace this line with the output
- ```
-
- - type: textarea
- attributes:
- label: Description
- description: Please provide a detailed description of the error.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Reproduction
- description: Please provide the steps to reproduce the error, including the configuration files and procedures that can locally (not dependent on the remote server) reproduce the error using the original command line program of sing-box.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Logs
- description: |-
- If you encounter a crash with the graphical client, please provide crash logs.
- For Apple platform clients, please check `Settings - View Service Log` for crash logs.
- For the Android client, please check the `/sdcard/Android/data/io.nekohasekai.sfa/files/stderr.log` file for crash logs.
- value: |-
-
- ```console
- # Replace this line with logs
- ```
-
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report_zh.yml b/.github/ISSUE_TEMPLATE/bug_report_zh.yml
deleted file mode 100644
index 7c6c7c22bc..0000000000
--- a/.github/ISSUE_TEMPLATE/bug_report_zh.yml
+++ /dev/null
@@ -1,77 +0,0 @@
-name: 错误反馈
-description: "提交 sing-box 漏洞"
-body:
- - type: dropdown
- attributes:
- label: 操作系统
- description: 请提供操作系统类型
- options:
- - iOS
- - macOS
- - Apple tvOS
- - Android
- - Windows
- - Linux
- - 其他
- validations:
- required: true
- - type: input
- attributes:
- label: 系统版本
- description: 请提供操作系统版本
- validations:
- required: true
- - type: dropdown
- attributes:
- label: 安装类型
- description: 请提供该 sing-box 安装类型
- options:
- - sing-box 原始命令行程序
- - sing-box for iOS 图形客户端程序
- - sing-box for macOS 图形客户端程序
- - sing-box for Apple tvOS 图形客户端程序
- - sing-box for Android 图形客户端程序
- - 宣传使用 sing-box 的第三方图形客户端程序 (Windows)
- - 宣传使用 sing-box 的第三方图形客户端程序 (Android)
- - 其他
- validations:
- required: true
- - type: input
- attributes:
- description: 图形客户端版本
- label: 如果您使用图形客户端程序,请提供该程序版本。
- - type: textarea
- attributes:
- label: 版本
- description: 如果您使用原始命令行程序,请提供 `sing-box version` 命令的输出。
- value: |-
-
- ```console
- # 使用输出内容覆盖此行
- ```
-
- - type: textarea
- attributes:
- label: 描述
- description: 请提供错误的详细描述。
- validations:
- required: true
- - type: textarea
- attributes:
- label: 重现方式
- description: 请提供重现错误的步骤,必须包括可以在本地(不依赖与远程服务器)使用 sing-box 原始命令行程序重现错误的配置文件与流程。
- validations:
- required: true
- - type: textarea
- attributes:
- label: 日志
- description: |-
- 如果您遭遇图形界面应用程序崩溃,请提供崩溃日志。
- 对于 Apple 平台图形客户端程序,请检查 `Settings - View Service Log` 以导出崩溃日志。
- 对于 Android 图形客户端程序,请检查 `/sdcard/Android/data/io.nekohasekai.sfa/files/stderr.log` 文件以导出崩溃日志。
- value: |-
-
- ```console
- # 使用日志内容覆盖此行
- ```
-
\ No newline at end of file
diff --git a/.github/renovate.json b/.github/renovate.json
deleted file mode 100644
index 78d9c96144..0000000000
--- a/.github/renovate.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "commitMessagePrefix": "[dependencies]",
- "extends": [
- "config:base",
- ":disableRateLimiting"
- ],
- "baseBranches": [
- "dev-next"
- ],
- "golang": {
- "enabled": false
- },
- "packageRules": [
- {
- "matchManagers": [
- "github-actions"
- ],
- "groupName": "github-actions"
- },
- {
- "matchManagers": [
- "dockerfile"
- ],
- "groupName": "Dockerfile"
- }
- ]
-}
\ No newline at end of file
diff --git a/.github/update_dependencies.sh b/.github/update_dependencies.sh
deleted file mode 100755
index 4702ddfe01..0000000000
--- a/.github/update_dependencies.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-PROJECTS=$(dirname "$0")/../..
-go get -x github.com/sagernet/$1@$(git -C $PROJECTS/$1 rev-parse HEAD)
-go mod tidy
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
deleted file mode 100644
index 52046a497b..0000000000
--- a/.github/workflows/docker.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-name: Build Docker Images
-on:
- workflow_dispatch:
- inputs:
- tag:
- description: "The tag version you want to build"
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- - name: Setup Docker Buildx
- uses: docker/setup-buildx-action@v3
- - name: Setup QEMU for Docker Buildx
- uses: docker/setup-qemu-action@v3
- - name: Login to GitHub Container Registry
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.repository_owner }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Docker metadata
- id: metadata
- uses: docker/metadata-action@v5
- with:
- images: ghcr.io/sagernet/sing-box
- - name: Get tag to build
- id: tag
- run: |
- echo "latest=ghcr.io/sagernet/sing-box:latest" >> $GITHUB_OUTPUT
- if [[ -z "${{ github.event.inputs.tag }}" ]]; then
- echo "versioned=ghcr.io/sagernet/sing-box:${{ github.ref_name }}" >> $GITHUB_OUTPUT
- else
- echo "versioned=ghcr.io/sagernet/sing-box:${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
- fi
- - name: Build and release Docker images
- uses: docker/build-push-action@v5
- with:
- platforms: linux/386,linux/amd64,linux/arm64,linux/s390x
- target: dist
- tags: |
- ${{ steps.tag.outputs.latest }}
- ${{ steps.tag.outputs.versioned }}
- push: true
diff --git a/.github/workflows/sfa.yml b/.github/workflows/sfa.yml
new file mode 100644
index 0000000000..07da5d3eeb
--- /dev/null
+++ b/.github/workflows/sfa.yml
@@ -0,0 +1,102 @@
+name: Build SFA
+
+on:
+ push:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ env:
+ TAGS: "with_quic,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_reality_server,with_clash_api,with_v2ray_api,with_gvisor"
+
+ steps:
+ - uses: actions/checkout@v4.1.0
+ with:
+ fetch-depth: 0
+
+ - name: Get latest go version
+ id: go_version
+ run: |
+ echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT
+
+ - name: Setup Go
+ uses: actions/setup-go@v4.1.0
+ with:
+ go-version: 1.21.1
+
+ - name: Checkout SFA Repository
+ uses: actions/checkout@v3
+ with:
+ repository: SagerNet/sing-box-for-android
+ path: SFA
+ submodules: recursive
+
+ - name: Setup Java
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'oracle'
+ java-version: 20
+
+ - name: Build SFA
+ run: |
+ git remote add sekai https://github.com/SagerNet/sing-box
+ git fetch sekai
+ mkdir -p SFA/app/libs/
+ make lib_install
+ version=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
+ CGO_ENABLED=0 gomobile bind -v -a -trimpath -androidapi 21 -javapkg=io.nekohasekai -libname=box -tags ${TAGS} -ldflags "-X github.com/sagernet/sing-box/constant.Version=${version} -s -w -buildid=" ./experimental/libbox
+ cp ./libbox.aar SFA/app/libs/
+ cd SFA
+ echo "VERSION_NAME=${version}" > local.properties
+ echo "VERSION_CODE=$(date +%Y%m%d%H)" >> local.properties
+ sed -i '/signingConfigs\.release/d' app/build.gradle
+ chmod +x ./gradlew
+ ./gradlew assembleRelease
+
+ - name: Sign SFA
+ uses: PuerNya/sign-android-release@v2
+ with:
+ releaseDirectory: SFA/app/build/outputs/apk/release
+ signingKeyBase64: ${{ secrets.SIGN_KEY }}
+ alias: ${{ secrets.ALIAS }}
+ keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
+
+ - name: Upload arm64-v8a artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: SFA-arm64-v8a
+ path: |
+ SFA/app/build/outputs/apk/release/*-arm64-v8a-signed.apk
+ SFA/app/build/outputs/apk/release/*-arm64-v8a-*-signed.apk
+
+ - name: Upload armeabi-v7a artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: SFA-armeabi-v7a
+ path: |
+ SFA/app/build/outputs/apk/release/*-armeabi-v7a-signed.apk
+ SFA/app/build/outputs/apk/release/*-armeabi-v7a-*-signed.apk
+
+ - name: Upload x86_64 artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: SFA-x86_64
+ path: |
+ SFA/app/build/outputs/apk/release/*-x86_64-signed.apk
+ SFA/app/build/outputs/apk/release/*-x86_64-*-signed.apk
+
+ - name: Upload x86 artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: SFA-x86
+ path: |
+ SFA/app/build/outputs/apk/release/*-x86-signed.apk
+ SFA/app/build/outputs/apk/release/*-x86-*-signed.apk
+
+ - name: Upload universal artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: SFA-universal
+ path: |
+ SFA/app/build/outputs/apk/release/*-universal-signed.apk
+ SFA/app/build/outputs/apk/release/*-universal-*-signed.apk
\ No newline at end of file
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
deleted file mode 100644
index ae366e4d60..0000000000
--- a/.github/workflows/stale.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-name: Mark stale issues and pull requests
-
-on:
- schedule:
- - cron: "30 1 * * *"
-
-jobs:
- stale:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/stale@v8
- with:
- stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days'
- days-before-stale: 60
- days-before-close: 5
\ No newline at end of file