From 28b72376a76de3ed597e61c68abf6d36e4d0e6e6 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Sun, 2 Feb 2020 22:34:58 +0400 Subject: [PATCH] Make starting VPN service and running Yggdrasil (traffic hooks into Yggdrasil dummy interface) --- app/src/main/AndroidManifest.xml | 8 +- .../chronosx88/yggdrasil/MainActivity.kt | 29 +++++- .../io/github/chronosx88/yggdrasil/Utils.kt | 65 ------------- .../chronosx88/yggdrasil/YggdrasilService.kt | 44 --------- .../yggdrasil/YggdrasilTunService.kt | 96 +++++++++++++++---- .../yggdrasil/models/config/Config.kt | 1 + 6 files changed, 105 insertions(+), 138 deletions(-) delete mode 100644 app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilService.kt diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1686b7b..4e5b87b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,7 +2,8 @@ - + + - - diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt index edae20f..49e3421 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt @@ -1,11 +1,13 @@ package io.github.chronosx88.yggdrasil +import android.app.Activity import android.content.Intent import android.net.VpnService import android.os.Bundle import android.widget.Button import androidx.appcompat.app.AppCompatActivity + class MainActivity : AppCompatActivity() { private var isYggStarted = false @@ -16,12 +18,18 @@ class MainActivity : AppCompatActivity() { val connectButton = findViewById