Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 25 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- 'nb4a.properties'
env:
MIERU_VERSION: v3.34.0
HYSTERIA_VERSION: v2.9.2
permissions:
contents: read
jobs:
libcore:
name: Native Build (LibCore)
Expand All @@ -34,21 +37,21 @@ jobs:
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib core
mieru:
name: Native Build (Mieru)
sidecars:
name: Native Build (Sidecars)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Mieru Status
run: cat buildScript/lib/mieru.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > mieru_status
- name: Mieru Cache
- name: Sidecars Status
run: cat buildScript/lib/mieru.sh buildScript/lib/hysteria2.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > sidecars_status
- name: Sidecars Cache
id: cache
uses: actions/cache@v5
with:
path: |
app/executableSo
key: ${{ hashFiles('.github/workflows/*', 'mieru_status') }}-${{ env.MIERU_VERSION }}-mieru
key: ${{ hashFiles('.github/workflows/*', 'sidecars_status') }}-${{ env.MIERU_VERSION }}-${{ env.HYSTERIA_VERSION }}-sidecars
- name: Install Golang
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-go@v6
Expand All @@ -57,12 +60,15 @@ jobs:
- name: Mieru Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib mieru
- name: Hysteria2 Download
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib hysteria2
build:
name: Build OSS APK
runs-on: ubuntu-latest
needs:
- libcore
- mieru
- sidecars
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -76,22 +82,24 @@ jobs:
path: |
app/libs/libcore.aar
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
- name: Mieru Status
run: cat buildScript/lib/mieru.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > mieru_status
- name: Mieru Cache
id: mieru-cache
- name: Sidecars Status
run: cat buildScript/lib/mieru.sh buildScript/lib/hysteria2.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > sidecars_status
- name: Sidecars Cache
id: sidecars-cache
uses: actions/cache@v5
with:
path: |
app/executableSo
key: ${{ hashFiles('.github/workflows/*', 'mieru_status') }}-${{ env.MIERU_VERSION }}-mieru
- name: Verify Mieru Artifacts
key: ${{ hashFiles('.github/workflows/*', 'sidecars_status') }}-${{ env.MIERU_VERSION }}-${{ env.HYSTERIA_VERSION }}-sidecars
- name: Verify Sidecar Artifacts
run: |
for abi in arm64-v8a armeabi-v7a x86 x86_64; do
if [ ! -f "app/executableSo/$abi/libmieru.so" ]; then
echo "Error: missing app/executableSo/$abi/libmieru.so (Mieru cache miss)" >&2
exit 1
fi
for so in libmieru.so libhysteria2.so; do
if [ ! -f "app/executableSo/$abi/$so" ]; then
echo "Error: missing app/executableSo/$abi/$so (sidecar cache miss)" >&2
exit 1
fi
done
done
- name: Gradle cache
uses: actions/cache@v5
Expand Down
42 changes: 25 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
env:
MIERU_VERSION: v3.34.0
HYSTERIA_VERSION: v2.9.2
permissions:
contents: read
jobs:
libcore:
name: Native Build (LibCore)
Expand Down Expand Up @@ -39,21 +42,21 @@ jobs:
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib core
mieru:
name: Native Build (Mieru)
sidecars:
name: Native Build (Sidecars)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
Comment thread
hawkff marked this conversation as resolved.
- name: Mieru Status
run: cat buildScript/lib/mieru.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > mieru_status
- name: Mieru Cache
- name: Sidecars Status
run: cat buildScript/lib/mieru.sh buildScript/lib/hysteria2.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > sidecars_status
- name: Sidecars Cache
id: cache
uses: actions/cache@v5
Comment thread
hawkff marked this conversation as resolved.
with:
path: |
app/executableSo
key: ${{ hashFiles('.github/workflows/*', 'mieru_status') }}-${{ env.MIERU_VERSION }}-mieru-ci
key: ${{ hashFiles('.github/workflows/*', 'sidecars_status') }}-${{ env.MIERU_VERSION }}-${{ env.HYSTERIA_VERSION }}-sidecars-ci
- name: Install Golang
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-go@v6
Expand All @@ -62,12 +65,15 @@ jobs:
- name: Mieru Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib mieru
- name: Hysteria2 Download
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib hysteria2
build:
name: Build OSS APK
runs-on: ubuntu-latest
needs:
- libcore
- mieru
- sidecars
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -86,22 +92,24 @@ jobs:
path: |
app/libs/libcore.aar
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}-ci
- name: Mieru Status
run: cat buildScript/lib/mieru.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > mieru_status
- name: Mieru Cache
id: mieru-cache
- name: Sidecars Status
run: cat buildScript/lib/mieru.sh buildScript/lib/hysteria2.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > sidecars_status
- name: Sidecars Cache
id: sidecars-cache
uses: actions/cache@v5
with:
path: |
app/executableSo
key: ${{ hashFiles('.github/workflows/*', 'mieru_status') }}-${{ env.MIERU_VERSION }}-mieru-ci
- name: Verify Mieru Artifacts
key: ${{ hashFiles('.github/workflows/*', 'sidecars_status') }}-${{ env.MIERU_VERSION }}-${{ env.HYSTERIA_VERSION }}-sidecars-ci
- name: Verify Sidecar Artifacts
run: |
for abi in arm64-v8a armeabi-v7a x86 x86_64; do
if [ ! -f "app/executableSo/$abi/libmieru.so" ]; then
echo "Error: missing app/executableSo/$abi/libmieru.so (Mieru cache miss)" >&2
exit 1
fi
for so in libmieru.so libhysteria2.so; do
if [ ! -f "app/executableSo/$abi/$so" ]; then
echo "Error: missing app/executableSo/$abi/$so (sidecar cache miss)" >&2
exit 1
fi
done
done
- name: Gradle cache
uses: actions/cache@v5
Expand Down
42 changes: 25 additions & 17 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
inputs:
env:
MIERU_VERSION: v3.34.0
HYSTERIA_VERSION: v2.9.2
permissions:
contents: read
jobs:
libcore:
name: Native Build (LibCore)
Expand All @@ -30,21 +33,21 @@ jobs:
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib core
mieru:
name: Native Build (Mieru)
sidecars:
name: Native Build (Sidecars)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Mieru Status
run: cat buildScript/lib/mieru.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > mieru_status
- name: Mieru Cache
- name: Sidecars Status
run: cat buildScript/lib/mieru.sh buildScript/lib/hysteria2.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > sidecars_status
- name: Sidecars Cache
id: cache
uses: actions/cache@v5
with:
path: |
app/executableSo
key: ${{ hashFiles('.github/workflows/*', 'mieru_status') }}-${{ env.MIERU_VERSION }}-mieru
key: ${{ hashFiles('.github/workflows/*', 'sidecars_status') }}-${{ env.MIERU_VERSION }}-${{ env.HYSTERIA_VERSION }}-sidecars
- name: Install Golang
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-go@v6
Expand All @@ -53,12 +56,15 @@ jobs:
- name: Mieru Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib mieru
- name: Hysteria2 Download
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib hysteria2
build:
name: Build OSS APK
runs-on: ubuntu-latest
needs:
- libcore
- mieru
- sidecars
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -72,22 +78,24 @@ jobs:
path: |
app/libs/libcore.aar
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
- name: Mieru Status
run: cat buildScript/lib/mieru.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > mieru_status
- name: Mieru Cache
id: mieru-cache
- name: Sidecars Status
run: cat buildScript/lib/mieru.sh buildScript/lib/hysteria2.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > sidecars_status
- name: Sidecars Cache
id: sidecars-cache
uses: actions/cache@v5
with:
path: |
app/executableSo
key: ${{ hashFiles('.github/workflows/*', 'mieru_status') }}-${{ env.MIERU_VERSION }}-mieru
- name: Verify Mieru Artifacts
key: ${{ hashFiles('.github/workflows/*', 'sidecars_status') }}-${{ env.MIERU_VERSION }}-${{ env.HYSTERIA_VERSION }}-sidecars
- name: Verify Sidecar Artifacts
run: |
for abi in arm64-v8a armeabi-v7a x86 x86_64; do
if [ ! -f "app/executableSo/$abi/libmieru.so" ]; then
echo "Error: missing app/executableSo/$abi/libmieru.so (Mieru cache miss)" >&2
exit 1
fi
for so in libmieru.so libhysteria2.so; do
if [ ! -f "app/executableSo/$abi/$so" ]; then
echo "Error: missing app/executableSo/$abi/$so (sidecar cache miss)" >&2
exit 1
fi
done
done
- name: Gradle cache
uses: actions/cache@v5
Expand Down
42 changes: 25 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
required: false
env:
MIERU_VERSION: v3.34.0
HYSTERIA_VERSION: v2.9.2
permissions:
contents: write
jobs:
libcore:
name: Native Build (LibCore)
Expand All @@ -36,21 +39,21 @@ jobs:
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib core
mieru:
name: Native Build (Mieru)
sidecars:
name: Native Build (Sidecars)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Mieru Status
run: cat buildScript/lib/mieru.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > mieru_status
- name: Mieru Cache
- name: Sidecars Status
run: cat buildScript/lib/mieru.sh buildScript/lib/hysteria2.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > sidecars_status
- name: Sidecars Cache
id: cache
uses: actions/cache@v5
with:
path: |
app/executableSo
key: ${{ hashFiles('.github/workflows/*', 'mieru_status') }}-${{ env.MIERU_VERSION }}-mieru
key: ${{ hashFiles('.github/workflows/*', 'sidecars_status') }}-${{ env.MIERU_VERSION }}-${{ env.HYSTERIA_VERSION }}-sidecars
- name: Install Golang
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-go@v6
Expand All @@ -59,12 +62,15 @@ jobs:
- name: Mieru Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib mieru
- name: Hysteria2 Download
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib hysteria2
build:
name: Build OSS APK
runs-on: ubuntu-latest
needs:
- libcore
- mieru
- sidecars
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -78,22 +84,24 @@ jobs:
path: |
app/libs/libcore.aar
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
- name: Mieru Status
run: cat buildScript/lib/mieru.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > mieru_status
- name: Mieru Cache
id: mieru-cache
- name: Sidecars Status
run: cat buildScript/lib/mieru.sh buildScript/lib/hysteria2.sh buildScript/init/env.sh buildScript/init/env_ndk.sh | sha1sum > sidecars_status
- name: Sidecars Cache
id: sidecars-cache
uses: actions/cache@v5
with:
path: |
app/executableSo
key: ${{ hashFiles('.github/workflows/*', 'mieru_status') }}-${{ env.MIERU_VERSION }}-mieru
- name: Verify Mieru Artifacts
key: ${{ hashFiles('.github/workflows/*', 'sidecars_status') }}-${{ env.MIERU_VERSION }}-${{ env.HYSTERIA_VERSION }}-sidecars
- name: Verify Sidecar Artifacts
run: |
for abi in arm64-v8a armeabi-v7a x86 x86_64; do
if [ ! -f "app/executableSo/$abi/libmieru.so" ]; then
echo "Error: missing app/executableSo/$abi/libmieru.so (Mieru cache miss)" >&2
exit 1
fi
for so in libmieru.so libhysteria2.so; do
if [ ! -f "app/executableSo/$abi/$so" ]; then
echo "Error: missing app/executableSo/$abi/$so (sidecar cache miss)" >&2
exit 1
fi
done
done
- name: Gradle cache
uses: actions/cache@v5
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/io/nekohasekai/sagernet/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ object Key {
const val SERVER_DISABLE_MTU_DISCOVERY = "serverDisableMtuDiscovery"
const val SERVER_HOP_INTERVAL = "hopInterval"

const val SERVER_HY2_OBFS_TYPE = "serverHy2ObfsType"
const val SERVER_HY2_GECKO_MIN_PACKET = "serverHy2GeckoMinPacket"
const val SERVER_HY2_GECKO_MAX_PACKET = "serverHy2GeckoMaxPacket"

const val SERVER_PRIVATE_KEY = "serverPrivateKey"
const val SERVER_INSECURE_CONCURRENCY = "serverInsecureConcurrency"

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/io/nekohasekai/sagernet/bg/Executable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import androidx.core.text.isDigitsOnly

object Executable {
private val EXECUTABLES = setOf(
"libtrojan.so", "libtrojan-go.so", "libnaive.so", "libtuic.so", "libhysteria.so", "libmieru.so"
"libtrojan.so", "libtrojan-go.so", "libnaive.so", "libtuic.so", "libhysteria.so", "libmieru.so", "libhysteria2.so"
)

fun killAll(alsoKillBg: Boolean = false) {
Expand Down
Loading
Loading