diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 34c68fcb..c18bebc3 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -24,7 +24,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
- go-version: "1.20"
+ go-version: "1.21"
check-latest: true
# Set up JDK
@@ -70,13 +70,3 @@ jobs:
name: oblivion-${{ github.sha }}-unsigned.apk
path: |
app/build/outputs/apk/release/app-release-unsigned.apk
-
- - name: Upload to GitHub Release
- uses: svenstaro/upload-release-action@v2
- if: github.event_name == 'release'
- with:
- repo_token: ${{ secrets.GITHUB_TOKEN }}
- file: app/build/outputs/apk/release/app-release-unsigned.apk
- asset_name: oblivion-${{ github.event.release.tag_name }}-unsigned.apk
- tag: ${{ github.ref }}
- overwrite: true
diff --git a/README.md b/README.md
index 154f0335..c8ef650d 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ It's leveraging `bepass-sdk` and a custom Go implementation of WireGuard, it's d
- Gradle 8
- Android Gradle Plugin (AGP) 8.1.2
- NDK r26b (26.1.10909125)
-- Go 1.20.0
+- Go 1.21
Follow the steps below to build the Oblivion:
@@ -44,19 +44,6 @@ go run golang.org/x/mobile/cmd/gomobile bind -ldflags="-w -s" -target=android -a
- Select "Generate Signed Bundle/APK..."
- Choose "APK" and proceed.
-#### Select Keystore:
-- Click on "Choose existing..." or "Create new..." to locate your keystore file.
-- Enter the keystore password when prompted.
-
-#### Configure APK Signature:
-- Select the appropriate key alias from the dropdown menu.
-- Input the key password.
-- Continue to the next step.
-
-#### Select APK Destination:
-- Choose the destination folder for the signed APK.
-- Finalize by clicking "Finish" to generate the signed APK.
-
## Get Involved
We're a community-driven project, aiming to make the internet accessible for all. Whether you want to contribute code, suggest features, or need some help, we'd love to hear from you! Check out our [GitHub Issues](https://github.com/bepass-org/oblivion/issues) or submit a pull request.
diff --git a/app/build.gradle b/app/build.gradle
index e1605e0b..485a590f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -6,13 +6,12 @@ plugins {
android {
namespace 'org.bepass.oblivion'
compileSdk 34
- compileSdkVersion 34
defaultConfig {
applicationId "org.bepass.oblivion"
minSdk 21
targetSdk 34
- versionCode 11
- versionName "1"
+ versionCode 12
+ versionName "2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
@@ -43,6 +42,15 @@ android {
packagingOptions {
resources.excludes.add("META-INF/*")
}
+ lint {
+ baseline = file("lint-baseline.xml")
+ }
+}
+
+configurations {
+ all {
+ exclude group: 'org.json', module: 'json'
+ }
}
dependencies {
@@ -54,5 +62,6 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'com.github.bumptech.glide:glide:4.16.0'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
+ implementation 'com.vdurmont:emoji-java:5.1.1'
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'])
}
diff --git a/app/libs/README.md b/app/libs/README.md
index e8337e9f..cd2dd64b 100644
--- a/app/libs/README.md
+++ b/app/libs/README.md
@@ -1,6 +1,6 @@
# How To build?
-## Go Version "MUST be exactly go 1.20" because of psiphon library then you can run
+## Go Version "MUST be exactly go 1.21" because of psiphon library then you can run
```sh
go run golang.org/x/mobile/cmd/gomobile init
diff --git a/app/libs/go.mod b/app/libs/go.mod
index 8c39de07..78300787 100644
--- a/app/libs/go.mod
+++ b/app/libs/go.mod
@@ -1,13 +1,15 @@
module tun2socks
-go 1.20
+go 1.21.1
-replace github.com/Psiphon-Labs/psiphon-tunnel-core => github.com/uoosef/psiphon-tunnel-core v0.0.0-20240126135009-9fbc37b0b068
+toolchain go1.21.6
+
+replace github.com/Psiphon-Labs/psiphon-tunnel-core => github.com/bepass-org/psiphon-tunnel-core v0.0.0-20240311155012-9c2e10df08e5
replace github.com/eycorsican/go-tun2socks => github.com/trojan-gfw/go-tun2socks v1.16.3-0.20210702214000-083d49176e05
require (
- github.com/bepass-org/wireguard-go v1.0.4-rc2
+ github.com/bepass-org/warp-plus v1.1.3-0.20240403205252-06b16247e1a5
github.com/eycorsican/go-tun2socks v1.16.11
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8
github.com/xjasonlyu/tun2socks/v2 v2.5.2
@@ -18,22 +20,16 @@ require (
filippo.io/bigmod v0.0.1 // indirect
filippo.io/keygen v0.0.0-20230306160926-5201437acf8e // indirect
github.com/AndreasBriese/bbloom v0.0.0-20170702084017-28f7e881ca57 // indirect
- github.com/MakeNowJust/heredoc/v2 v2.0.1 // indirect
github.com/Psiphon-Labs/bolt v0.0.0-20200624191537-23cedaef7ad7 // indirect
github.com/Psiphon-Labs/goptlib v0.0.0-20200406165125-c0e32a7a3464 // indirect
- github.com/Psiphon-Labs/psiphon-tunnel-core v0.0.0-00010101000000-000000000000 // indirect
- github.com/Psiphon-Labs/qtls-go1-19 v0.0.0-20230608213623-d58aa73e519a // indirect
- github.com/Psiphon-Labs/qtls-go1-20 v0.0.0-20230608214729-dd57d6787acf // indirect
- github.com/Psiphon-Labs/quic-go v0.0.0-20230626192210-73f29effc9da // indirect
- github.com/Psiphon-Labs/tls-tris v0.0.0-20230824155421-58bf6d336a9a // indirect
+ github.com/Psiphon-Labs/psiphon-tls v0.0.0-20240305020009-09f917290799 // indirect
+ github.com/Psiphon-Labs/psiphon-tunnel-core v2.0.28+incompatible // indirect
+ github.com/Psiphon-Labs/quic-go v0.0.0-20240305203241-7c4a760d03cc // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/armon/go-proxyproto v0.0.0-20180202201750-5b7edb60ff5f // indirect
- github.com/bepass-org/ipscanner v0.0.0-20240205155121-8927b7437d16 // indirect
- github.com/bepass-org/proxy v0.0.0-20240201095508-c86216dd0aea // indirect
github.com/bifurcation/mint v0.0.0-20180306135233-198357931e61 // indirect
github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9 // indirect
github.com/cognusion/go-cache-lru v0.0.0-20170419142635-f73e2280ecea // indirect
- github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dchest/siphash v1.2.3 // indirect
github.com/dgraph-io/badger v1.5.4-0.20180815194500-3a87f6d9c273 // indirect
github.com/dgryski/go-farm v0.0.0-20180109070241-2de33835d102 // indirect
@@ -65,9 +61,9 @@ require (
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.4.1 // indirect
github.com/quic-go/quic-go v0.40.1 // indirect
- github.com/refraction-networking/conjure v0.7.10-0.20231110193225-e4749a9dedc9 // indirect
+ github.com/refraction-networking/conjure v0.7.11-0.20240130155008-c8df96195ab2 // indirect
github.com/refraction-networking/ed25519 v0.1.2 // indirect
- github.com/refraction-networking/gotapdance v1.7.7 // indirect
+ github.com/refraction-networking/gotapdance v1.7.10 // indirect
github.com/refraction-networking/obfs4 v0.1.2 // indirect
github.com/refraction-networking/utls v1.3.3 // indirect
github.com/sergeyfrolov/bsbuffer v0.0.0-20180903213811-94e85abb8507 // indirect
@@ -78,16 +74,16 @@ require (
gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib v1.5.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/mock v0.3.0 // indirect
- golang.org/x/crypto v0.19.0 // indirect
+ golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 // indirect
golang.org/x/mod v0.15.0 // indirect
- golang.org/x/net v0.21.0 // indirect
+ golang.org/x/net v0.22.0 // indirect
golang.org/x/sync v0.6.0 // indirect
- golang.org/x/sys v0.17.0 // indirect
+ golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
google.golang.org/protobuf v1.32.0 // indirect
- gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259 // indirect
+ gvisor.dev/gvisor v0.0.0-20240313225113-67a078058255 // indirect
)
diff --git a/app/libs/go.sum b/app/libs/go.sum
index e9905ba2..eb3ec13c 100644
--- a/app/libs/go.sum
+++ b/app/libs/go.sum
@@ -6,34 +6,29 @@ github.com/AndreasBriese/bbloom v0.0.0-20170702084017-28f7e881ca57 h1:CVuXDbdzPW
github.com/AndreasBriese/bbloom v0.0.0-20170702084017-28f7e881ca57/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
-github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A=
-github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM=
+github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Psiphon-Inc/rotate-safe-writer v0.0.0-20210303140923-464a7a37606e h1:NPfqIbzmijrl0VclX2t8eO5EPBhqe47LLGKpRrcVjXk=
+github.com/Psiphon-Inc/rotate-safe-writer v0.0.0-20210303140923-464a7a37606e/go.mod h1:ZdY5pBfat/WVzw3eXbIf7N1nZN0XD5H5+X8ZMDWbCs4=
github.com/Psiphon-Labs/bolt v0.0.0-20200624191537-23cedaef7ad7 h1:Hx/NCZTnvoKZuIBwSmxE58KKoNLXIGG6hBJYN7pj9Ag=
github.com/Psiphon-Labs/bolt v0.0.0-20200624191537-23cedaef7ad7/go.mod h1:alTtZBo3j4AWFvUrAH6F5ZaHcTj4G5Y01nHz8dkU6vU=
github.com/Psiphon-Labs/goptlib v0.0.0-20200406165125-c0e32a7a3464 h1:VmnMMMheFXwLV0noxYhbJbLmkV4iaVW3xNnj6xcCNHo=
github.com/Psiphon-Labs/goptlib v0.0.0-20200406165125-c0e32a7a3464/go.mod h1:Pe5BqN2DdIdChorAXl6bDaQd/wghpCleJfid2NoSli0=
-github.com/Psiphon-Labs/qtls-go1-19 v0.0.0-20230608213623-d58aa73e519a h1:O8D+GcEoZwutcERaABP2AM3RDvswBVtNmBWvlBn5wiw=
-github.com/Psiphon-Labs/qtls-go1-19 v0.0.0-20230608213623-d58aa73e519a/go.mod h1:81bbD3bvEvi3BSamZb30PgvPvqwSLfEPqwwmq5sx7fc=
-github.com/Psiphon-Labs/qtls-go1-20 v0.0.0-20230608214729-dd57d6787acf h1:bGS+WxWdHHuf42hn3M1GFSJbzCgtKNVTuiRqwCo3zyc=
-github.com/Psiphon-Labs/qtls-go1-20 v0.0.0-20230608214729-dd57d6787acf/go.mod h1:wUiSd0qyefymNlikc99B2rRC01YPN1uUvDMytMOGmF8=
-github.com/Psiphon-Labs/quic-go v0.0.0-20230626192210-73f29effc9da h1:TI2+ExyFR3A0kPrFHfaM6y3RybP0HGfP9N1R8hfZzfk=
-github.com/Psiphon-Labs/quic-go v0.0.0-20230626192210-73f29effc9da/go.mod h1:wTIxqsKVrEQIxVIIYOEHuscY+PM3h6Wz79u5aF60fo0=
-github.com/Psiphon-Labs/tls-tris v0.0.0-20230824155421-58bf6d336a9a h1:BOfU6ghaMsT/c40sWHmf3PXNwIendYXzL6tRv6NbPog=
-github.com/Psiphon-Labs/tls-tris v0.0.0-20230824155421-58bf6d336a9a/go.mod h1:v3y9GXFo9Sf2mO6auD2ExGG7oDgrK8TI7eb49ZnUxrE=
+github.com/Psiphon-Labs/psiphon-tls v0.0.0-20240305020009-09f917290799 h1:dHFQz6jeIr2RdtlioyGIdJw2UfKF7G+g7GYnQxhbgrk=
+github.com/Psiphon-Labs/psiphon-tls v0.0.0-20240305020009-09f917290799/go.mod h1:ECTyVpleBW9oR/iHi185js4Fs7YD5T8A6tujOUzltxs=
+github.com/Psiphon-Labs/quic-go v0.0.0-20240305203241-7c4a760d03cc h1:o9jpHz1Vuum0oasqBX4kKB8VQrR+VJzEJsBg6XAz5YU=
+github.com/Psiphon-Labs/quic-go v0.0.0-20240305203241-7c4a760d03cc/go.mod h1:1gvBCJ18gsMqvZXkPkq0u9/BQKvjNS5RFWwF5uLl2Ys=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/armon/go-proxyproto v0.0.0-20180202201750-5b7edb60ff5f h1:SaJ6yqg936TshyeFZqQE+N+9hYkIeL9AMr7S4voCl10=
github.com/armon/go-proxyproto v0.0.0-20180202201750-5b7edb60ff5f/go.mod h1:QmP9hvJ91BbJmGVGSbutW19IC0Q9phDCLGaomwTJbgU=
-github.com/bepass-org/ipscanner v0.0.0-20240205155121-8927b7437d16 h1:Fa/PA9jH+S3yzGZhPHhJl+DvmReOq3BIB+5OzhJSLTQ=
-github.com/bepass-org/ipscanner v0.0.0-20240205155121-8927b7437d16/go.mod h1:ZDON74kRVPv/FSJPzoqYAyffLdZf+pjZqYGXrebHrxI=
-github.com/bepass-org/proxy v0.0.0-20240201095508-c86216dd0aea h1:6GKkjxDUxqq7uwA8U15N4PFURhdNN0OrxFuXc58MGUU=
-github.com/bepass-org/proxy v0.0.0-20240201095508-c86216dd0aea/go.mod h1:RlF0oO3D6Ju6VYjtL1I6lVLdc3l8jA4ggleJc8S+P0Y=
-github.com/bepass-org/wireguard-go v1.0.4-rc2 h1:sbrKY//jfO3xOeS1s4IgntlaUbNemcGg6o8h21wgZD4=
-github.com/bepass-org/wireguard-go v1.0.4-rc2/go.mod h1:Cu03OX/lQf4PSKqXyYpGpwxoMNTQYwQIx/efb9JREVM=
+github.com/bepass-org/psiphon-tunnel-core v0.0.0-20240311155012-9c2e10df08e5 h1:UVdsUQXhviRMzVA02BGzEHUYUBAAeSJYijqKWJvMCxs=
+github.com/bepass-org/psiphon-tunnel-core v0.0.0-20240311155012-9c2e10df08e5/go.mod h1:vA5iCui7nfavWyBN8MsLYZ5xpKItjrTvPC0SuMWz48Q=
+github.com/bepass-org/warp-plus v1.1.3-0.20240403205252-06b16247e1a5 h1:hQpEMEMypbhbEh05ci4xNHuHFREDb7eHewmxnzGKusc=
+github.com/bepass-org/warp-plus v1.1.3-0.20240403205252-06b16247e1a5/go.mod h1:0UNvYPdk0aQKqWyji1V8oTLNGUzMl0skqPCYPY2rDfc=
github.com/bifurcation/mint v0.0.0-20180306135233-198357931e61 h1:BU+NxuoaYPIvvp8NNkNlLr8aA0utGyuunf4Q3LJ0bh0=
github.com/bifurcation/mint v0.0.0-20180306135233-198357931e61/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
+github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9 h1:a1zrFsLFac2xoM6zG1u72DWJwZG3ayttYLfmLbxVETk=
github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
@@ -47,40 +42,52 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/dchest/siphash v1.2.3 h1:QXwFc8cFOR2dSa/gE6o/HokBMWtLUaNDVd+22aKHeEA=
github.com/dchest/siphash v1.2.3/go.mod h1:0NvQU092bT0ipiFN++/rXm69QG9tVxLAlQHIXMPAkHc=
github.com/deckarep/golang-set v0.0.0-20171013212420-1d4478f51bed h1:njG8LmGD6JCWJu4bwIKmkOHvch70UOEIqczl5vp7Gok=
+github.com/deckarep/golang-set v0.0.0-20171013212420-1d4478f51bed/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
github.com/dgraph-io/badger v1.5.4-0.20180815194500-3a87f6d9c273 h1:45qZ7jowabqhyi3l9Ervox4dhQvLGB5BJPdC8w0a77k=
github.com/dgraph-io/badger v1.5.4-0.20180815194500-3a87f6d9c273/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ=
github.com/dgryski/go-farm v0.0.0-20180109070241-2de33835d102 h1:afESQBXJEnj3fu+34X//E8Wg3nEbMJxJkwSc0tPePK0=
github.com/dgryski/go-farm v0.0.0-20180109070241-2de33835d102/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
+github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/djherbis/buffer v1.2.0 h1:PH5Dd2ss0C7CRRhQCZ2u7MssF+No9ide8Ye71nPHcrQ=
github.com/djherbis/buffer v1.2.0/go.mod h1:fjnebbZjCUpPinBRD+TDwXSOeNQ7fPQWLfGQqiAiUyE=
github.com/djherbis/nio v2.0.3+incompatible h1:CidFHoR25he4511AIQ3RW9LH9XkLMOoNML8xd7R7Irc=
github.com/djherbis/nio v2.0.3+incompatible/go.mod h1:v74owXPROGWsr1y28T13rlXf5Hn/bWJ1bbX8M+BqyPo=
github.com/elazarl/goproxy v0.0.0-20200809112317-0581fc3aee2d h1:rtM8HsT3NG37YPjz8sYSbUSdElP9lUsQENYzJDZDUBE=
+github.com/elazarl/goproxy v0.0.0-20200809112317-0581fc3aee2d/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
github.com/elazarl/goproxy/ext v0.0.0-20200809112317-0581fc3aee2d h1:st1tmvy+4duoRj+RaeeJoECWCWM015fBtf/4aR+hhqk=
+github.com/elazarl/goproxy/ext v0.0.0-20200809112317-0581fc3aee2d/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
github.com/florianl/go-nfqueue v1.1.1-0.20200829120558-a2f196e98ab0 h1:7ZJyJV4KiWBijCCzUPvVaqxsDxO36+KD0XKBdEN3I+8=
+github.com/florianl/go-nfqueue v1.1.1-0.20200829120558-a2f196e98ab0/go.mod h1:2z3Tfqwv2ueuK6h563xUHRcCh1mv38wS9EjiWiesk84=
github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg=
github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag=
+github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
+github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk=
github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI=
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
+github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
+github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/gobwas/glob v0.2.4-0.20180402141543-f00a7392b439 h1:T6zlOdzrYuHf6HUKujm9bzkzbZ5Iv/xf6rs8BHZDpoI=
+github.com/gobwas/glob v0.2.4-0.20180402141543-f00a7392b439/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
-github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8=
+github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd h1:1FjCyPC+syAzJ5/2S8fqdZK1R22vvA0J7JZKcuOIQ7Y=
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
github.com/grafov/m3u8 v0.0.0-20171211212457-6ab8f28ed427 h1:xh96CCAZTX8LJPFoOVRgTwZbn2DvJl8fyCyivohhSIg=
@@ -89,22 +96,28 @@ github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iP
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/josharian/native v1.0.0 h1:Ts/E8zCSEsG17dUqv7joXJFybuMLjQfWE04tsBODTxk=
+github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/juju/ratelimit v1.0.2 h1:sRxmtRiajbvrcLQT7S+JbqU0ntsb9W2yhSdNN8tWfaI=
github.com/juju/ratelimit v1.0.2/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s=
github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU=
github.com/marusama/semaphore v0.0.0-20171214154724-565ffd8e868a h1:6SRny9FLB1eWasPyDUqBQnMi9NhXU01XIlB0ao89YoI=
+github.com/marusama/semaphore v0.0.0-20171214154724-565ffd8e868a/go.mod h1:TmeOqAKoDinfPfSohs14CO3VcEf7o+Bem6JiNe05yrQ=
github.com/mdlayher/netlink v1.4.2-0.20210930205308-a81a8c23d40a h1:yk5OmRew64lWdeNanQ3l0hDgUt1E8MfipPhh/GO9Tuw=
+github.com/mdlayher/netlink v1.4.2-0.20210930205308-a81a8c23d40a/go.mod h1:qw8F9IVzxa0GpqhVAfOw8DNyo7ec/jxI6bPWPEg1MV4=
github.com/mdlayher/socket v0.0.0-20210624160740-9dbe287ded84 h1:L1jnQ6o+K3M574eez7eTxbsia6H1SfJaVpaXY33L37Q=
+github.com/mdlayher/socket v0.0.0-20210624160740-9dbe287ded84/go.mod h1:GAFlyu4/XV68LkQKYzKhIo/WW7j3Zi0YRAz/BOoanUc=
github.com/miekg/dns v1.1.44-0.20210804161652-ab67aa642300 h1:cpzamikkKRyu3TZF14CsVFf/CmhlrqZ+7P9aVZYtXz8=
github.com/miekg/dns v1.1.44-0.20210804161652-ab67aa642300/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -114,10 +127,15 @@ github.com/mroth/weightedrand v1.0.0/go.mod h1:3p2SIcC8al1YMzGhAIoXD+r9olo/g/cdJ
github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q=
github.com/onsi/ginkgo/v2 v2.9.5/go.mod h1:tvAoo1QUJwNEU2ITftXTpR7R1RbCzoZUOs3RonqW57k=
github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE=
+github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg=
github.com/oschwald/geoip2-golang v1.9.0 h1:uvD3O6fXAXs+usU+UGExshpdP13GAqp4GBrzN7IgKZc=
+github.com/oschwald/geoip2-golang v1.9.0/go.mod h1:BHK6TvDyATVQhKNbQBdrj9eAvuwOMi2zSFXizL3K81Y=
github.com/oschwald/maxminddb-golang v1.12.0 h1:9FnTOD0YOhP7DGxGsq4glzpGy5+w7pq50AS6wALUMYs=
+github.com/oschwald/maxminddb-golang v1.12.0/go.mod h1:q0Nob5lTCqyQ8WT6FYgS1L7PXKVVbgiymefNwIjPzgY=
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
+github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pebbe/zmq4 v1.2.10 h1:wQkqRZ3CZeABIeidr3e8uQZMMH5YAykA/WN0L5zkd1c=
+github.com/pebbe/zmq4 v1.2.10/go.mod h1:nqnPueOapVhE2wItZ0uOErngczsJdLOGkebMxaO8r48=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8=
@@ -144,17 +162,20 @@ github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58
github.com/quic-go/quic-go v0.40.1 h1:X3AGzUNFs0jVuO3esAGnTfvdgvL4fq655WaOi1snv1Q=
github.com/quic-go/quic-go v0.40.1/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c=
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
-github.com/refraction-networking/conjure v0.7.10-0.20231110193225-e4749a9dedc9 h1:46+z0lVJL5ynP09dtThex4GiowaANoBk7DsNF0+a+7Q=
-github.com/refraction-networking/conjure v0.7.10-0.20231110193225-e4749a9dedc9/go.mod h1:O5u/Mpg5b3whLF8L701pTMQW23SviS+rDKdWbY/BM0Q=
+github.com/refraction-networking/conjure v0.7.11-0.20240130155008-c8df96195ab2 h1:m2ZH6WV69otVmBpWbk8et3MypHFsjcYXTNrknQKS/PY=
+github.com/refraction-networking/conjure v0.7.11-0.20240130155008-c8df96195ab2/go.mod h1:7KuAtYfSL0K0WpCScjN9YKiOZ4AQ/8IzSjUtVwWbSv8=
github.com/refraction-networking/ed25519 v0.1.2 h1:08kJZUkAlY7a7cZGosl1teGytV+QEoNxPO7NnRvAB+g=
github.com/refraction-networking/ed25519 v0.1.2/go.mod h1:nxYLUAYt/hmNpAh64PNSQ/tQ9gTIB89wCaGKJlRtZ9I=
-github.com/refraction-networking/gotapdance v1.7.7 h1:RSdDCA0v4n/iIxCnxLF6uCoJdlo000R+IKGvELfpc/A=
-github.com/refraction-networking/gotapdance v1.7.7/go.mod h1:KORLtX2tKFXb2YDhynsQmGcLmmAHW20CVvdhP5kuAFA=
+github.com/refraction-networking/gotapdance v1.7.10 h1:vPtvuihP95SqrnnpX//KI1PTqrXCvNnOQslrG4gxsRY=
+github.com/refraction-networking/gotapdance v1.7.10/go.mod h1:N7Xmt+/bLv+1VctiBHtsaL6YBknW2ox5LRLzPTISMzY=
github.com/refraction-networking/obfs4 v0.1.2 h1:J842O4fGSkd2W8ogYj0KN6gqVVY+Cpqodw9qFGL7wVU=
github.com/refraction-networking/obfs4 v0.1.2/go.mod h1:wAl/+gWiLsrcykJA3nKJHx89f5/gXGM8UKvty7+mvbM=
github.com/refraction-networking/utls v1.3.3 h1:f/TBLX7KBciRyFH3bwupp+CE4fzoYKCirhdRcC490sw=
github.com/refraction-networking/utls v1.3.3/go.mod h1:DlecWW1LMlMJu+9qpzzQqdHDT/C2LAe03EdpLUz/RL8=
+github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
+github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 h1:7YvPJVmEeFHR1Tj9sZEYsmarJEQfMVYpd/Vyy/A8dqE=
+github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/sergeyfrolov/bsbuffer v0.0.0-20180903213811-94e85abb8507 h1:ML7ZNtcln5UBo5Wv7RIv9Xg3Pr5VuRCWLFXEwda54Y4=
github.com/sergeyfrolov/bsbuffer v0.0.0-20180903213811-94e85abb8507/go.mod h1:DbI1gxrXI2jRGw7XGEUZQOOMd6PsnKzRrCKabvvMrwM=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
@@ -176,8 +197,6 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtse
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/trojan-gfw/go-tun2socks v1.16.3-0.20210702214000-083d49176e05 h1:NyCeGCPhB19/yxuvXE+F+dTwjsKctXHRxYT0Go6jG0I=
github.com/trojan-gfw/go-tun2socks v1.16.3-0.20210702214000-083d49176e05/go.mod h1:iSiwGqBOvfnMVjb+LVOCNygXUTGJ9gngIMp95x1sI9c=
-github.com/uoosef/psiphon-tunnel-core v0.0.0-20240126135009-9fbc37b0b068 h1:IFgISqFtuFuk6C1VhkEEEzyxAzjG72kLEKt4iyXrcfo=
-github.com/uoosef/psiphon-tunnel-core v0.0.0-20240126135009-9fbc37b0b068/go.mod h1:VzcR2ERaXw6U/NwxDgjv8VYC0iFrnap+lfEjpRK6cXs=
github.com/v2pro/plz v0.0.0-20221028024117-e5f9aec5b631 h1:WYq/4UeJfAorBY7ncC31bVxI031x4MUCQvF+z12fIYA=
github.com/v2pro/plz v0.0.0-20221028024117-e5f9aec5b631/go.mod h1:3gacX+hQo+xvl0vtLqCMufzxuNCwt4geAVOMt2LQYfE=
github.com/wader/filtertransport v0.0.0-20200316221534-bdd9e61eee78 h1:9sreu9e9KOihf2Y0NbpyfWhd1XFDcL4GTkPYL4IvMrg=
@@ -196,11 +215,12 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
-golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
-golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
+golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
+golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 h1:Di6/M8l0O2lCLc6VVRWhgCiApHV8MnQurBnFSHsQtNY=
golang.org/x/exp v0.0.0-20230725093048-515e97ebf090/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/exp/typeparams v0.0.0-20240119083558-1b970713d09a h1:8qmSSA8Gz/1kTrCe0nqR0R3Gb/NDhykzWw2q2mWZydM=
+golang.org/x/exp/typeparams v0.0.0-20240119083558-1b970713d09a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/mobile v0.0.0-20240213143359-d1f7d3436075 h1:iZzqyDd8gFkJZpsJNzveyScRBcQlsveheh6Q77LzhPY=
golang.org/x/mobile v0.0.0-20240213143359-d1f7d3436075/go.mod h1:Y8Bnziw2dX69ZhYuqQB8Ihyjks1Q6fMmbg17j9+ISNA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
@@ -214,8 +234,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
-golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
-golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
+golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
+golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -235,15 +255,16 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
-golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
+golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
-golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
+golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
+golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
@@ -264,7 +285,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
-google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o=
+google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
+google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
@@ -278,6 +300,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259 h1:TbRPT0HtzFP3Cno1zZo7yPzEEnfu8EjLfl6IU9VfqkQ=
-gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259/go.mod h1:AVgIgHMwK63XvmAzWG9vLQ41YnVHN0du0tEC46fI7yY=
+gvisor.dev/gvisor v0.0.0-20240313225113-67a078058255 h1:4+3Gw2Xsj4FAPZO/Q35L7sqt4oyUFSuTfRVgxSdJ1lE=
+gvisor.dev/gvisor v0.0.0-20240313225113-67a078058255/go.mod h1:NQHVAzMwvZ+Qe3ElSiHmq9RUm1MdNHpUZ52fiEqvn+0=
honnef.co/go/tools v0.4.2 h1:6qXr+R5w+ktL5UkwEbPp+fEvfyoMPche6GkOpGHZcLc=
+honnef.co/go/tools v0.4.2/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA=
diff --git a/app/libs/tun2socks.go b/app/libs/tun2socks.go
index 0e9c1c09..f4a8833c 100644
--- a/app/libs/tun2socks.go
+++ b/app/libs/tun2socks.go
@@ -5,15 +5,18 @@ import (
"context"
"fmt"
"io"
- "log"
+ "log/slog"
+ "net/netip"
"os"
"os/signal"
"strings"
"sync"
"syscall"
+ "time"
"tun2socks/lwip"
- "github.com/bepass-org/wireguard-go/app"
+ "github.com/bepass-org/warp-plus/app"
+ "github.com/bepass-org/warp-plus/wiresocks"
L "github.com/xjasonlyu/tun2socks/v2/log"
)
@@ -21,8 +24,9 @@ import (
var (
logMessages []string
mu sync.Mutex
- wg sync.WaitGroup
+ ctx context.Context
cancelFunc context.CancelFunc
+ l *slog.Logger
)
type StartOptions struct {
@@ -36,8 +40,6 @@ type StartOptions struct {
Country string
PsiphonEnabled bool
Gool bool
- Scan bool
- Rtt int
}
var global StartOptions
@@ -51,14 +53,37 @@ func (writer logWriter) Write(bytes []byte) (int, error) {
return len(bytes), nil
}
-func RunWarp(opt *StartOptions) {
+func Start(opt *StartOptions) {
global = *opt
+
+ ctx, cancelFunc = signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
+
+ if err := os.Chdir(global.Path); err != nil {
+ l.Error("error changing to 'main' directory", "error", err.Error())
+ os.Exit(1)
+ }
+
logger := logWriter{}
- log.SetOutput(logger)
+
+ lOpts := slog.HandlerOptions{
+ Level: func() slog.Level {
+ if global.Verbose {
+ return slog.LevelDebug
+ }
+ return slog.LevelInfo
+ }(),
+ ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr {
+ if (a.Key == slog.TimeKey || a.Key == slog.LevelKey) && len(groups) == 0 {
+ return slog.Attr{} // remove excess keys
+ }
+ return a
+ },
+ }
+
+ l = slog.New(slog.NewTextHandler(logger, &lOpts))
r, w, _ := os.Pipe()
os.Stdout = w
os.Stderr = w
-
L.SetLevel(L.DebugLevel)
L.SetOutput(logger)
@@ -71,74 +96,59 @@ func RunWarp(opt *StartOptions) {
fmt.Fprintln(os.Stderr, "There was an error with the scanner", err)
}
}(r)
- if err := os.Chdir(global.Path); err != nil {
- log.Fatal("Error changing to 'main' directory:", err)
- }
- // Setup context with cancellation.
- ctx, cancel := context.WithCancel(context.Background())
- cancelFunc = cancel
- wg.Add(1)
-
- // Start your long-running process.
- go runServer(ctx, global.TunFd)
-
- // Wait for interrupt signal.
- sigCh := make(chan os.Signal, 1)
- signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
-
- select {
- case <-sigCh:
- // Received an interrupt signal, shut down.
- log.Println("Shutting down server...")
- cancelFunc()
- case <-ctx.Done():
- // Context was cancelled, perhaps from another part of the app calling Shutdown().
+ var scanOpts *wiresocks.ScanOptions
+ if global.Endpoint == "" {
+ scanOpts = &wiresocks.ScanOptions{
+ V4: true,
+ V6: true,
+ MaxRTT: 1500 * time.Millisecond,
+ }
}
- // Wait for the server goroutine to finish.
- wg.Wait()
- log.Println("Server shut down gracefully.")
-}
-
-func runServer(ctx context.Context, fd int) {
- // Ensuring a cleanup operation even in the case of an error
- defer func() {
- // Perform cleanup and exit.
- lwip.Stop()
- log.Println("Cleanup done, exiting runServer goroutine.")
-
- defer wg.Done()
- }()
-
- // Start wireguard-go and gvisor-tun2socks.
- go func() {
- err := app.RunWarp(global.PsiphonEnabled, global.Gool, global.Scan, global.Verbose, global.Country, global.BindAddress, global.Endpoint, global.License, ctx, global.Rtt)
- if err != nil {
- log.Println(err)
+ var psiphonOpts *app.PsiphonOptions
+ if global.PsiphonEnabled {
+ psiphonOpts = &app.PsiphonOptions{
+ Country: global.Country,
}
- }()
+ }
+
+ err := app.RunWarp(ctx, l, app.WarpOptions{
+ Bind: netip.MustParseAddrPort(global.BindAddress),
+ Endpoint: global.Endpoint,
+ License: global.License,
+ Psiphon: psiphonOpts,
+ Gool: global.Gool,
+ Scan: scanOpts,
+ })
+ if err != nil {
+ l.Error(err.Error())
+ os.Exit(1)
+ }
tun2socksStartOptions := &lwip.Tun2socksStartOptions{
- TunFd: fd,
+ TunFd: global.TunFd,
Socks5Server: strings.Replace(global.BindAddress, "0.0.0.0", "127.0.0.1", -1),
FakeIPRange: "24.0.0.0/8",
MTU: 0,
EnableIPv6: true,
AllowLan: true,
}
- lwip.Start(tun2socksStartOptions)
+ if ret := lwip.Start(tun2socksStartOptions); ret != 0 {
+ l.Error("failed to start LWIP")
+ os.Exit(1)
+ }
- // Wait for context cancellation.
- <-ctx.Done()
+ go func() {
+ <-ctx.Done()
+ lwip.Stop()
+
+ l.Info("server shut down gracefully")
+ }()
}
-// Shutdown can be called to stop the server from another part of the app.
-func Shutdown() {
- if cancelFunc != nil {
- cancelFunc()
- os.Exit(0)
- }
+func Stop() {
+ os.Exit(0)
}
func GetLogMessages() string {
diff --git a/app/lint-baseline.xml b/app/lint-baseline.xml
new file mode 100644
index 00000000..a7415273
--- /dev/null
+++ b/app/lint-baseline.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index bb2fe7db..1b8223da 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,6 +2,9 @@
+
+
+
@@ -31,6 +34,7 @@
android:supportsRtl="false"
tools:replace="android:supportsRtl"
android:screenOrientation="portrait"
+ android:enableOnBackInvokedCallback="true"
android:theme="@style/Theme.OblivionUI"
tools:targetApi="31">
diff --git a/app/src/main/java/org/bepass/oblivion/BypassListAppsAdapter.java b/app/src/main/java/org/bepass/oblivion/BypassListAppsAdapter.java
index 8e10ea7f..3bd50867 100644
--- a/app/src/main/java/org/bepass/oblivion/BypassListAppsAdapter.java
+++ b/app/src/main/java/org/bepass/oblivion/BypassListAppsAdapter.java
@@ -30,10 +30,10 @@ public class BypassListAppsAdapter extends RecyclerView.Adapter appList = new ArrayList<>();
private final Handler handler = new Handler(Looper.getMainLooper());
private final FileManager fm;
private final LoadListener loadListener;
+ private List appList = new ArrayList<>();
private OnAppSelectListener onAppSelectListener;
@@ -118,7 +118,8 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
newSet.remove(appInfo.packageName);
}
fm.set("splitTunnelApps", newSet);
- if (onAppSelectListener != null) onAppSelectListener.onSelect(appInfo.packageName, appInfo.isSelected);
+ if (onAppSelectListener != null)
+ onAppSelectListener.onSelect(appInfo.packageName, appInfo.isSelected);
});
}
@@ -128,6 +129,14 @@ public int getItemCount() {
return appList.size();
}
+ public interface LoadListener {
+ void onLoad(boolean loading);
+ }
+
+ public interface OnAppSelectListener {
+ void onSelect(String packageName, boolean selected);
+ }
+
public static class ViewHolder extends RecyclerView.ViewHolder {
TextView appNameTextView;
CheckBox checkBox;
@@ -158,14 +167,4 @@ private interface IconLoader {
Drawable load();
}
}
-
- public interface LoadListener {
- void onLoad(boolean loading);
- }
-
- public interface OnAppSelectListener {
- void onSelect(String packageName, boolean selected);
- }
-
-
}
\ No newline at end of file
diff --git a/app/src/main/java/org/bepass/oblivion/ConnectionAwareBaseActivity.java b/app/src/main/java/org/bepass/oblivion/ConnectionAwareBaseActivity.java
index 45b3ffe3..f3052467 100644
--- a/app/src/main/java/org/bepass/oblivion/ConnectionAwareBaseActivity.java
+++ b/app/src/main/java/org/bepass/oblivion/ConnectionAwareBaseActivity.java
@@ -16,7 +16,6 @@
public abstract class ConnectionAwareBaseActivity extends AppCompatActivity {
protected ConnectionState lastKnownConnectionState = ConnectionState.DISCONNECTED;
-
private Messenger serviceMessenger;
private boolean isBound;
@@ -36,6 +35,7 @@ public void onServiceDisconnected(ComponentName arg0) {
};
abstract String getKey();
+
abstract void onConnectionStateChange(ConnectionState state);
private void observeConnectionStatus() {
@@ -69,5 +69,4 @@ protected void onStop() {
isBound = false;
}
}
-
}
diff --git a/app/src/main/java/org/bepass/oblivion/EditSheet.java b/app/src/main/java/org/bepass/oblivion/EditSheet.java
index 3029eaca..5159b569 100644
--- a/app/src/main/java/org/bepass/oblivion/EditSheet.java
+++ b/app/src/main/java/org/bepass/oblivion/EditSheet.java
@@ -70,6 +70,4 @@ public void start() {
value.requestFocus();
sheet.setOnCancelListener(dialog -> sheetsCallBack.onSheetClosed());
}
-
-
}
diff --git a/app/src/main/java/org/bepass/oblivion/IPDetails.java b/app/src/main/java/org/bepass/oblivion/IPDetails.java
index 79888bc6..8996d5c0 100644
--- a/app/src/main/java/org/bepass/oblivion/IPDetails.java
+++ b/app/src/main/java/org/bepass/oblivion/IPDetails.java
@@ -1,10 +1,7 @@
package org.bepass.oblivion;
public class IPDetails {
-
public String ip;
public String country;
- public String city;
public String flag;
-
}
diff --git a/app/src/main/java/org/bepass/oblivion/MainActivity.java b/app/src/main/java/org/bepass/oblivion/MainActivity.java
index d922e535..292344ad 100644
--- a/app/src/main/java/org/bepass/oblivion/MainActivity.java
+++ b/app/src/main/java/org/bepass/oblivion/MainActivity.java
@@ -5,19 +5,17 @@
import android.os.Build;
import android.os.Bundle;
import android.view.View;
+import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
-import android.widget.FrameLayout;
import androidx.activity.OnBackPressedCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
-import com.suke.widget.SwitchButton;
-
public class MainActivity extends ConnectionAwareBaseActivity {
// Views
ImageView infoIcon, bugIcon, settingsIcon;
@@ -25,37 +23,12 @@ public class MainActivity extends ConnectionAwareBaseActivity {
TextView stateText, publicIP;
ProgressBar ipProgressBar;
FileManager fileManager;
- Boolean canShowNotification = false;
+ PublicIPUtils pIPUtils;
private ActivityResultLauncher pushNotificationPermissionLauncher;
private ActivityResultLauncher vpnPermissionLauncher;
private long backPressedTime;
private Toast backToast;
- private SwitchButton.OnCheckedChangeListener createSwitchCheckedChangeListener() {
- return (view, isChecked) -> {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && !canShowNotification) {
- pushNotificationPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS);
- return;
- }
-
- if (!lastKnownConnectionState.isDisconnected()) {
- OblivionVpnService.stopVpnService(this);
- return;
- }
-
- if (isChecked) {
- // From NoAction to Connecting
- Intent vpnIntent = OblivionVpnService.prepare(this);
- if (vpnIntent != null) {
- vpnPermissionLauncher.launch(vpnIntent);
- } else {
- OblivionVpnService.startVpnService(this);
- }
- }
-
- };
- }
-
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -68,112 +41,32 @@ public void handleOnBackPressed() {
if (backToast != null) backToast.cancel();
finish(); // or super.handleOnBackPressed() if you want to keep default behavior alongside
} else {
- if (backToast != null) backToast.cancel(); // Cancel the existing toast to avoid stacking
+ if (backToast != null)
+ backToast.cancel(); // Cancel the existing toast to avoid stacking
backToast = Toast.makeText(MainActivity.this, "برای خروج، دوباره بازگشت را فشار دهید.", Toast.LENGTH_SHORT);
backToast.show();
}
backPressedTime = System.currentTimeMillis();
}
});
- init();
- firstValueInit();
- switchButton.setOnCheckedChangeListener(createSwitchCheckedChangeListener());
-
- }
-
- @NonNull
- @Override
- String getKey() {
- return "mainActivity";
- }
-
- @Override
- void onConnectionStateChange(ConnectionState state) {
- updateUi();
- }
-
- private void updateUi() {
- switch (lastKnownConnectionState) {
- case DISCONNECTED:
- disconnected();
- break;
- case CONNECTING:
- connecting();
- break;
- case CONNECTED:
- connected();
- break;
- }
- }
-
- private void getIPDetails() {
- ipProgressBar.setVisibility(View.VISIBLE);
- int port = Integer.parseInt(fileManager.getString("USERSETTING_port"));
- PublicIPUtils.getIPDetails(port, (details) -> {
- ipProgressBar.setVisibility(View.GONE);
- if (details.ip != null && details.flag != null){
- String ipString = details.ip + " " + details.flag;
- publicIP.setText(ipString);
- publicIP.setVisibility(View.VISIBLE);
- }
- });
- }
-
- private void connected() {
- stateText.setText("اتصال برقرار شد");
- switchButton.setChecked(true, false);
- getIPDetails();
- }
-
- private void connecting() {
- stateText.setText("در حال اتصال...");
- publicIP.setVisibility(View.GONE);
- switchButton.setChecked(true, false);
- }
-
- private void disconnected() {
- stateText.setText("متصل نیستید");
- publicIP.setVisibility(View.GONE);
- switchButton.setChecked(false, false);
- }
-
- private void firstValueInit() {
- if (fileManager.getBoolean("isFirstValueInit")) return;
-
- fileManager.set("USERSETTING_endpoint", "engage.cloudflareclient.com:2408");
- fileManager.set("USERSETTING_port", "8086");
-
- fileManager.set("USERSETTING_gool", false);
- fileManager.set("USERSETTING_psiphon", false);
- fileManager.set("USERSETTING_lan", false);
- fileManager.set("isFirstValueInit", true);
- }
-
- private void initPermissionLauncher() {
pushNotificationPermissionLauncher = registerForActivityResult(new ActivityResultContracts.RequestPermission(), isGranted -> {
- if (isGranted) {
- canShowNotification = true;
- } else {
- disconnected();
+ if (!isGranted) {
Toast.makeText(this, "Permission denied", Toast.LENGTH_LONG).show();
}
});
vpnPermissionLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
- if (result.getResultCode() == RESULT_OK) {
- OblivionVpnService.startVpnService(this);
- } else {
- OblivionVpnService.stopVpnService(this);
+ if (result.getResultCode() != RESULT_OK) {
Toast.makeText(this, "Really!?", Toast.LENGTH_LONG).show();
}
+ switchButton.setChecked(false);
});
- }
- private void init() {
- initPermissionLauncher();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
pushNotificationPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS);
}
+
fileManager = FileManager.getInstance(getApplicationContext());
+ pIPUtils = PublicIPUtils.getInstance(getApplicationContext());
infoIcon = findViewById(R.id.info_icon);
bugIcon = findViewById(R.id.bug_icon);
@@ -183,13 +76,76 @@ private void init() {
switchButton = findViewById(R.id.switch_button);
stateText = findViewById(R.id.state_text);
publicIP = findViewById(R.id.publicIP);
- ipProgressBar = (ProgressBar)findViewById(R.id.ipProgressBar);
+ ipProgressBar = (ProgressBar) findViewById(R.id.ipProgressBar);
infoIcon.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, InfoActivity.class)));
bugIcon.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, BugActivity.class)));
settingsIcon.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, SettingsActivity.class)));
- switchButtonFrame.setOnClickListener(v -> {
- switchButton.toggle();
+ switchButtonFrame.setOnClickListener(v -> switchButton.toggle());
+
+ if (!fileManager.getBoolean("isFirstValueInit")) {
+ fileManager.set("USERSETTING_endpoint", "engage.cloudflareclient.com:2408");
+ fileManager.set("USERSETTING_port", "8086");
+ fileManager.set("USERSETTING_gool", false);
+ fileManager.set("USERSETTING_psiphon", false);
+ fileManager.set("USERSETTING_lan", false);
+ fileManager.set("isFirstValueInit", true);
+ }
+
+ switchButton.setOnCheckedChangeListener((view, isChecked) -> {
+ if (!isChecked) {
+ if (!lastKnownConnectionState.isDisconnected()) {
+ OblivionVpnService.stopVpnService(this);
+ }
+ return;
+ }
+ Intent vpnIntent = OblivionVpnService.prepare(this);
+ if (vpnIntent != null) {
+ vpnPermissionLauncher.launch(vpnIntent);
+ return;
+ }
+ if (lastKnownConnectionState.isDisconnected()) {
+ OblivionVpnService.startVpnService(this);
+ }
});
}
+
+ @NonNull
+ @Override
+ String getKey() {
+ return "mainActivity";
+ }
+
+ @Override
+ void onConnectionStateChange(ConnectionState state) {
+ switch (state) {
+ case DISCONNECTED:
+ publicIP.setVisibility(View.GONE);
+ stateText.setText("متصل نیستید");
+ ipProgressBar.setVisibility(View.GONE);
+ switchButton.setEnabled(true);
+ switchButton.setChecked(false, false);
+ break;
+ case CONNECTING:
+ stateText.setText("در حال اتصال...");
+ publicIP.setVisibility(View.GONE);
+ ipProgressBar.setVisibility(View.VISIBLE);
+ switchButton.setChecked(true, false);
+ switchButton.setEnabled(false);
+ break;
+ case CONNECTED:
+ switchButton.setEnabled(true);
+ stateText.setText("اتصال برقرار شد");
+ switchButton.setChecked(true, false);
+ ipProgressBar.setVisibility(View.GONE);
+ pIPUtils.getIPDetails((details) -> {
+ if (details.ip != null) {
+ String ipString = details.ip+ " " + details.flag;
+ publicIP.setText(ipString);
+ publicIP.setVisibility(View.VISIBLE);
+ }
+ });
+ break;
+ }
+ }
}
diff --git a/app/src/main/java/org/bepass/oblivion/OblivionVpnService.java b/app/src/main/java/org/bepass/oblivion/OblivionVpnService.java
index 1a819153..23bc7e15 100644
--- a/app/src/main/java/org/bepass/oblivion/OblivionVpnService.java
+++ b/app/src/main/java/org/bepass/oblivion/OblivionVpnService.java
@@ -33,8 +33,10 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
-import java.util.Objects;
import java.util.Set;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
@@ -46,10 +48,10 @@
public class OblivionVpnService extends VpnService {
public static final String FLAG_VPN_START = "org.bepass.oblivion.START";
public static final String FLAG_VPN_STOP = "org.bepass.oblivion.STOP";
- static final int MSG_PERFORM_CONNECTION_TEST = 1;
- static final int MSG_CONNECTION_STATE_SUBSCRIBE = 2;
- static final int MSG_CONNECTION_STATE_UNSUBSCRIBE = 3;
- static final int MSG_TILE_STATE_SUBSCRIPTION_RESULT = 4;
+ static final int MSG_CONNECTION_STATE_SUBSCRIBE = 1;
+ static final int MSG_CONNECTION_STATE_UNSUBSCRIBE = 2;
+ static final int MSG_TILE_STATE_SUBSCRIPTION_RESULT = 3;
+
private static final String TAG = "oblivionVPN";
private static final String PRIVATE_VLAN4_CLIENT = "172.19.0.1";
private static final String PRIVATE_VLAN6_CLIENT = "fdfe:dcba:9876::1";
@@ -70,9 +72,10 @@ public void run() {
handler.postDelayed(this, 2000); // Poll every 2 seconds
}
};
+// ExecutorService executorService = Executors.newFixedThreadPool(2);
+ private Executor executorService = Executors.newSingleThreadExecutor();
private Notification notification;
private ParcelFileDescriptor mInterface;
- private Thread vpnThread;
private String bindAddress;
private FileManager fileManager;
private ConnectionState lastKnownState = ConnectionState.DISCONNECTED;
@@ -174,25 +177,6 @@ private static int findFreePort() {
throw new IllegalStateException("Could not find a free TCP/IP port to start embedded Jetty HTTP Server on");
}
-
- private static boolean waitForConnection(String bindAddress) {
- long startTime = System.currentTimeMillis();
- boolean isSuccessful = false;
- while (System.currentTimeMillis() - startTime < 60 * 1000) { //60 seconds
- boolean result = pingOverHTTP(bindAddress);
- if (result) {
- isSuccessful = true;
- break;
- }
- try {
- Thread.sleep(500); // Sleep before retrying
- } catch (InterruptedException e) {
- break; // Exit if interrupted (e.g., service stopping)
- }
- }
- return isSuccessful;
- }
-
public static boolean pingOverHTTP(String bindAddress) {
System.out.println("Pinging");
Map result = splitHostAndPort(bindAddress);
@@ -236,31 +220,32 @@ public static String isLocalPortInUse(String bindAddress) {
}
}
- private static void performConnectionTest(String bindAddress, boolean psiphonMode, ConnectionStateChangeListener changeListener) {
- new Thread(() -> {
- long startTime = System.currentTimeMillis();
- boolean isSuccessful = false;
-
- while (System.currentTimeMillis() - startTime < 2 * 60 * 1000) { // 2 minutes
- String result = isLocalPortInUse(bindAddress);
- if (result.contains("exception")) {
- if (changeListener != null)
- changeListener.onChange(ConnectionState.DISCONNECTED);
- return;
- }
- if (result.contains("true")) {
- isSuccessful = !psiphonMode || waitForConnection(bindAddress);
- break;
- }
- try {
- Thread.sleep(1000); // Sleep for a second before retrying
- } catch (InterruptedException e) {
- break; // Exit if interrupted (e.g., service stopping)
- }
+ private static Set getSplitTunnelApps(FileManager fm) {
+ return fm.getStringSet("splitTunnelApps", new HashSet<>());
+ }
+
+ private void performConnectionTest(String bindAddress, ConnectionStateChangeListener changeListener) {
+ if (changeListener == null) {
+ return;
+ }
+
+ long startTime = System.currentTimeMillis();
+
+ while (System.currentTimeMillis() - startTime < 60 * 1000) { // 1 minute
+ boolean result = pingOverHTTP(bindAddress);
+ if (result) {
+ changeListener.onChange(ConnectionState.CONNECTED);
+ return;
+ }
+
+ try {
+ Thread.sleep(1000); // Sleep before retrying
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ break;
}
- if (changeListener != null)
- changeListener.onChange(isSuccessful ? ConnectionState.CONNECTED : ConnectionState.DISCONNECTED);
- }).start();
+ }
+ changeListener.onChange(ConnectionState.DISCONNECTED);
}
private String getBindAddress() {
@@ -298,23 +283,49 @@ private void clearLogFile() {
}
}
+ private void start() {
+ fileManager = FileManager.getInstance(this);
+ bindAddress = getBindAddress();
+
+ executorService.execute(new Runnable() {
+ @Override
+ public void run() {
+ setLastKnownState(ConnectionState.CONNECTING);
+ Log.i(TAG, "Clearing Logs");
+ clearLogFile();
+ Log.i(TAG, "Create Notification");
+ createNotification();
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
+ startForeground(1, notification);
+ } else {
+ startForeground(1, notification, FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED);
+ }
+ Log.i(TAG, "Configuring VPN service");
+ configure();
+
+ performConnectionTest(bindAddress, (state) -> {
+ if (state == ConnectionState.DISCONNECTED) {
+ onRevoke();
+ }
+ setLastKnownState(state);
+ });
+ }
+ });
+ }
+
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
- if (intent != null && FLAG_VPN_START.equals(intent.getAction())) {
- fileManager = FileManager.getInstance(this);
- bindAddress = getBindAddress();
- runVpn();
- boolean psiphonMode = fileManager.getBoolean("USERSETTING_psiphon");
- performConnectionTest(bindAddress, psiphonMode, (state) -> {
- if (state == ConnectionState.DISCONNECTED) {
- stopVpnService(getApplicationContext());
- return;
- }
- setLastKnownState(state);
- });
+ if (intent == null) {
+ return START_NOT_STICKY;
+ }
+
+ if (intent.getAction().equals(FLAG_VPN_START)) {
+ start();
return START_STICKY;
- } else if (intent != null && FLAG_VPN_STOP.equals(intent.getAction())) {
- stopVpn();
+ }
+
+ if (intent.getAction().equals(FLAG_VPN_STOP)) {
+ onRevoke();
return START_NOT_STICKY;
}
return START_NOT_STICKY;
@@ -334,26 +345,6 @@ public void onDestroy() {
@Override
public void onRevoke() {
- stopVpn();
- }
-
- private void runVpn() {
- setLastKnownState(ConnectionState.CONNECTING);
- Log.i(TAG, "Clearing Logs");
- clearLogFile();
- Log.i(TAG, "Create Notification");
- createNotification();
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
- startForeground(1, notification);
- } else {
- startForeground(1, notification,
- FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED);
- }
- Log.i(TAG, "Configuring VPN service");
- configure();
- }
-
- private void stopVpn() {
setLastKnownState(ConnectionState.DISCONNECTED);
Log.i(TAG, "Stopping VPN");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@@ -368,12 +359,6 @@ private void stopVpn() {
e.printStackTrace();
}
- try {
- Tun2socks.shutdown();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
if (mInterface != null) {
try {
mInterface.close();
@@ -382,13 +367,16 @@ private void stopVpn() {
}
}
- if (vpnThread != null) {
- try {
- vpnThread.join();
- vpnThread.stop();
- } catch (Exception e) {
+ executorService.execute(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ Tun2socks.stop();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
- }
+ });
}
private void publishConnectionState(ConnectionState state) {
@@ -468,49 +456,6 @@ public void removeConnectionStateObserver(String key) {
connectionStateObservers.remove(key);
}
- private StartOptions calculateArgs() {
- StartOptions so = new StartOptions();
- so.setPath(getApplicationContext().getFilesDir().getAbsolutePath());
- so.setVerbose(true);
- so.setVerbose(true);
- String endpoint = fileManager.getString("USERSETTING_endpoint", "notset");
- String country = fileManager.getString("USERSETTING_country", "");
- String license = fileManager.getString("USERSETTING_license", "notset");
-
- boolean enablePsiphon = fileManager.getBoolean("USERSETTING_psiphon", false);
- boolean enableGool = fileManager.getBoolean("USERSETTING_gool", false);
-
- if (!endpoint.contains("engage.cloudflareclient.com")) {
- so.setEndpoint(endpoint);
- } else {
- so.setEndpoint("notset");
- so.setScan(true);
- }
-
- so.setBindAddress(bindAddress);
-
- if (!license.trim().isEmpty()) {
- so.setLicense(license.trim());
- } else {
- so.setLicense("notset");
- }
-
- if (enablePsiphon && !enableGool) {
- so.setPsiphonEnabled(true);
- if (!country.trim().isEmpty() && country.length() == 2) {
- so.setCountry(country.trim());
- }
- }
-
- if (!enablePsiphon && enableGool) {
- so.setGool(true);
- }
-
- so.setRtt(800);
-
- return so;
- }
-
private void configure() {
VpnService.Builder builder = new VpnService.Builder();
try {
@@ -527,29 +472,59 @@ private void configure() {
.addDisallowedApplication(getPackageName())
.addRoute("0.0.0.0", 0)
.addRoute("::", 0);
- fileManager.getStringSet("splitTunnelApps", new HashSet<>());
- SplitTunnelMode splitTunnelMode = SplitTunnelMode.getSplitTunnelMode(fileManager);
- if (splitTunnelMode == SplitTunnelMode.BLACKLIST) {
- for (String packageName : getSplitTunnelApps(fileManager)) {
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+
+ fileManager.getStringSet("splitTunnelApps", new HashSet<>());
+ SplitTunnelMode splitTunnelMode = SplitTunnelMode.getSplitTunnelMode(fileManager);
+ if (splitTunnelMode == SplitTunnelMode.BLACKLIST) {
+ for (String packageName : getSplitTunnelApps(fileManager)) {
+ try {
builder.addDisallowedApplication(packageName);
+ } catch (PackageManager.NameNotFoundException e) {
+ e.printStackTrace();
}
}
-
- } catch (PackageManager.NameNotFoundException e) {
- throw new RuntimeException(e);
}
+
mInterface = builder.establish();
Log.i(TAG, "Interface created");
- StartOptions so = calculateArgs();
- so.setTunFd(mInterface.getFd());
+ String endpoint = fileManager.getString("USERSETTING_endpoint", "engage.cloudflareclient.com:2408").trim();
+ if (endpoint.equals("engage.cloudflareclient.com:2408")) {
+ endpoint = "";
+ }
- vpnThread = new Thread(() -> Tun2socks.runWarp(so));
- vpnThread.start();
- }
+ String license = fileManager.getString("USERSETTING_license", "").trim();
+ boolean enablePsiphon = fileManager.getBoolean("USERSETTING_psiphon", false);
+ String country = fileManager.getString("USERSETTING_country", "AT").trim();
+ boolean enableGool = fileManager.getBoolean("USERSETTING_gool", false);
- private static Set getSplitTunnelApps(FileManager fm) {
- return fm.getStringSet("splitTunnelApps", new HashSet<>());
+ StartOptions so = new StartOptions();
+ so.setPath(getApplicationContext().getFilesDir().getAbsolutePath());
+ so.setVerbose(true);
+ so.setEndpoint(endpoint);
+ so.setBindAddress(bindAddress);
+ so.setLicense(license);
+
+ if (enablePsiphon && !enableGool) {
+ so.setPsiphonEnabled(true);
+ so.setCountry(country);
+ }
+
+ if (!enablePsiphon && enableGool) {
+ so.setGool(true);
+ }
+
+ so.setTunFd(mInterface.getFd());
+
+ try {
+ Tun2socks.start(so);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
private static class IncomingHandler extends Handler {
@@ -566,37 +541,6 @@ public void handleMessage(Message msg) {
OblivionVpnService service = serviceRef.get();
if (service == null) return;
switch (msg.what) {
- case MSG_PERFORM_CONNECTION_TEST: {
- boolean psiphonMode = service.fileManager.getBoolean("USERSETTING_psiphon");
- performConnectionTest(service.bindAddress, psiphonMode, new ConnectionStateChangeListener() {
- @Override
- public void onChange(ConnectionState state) {
- service.setLastKnownState(state);
- Bundle data = new Bundle();
- if (state == ConnectionState.DISCONNECTED) {
- data.putBoolean("success", false);
- Message replyMsg = Message.obtain(null, MSG_PERFORM_CONNECTION_TEST);
- replyMsg.setData(data);
- try {
- message.replyTo.send(replyMsg);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- } else {
- data.putBoolean("success", true);
- Message replyMsg = Message.obtain(null, MSG_PERFORM_CONNECTION_TEST);
- replyMsg.setData(data);
- try {
- message.replyTo.send(replyMsg);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
-
- }
- });
- break;
- }
case MSG_CONNECTION_STATE_SUBSCRIBE: {
String key = message.getData().getString("key");
if (key == null)
diff --git a/app/src/main/java/org/bepass/oblivion/PublicIPUtils.java b/app/src/main/java/org/bepass/oblivion/PublicIPUtils.java
index eb6f69c4..682b39eb 100644
--- a/app/src/main/java/org/bepass/oblivion/PublicIPUtils.java
+++ b/app/src/main/java/org/bepass/oblivion/PublicIPUtils.java
@@ -1,24 +1,43 @@
package org.bepass.oblivion;
+import android.content.Context;
import android.os.Handler;
-import android.util.Log;
+
+import com.vdurmont.emoji.EmojiManager;
import org.json.JSONObject;
-import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
-import java.net.URL;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+
public class PublicIPUtils {
- public interface IPDetailsCallback {
- void onDetailsReceived(IPDetails details);
+ private static PublicIPUtils instance;
+ private final FileManager fm;
+ ExecutorService executorService = Executors.newFixedThreadPool(1);
+
+ public PublicIPUtils(Context context) {
+ fm = FileManager.getInstance(context);
+ }
+
+ // Public method to get the singleton instance
+ public static synchronized PublicIPUtils getInstance(Context context) {
+ if (instance == null) {
+ instance = new PublicIPUtils(context.getApplicationContext());
+ }
+ return instance;
}
public static String convertStreamToString(InputStream is) {
@@ -43,27 +62,50 @@ public static String convertStreamToString(InputStream is) {
return sb.toString();
}
- public static void getIPDetails(int port, IPDetailsCallback callback) {
+ public void getIPDetails(IPDetailsCallback callback) {
Handler handler = new Handler();
- new Thread(() -> {
- IPDetails details = new IPDetails();
- try {
- Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("127.0.0.1", port));
- URL url = new URL("https://ipwho.is/");
- HttpURLConnection connection = (HttpURLConnection) url.openConnection(proxy);
- InputStream in = new BufferedInputStream(connection.getInputStream());
- String response = convertStreamToString(in);
- JSONObject jsonData = new JSONObject(response);
- JSONObject flag = jsonData.getJSONObject("flag");
- details.ip = jsonData.getString("ip");
- details.country = jsonData.getString("country");
- details.city = jsonData.getString("city");
- details.flag = flag.getString("emoji");
- } catch (Exception e) {
- Log.i("VPN", "Failed to get details", e);
+ IPDetails details = new IPDetails();
+ executorService.execute(new Runnable() {
+ @Override
+ public void run() {
+ long startTime = System.currentTimeMillis();
+ while (System.currentTimeMillis() - startTime < 30 * 1000) { // 30 seconds
+ try {
+ int socksPort = Integer.parseInt(fm.getString("USERSETTING_port"));
+ Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("localhost", socksPort));
+ OkHttpClient client = new OkHttpClient.Builder()
+ .proxy(proxy)
+ .connectTimeout(5, TimeUnit.SECONDS) // 5 seconds connection timeout
+ .readTimeout(5, TimeUnit.SECONDS) // 5 seconds read timeout
+ .build();
+ Request request = new Request.Builder()
+ .url("https://api.country.is/")
+ .build();
+ Response response = client.newCall(request).execute();
+
+ JSONObject jsonData = new JSONObject(response.body().string());
+ details.ip = jsonData.getString("ip");
+ details.country = jsonData.getString("country");
+ details.flag = EmojiManager.getForAlias(jsonData.getString("country").toLowerCase()).getUnicode();
+ handler.post(() -> callback.onDetailsReceived(details));
+ return;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ try {
+ Thread.sleep(1000); // Sleep before retrying
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ return;
+ }
+ handler.post(() -> callback.onDetailsReceived(details));
+ }
}
- handler.post(() -> callback.onDetailsReceived(details));
- }).start();
+ });
}
+ public interface IPDetailsCallback {
+ void onDetailsReceived(IPDetails details);
+ }
}
diff --git a/app/src/main/java/org/bepass/oblivion/QuickStartService.java b/app/src/main/java/org/bepass/oblivion/QuickStartService.java
index 32e8f727..f7903887 100644
--- a/app/src/main/java/org/bepass/oblivion/QuickStartService.java
+++ b/app/src/main/java/org/bepass/oblivion/QuickStartService.java
@@ -13,7 +13,6 @@
import android.widget.Toast;
import androidx.annotation.RequiresApi;
-import androidx.core.content.ContextCompat;
@RequiresApi(api = Build.VERSION_CODES.N)
public class QuickStartService extends TileService {
@@ -62,19 +61,20 @@ public void onStopListening() {
public void onClick() {
Tile tile = getQsTile();
if (tile == null) {
- //Quick setting tile was not registered by system. Return to prevent crash
- return;
+ return; //Quick setting tile was not registered by system. Return to prevent crash
}
- if (tile.getState() == Tile.STATE_INACTIVE) {
- Intent vpnIntent = OblivionVpnService.prepare(this);
- if (vpnIntent != null) {
- Toast.makeText(this, "لطفا یکبار از درون اپلیکیشن متصل شوید", Toast.LENGTH_LONG).show();
- } else {
- OblivionVpnService.startVpnService(this);
- }
- } else {
+
+ if (tile.getState() == Tile.STATE_ACTIVE) {
OblivionVpnService.stopVpnService(this);
+ return;
}
+
+ if (OblivionVpnService.prepare(this) != null) {
+ Toast.makeText(this, "لطفا یکبار از درون اپلیکیشن متصل شوید", Toast.LENGTH_LONG).show();
+ return;
+ }
+
+ OblivionVpnService.startVpnService(this);
}
private void subscribe() {
@@ -84,8 +84,7 @@ private void subscribe() {
public void onChange(ConnectionState state) {
Tile tile = getQsTile();
if (tile == null) {
- //Quick setting tile was not registered by system. Return to prevent crash
- return;
+ return; //Quick setting tile was not registered by system. Return to prevent crash
}
switch (state) {
case DISCONNECTED:
@@ -114,5 +113,4 @@ private void unsubscribe() {
if (!isBound) return;
OblivionVpnService.unregisterConnectionStateObserver(CONNECTION_OBSERVER_KEY, serviceMessenger);
}
-
}
diff --git a/app/src/main/java/org/bepass/oblivion/SplashScreenActivity.java b/app/src/main/java/org/bepass/oblivion/SplashScreenActivity.java
index b7753759..fa0d7e75 100644
--- a/app/src/main/java/org/bepass/oblivion/SplashScreenActivity.java
+++ b/app/src/main/java/org/bepass/oblivion/SplashScreenActivity.java
@@ -8,11 +8,11 @@
public class SplashScreenActivity extends AppCompatActivity {
@Override
- protected void onCreate(Bundle savedInstanceState){
+ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
final int SPLASH_DISPLAY_LENGTH = 2750; // 2.75s
- new Handler().postDelayed(new Runnable(){
+ new Handler().postDelayed(new Runnable() {
@Override
public void run() {
// Create an Intent that will start the Main Activity.
diff --git a/app/src/main/java/org/bepass/oblivion/SplitTunnelActivity.java b/app/src/main/java/org/bepass/oblivion/SplitTunnelActivity.java
index 5d9b91c9..149a0ef1 100644
--- a/app/src/main/java/org/bepass/oblivion/SplitTunnelActivity.java
+++ b/app/src/main/java/org/bepass/oblivion/SplitTunnelActivity.java
@@ -18,6 +18,7 @@ public class SplitTunnelActivity extends ConnectionAwareBaseActivity {
private RecyclerView appsRecycler;
private CircularProgressIndicator progress;
private boolean settingsChanged = false;
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -33,8 +34,8 @@ public void handleOnBackPressed() {
if (settingsChanged) {
settingsChanged = false;
if (!lastKnownConnectionState.isDisconnected()) {
- OblivionVpnService.stopVpnService(SplitTunnelActivity.this);
- OblivionVpnService.startVpnService(SplitTunnelActivity.this);
+ OblivionVpnService.stopVpnService(SplitTunnelActivity.this);
+ OblivionVpnService.startVpnService(SplitTunnelActivity.this);
}
}
finish();
@@ -45,11 +46,14 @@ public void handleOnBackPressed() {
@Override
public void onLoad(boolean loading) {
appsRecycler.setVisibility(loading ? View.INVISIBLE : View.VISIBLE);
- if (loading) progress.show(); else progress.hide();
+ if (loading) progress.show();
+ else progress.hide();
}
});
- bypassListAppsAdapter.setOnAppSelectListener((packageName, selected) -> { settingsChanged = true; } );
+ bypassListAppsAdapter.setOnAppSelectListener((packageName, selected) -> {
+ settingsChanged = true;
+ });
SplitTunnelOptionsAdapter optionsAdapter = new SplitTunnelOptionsAdapter(this, new SplitTunnelOptionsAdapter.OnSettingsChanged() {
@Override
@@ -77,6 +81,4 @@ void onConnectionStateChange(ConnectionState state) {
String getKey() {
return "splitTunnelActivity";
}
-
-
-}
\ No newline at end of file
+}
diff --git a/app/src/main/java/org/bepass/oblivion/SplitTunnelMode.java b/app/src/main/java/org/bepass/oblivion/SplitTunnelMode.java
index f8b0029b..e4863f19 100644
--- a/app/src/main/java/org/bepass/oblivion/SplitTunnelMode.java
+++ b/app/src/main/java/org/bepass/oblivion/SplitTunnelMode.java
@@ -13,5 +13,4 @@ public static SplitTunnelMode getSplitTunnelMode(FileManager fm) {
}
return splitTunnelMode;
}
-
}
diff --git a/app/src/main/java/org/bepass/oblivion/SplitTunnelOptionsAdapter.java b/app/src/main/java/org/bepass/oblivion/SplitTunnelOptionsAdapter.java
index 85be967e..daf5ad96 100644
--- a/app/src/main/java/org/bepass/oblivion/SplitTunnelOptionsAdapter.java
+++ b/app/src/main/java/org/bepass/oblivion/SplitTunnelOptionsAdapter.java
@@ -35,8 +35,12 @@ public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
SplitTunnelMode stm = SplitTunnelMode.getSplitTunnelMode(fm);
switch (stm) {
- case DISABLED: holder.disabled.setChecked(true); break;
- case BLACKLIST: holder.blacklist.setChecked(true); break;
+ case DISABLED:
+ holder.disabled.setChecked(true);
+ break;
+ case BLACKLIST:
+ holder.blacklist.setChecked(true);
+ break;
}
holder.showSystemApps.setOnCheckedChangeListener((buttonView, isChecked) -> settingsCallback.shouldShowSystemApps(isChecked));
holder.disabled.setOnCheckedChangeListener((buttonView, isChecked) -> {
@@ -59,6 +63,12 @@ public int getItemCount() {
return 1; // Header has only one item
}
+ public interface OnSettingsChanged {
+ void splitTunnelMode(SplitTunnelMode mode);
+
+ void shouldShowSystemApps(boolean show);
+ }
+
public static class ViewHolder extends RecyclerView.ViewHolder {
SwitchMaterial showSystemApps;
RadioButton disabled;
@@ -72,9 +82,4 @@ public ViewHolder(@NonNull View itemView) {
blacklist = itemView.findViewById(R.id.blacklist);
}
}
-
- public interface OnSettingsChanged {
- void splitTunnelMode(SplitTunnelMode mode);
- void shouldShowSystemApps(boolean show);
- }
}
\ No newline at end of file
diff --git a/app/src/main/java/org/bepass/oblivion/TouchAwareSwitch.java b/app/src/main/java/org/bepass/oblivion/TouchAwareSwitch.java
index cf407d08..82370658 100644
--- a/app/src/main/java/org/bepass/oblivion/TouchAwareSwitch.java
+++ b/app/src/main/java/org/bepass/oblivion/TouchAwareSwitch.java
@@ -41,6 +41,4 @@ public void setChecked(boolean checked, boolean notify) {
if (!notify) setTag("TAG");
setChecked(checked);
}
-
-
}
diff --git a/app/src/main/res/font/emoji.ttf b/app/src/main/res/font/emoji.ttf
new file mode 100644
index 00000000..598ec743
Binary files /dev/null and b/app/src/main/res/font/emoji.ttf differ
diff --git a/app/src/main/res/layout/activity_bug.xml b/app/src/main/res/layout/activity_bug.xml
index 7b049070..2e5d3da6 100644
--- a/app/src/main/res/layout/activity_bug.xml
+++ b/app/src/main/res/layout/activity_bug.xml
@@ -57,7 +57,8 @@
android:id="@+id/logs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="Start Logging Here.." />
+ android:text="Start Logging Here.."
+ android:textSize="11sp" />
diff --git a/app/src/main/res/layout/activity_info.xml b/app/src/main/res/layout/activity_info.xml
index 65544727..ac7bdaf6 100644
--- a/app/src/main/res/layout/activity_info.xml
+++ b/app/src/main/res/layout/activity_info.xml
@@ -101,7 +101,7 @@
android:layout_marginTop="8dp"
android:fontFamily="@font/shabnam"
android:gravity="center"
- android:text="App Version: 1"
+ android:text="App Version: 2"
android:textColor="@color/black"
android:textSize="14sp" />
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index b65eff75..1364eac8 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -108,9 +108,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
- android:fontFamily="@font/shabnammedium"
+ android:fontFamily="@font/emoji"
android:visibility="invisible"
android:text="Public IP"
+ android:textStyle="bold"
android:textColor="@color/black"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 87230944..c8e8ff99 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,7 +1,6 @@
Oblivion
- - Automatic
- Austria
- Belgium
- Brazil
diff --git a/build.gradle b/build.gradle
index 383a3bd4..d4203545 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id 'com.android.application' version '8.1.2' apply false
+ id 'com.android.application' version '8.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
}
diff --git a/devshell.nix b/devshell.nix
index 8b458ae4..94ac4df2 100644
--- a/devshell.nix
+++ b/devshell.nix
@@ -37,6 +37,6 @@ devshell.mkShell {
android-sdk
gradle
jdk11
- go_1_20
+ go_1_21
];
}
diff --git a/flake.nix b/flake.nix
index c3958b7f..611b4894 100644
--- a/flake.nix
+++ b/flake.nix
@@ -47,6 +47,12 @@
# system-images-android-34-google-apis-playstore-arm64-v8a
]
++ lib.optionals (system == "x86_64-darwin" || system == "x86_64-linux") [
+ system-images-android-31-google-apis-x86-64
+ system-images-android-31-google-apis-playstore-x86-64
+ system-images-android-32-google-apis-x86-64
+ system-images-android-32-google-apis-playstore-x86-64
+ system-images-android-33-google-apis-x86-64
+ system-images-android-33-google-apis-playstore-x86-64
system-images-android-34-google-apis-x86-64
system-images-android-34-google-apis-playstore-x86-64
]);
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 6c97e3dc..fbeeace0 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Wed Feb 07 16:52:07 IRST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists