1. Seted up extras using Yggdrasil develop branch

2. Fixed https://github.com/yggdrasil-network/yggdrasil-extras/issues/15
3. Used Neils peers list by default
This commit is contained in:
vadym 2021-10-14 17:23:44 +03:00
parent 53e77558e0
commit ae31223428
5 changed files with 21 additions and 14 deletions

View File

@ -2,14 +2,14 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 29
compileSdkVersion 31
defaultConfig {
applicationId "io.github.chronosx88.yggdrasil"
minSdkVersion 15
targetSdkVersion 29
targetSdkVersion 31
versionCode 35
versionName "2.0.17"
versionCode 36
versionName "2.0.18"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
setProperty("archivesBaseName", project.getParent().name+"-"+versionName)
}
@ -70,12 +70,12 @@ dependencies {
implementation project(path: ':yggdrasil')
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8'
implementation 'com.google.android.material:material:1.5.0-alpha02'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'
implementation 'com.google.android.material:material:1.5.0-alpha04'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.hbb20:ccp:2.4.0'
implementation 'com.vincentbrison.openlibraries.android:dualcache:3.1.1'

View File

@ -52,9 +52,10 @@
</service>
<activity android:name="org.yggdrasil.app.crispa.MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"
android:screenOrientation="portrait">
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

View File

@ -43,7 +43,7 @@ class PeerListActivity : AppCompatActivity() {
companion object {
const val PEER_LIST = "PEER_LIST"
const val PEER_LIST_URL = "http://y4.rivchain.org/rest/peers.json"
const val PEER_LIST_URL = "https://publicpeers.neilalexander.dev/publicnodes.json"
const val CACHE_NAME = "PEER_LIST_CACHE"
const val ONLINE_PEERINFO_LIST = "online_peer_info_list"
const val OFFLINE_PEERINFO_LIST = "offline_peer_info_list"

View File

@ -164,6 +164,7 @@ class YggdrasilTunService : VpnService() {
config["Listen"] = arrayListOf<String>()
config["AdminListen"] = "tcp://localhost:9001"
config["IfName"] = "tun0"
config["IfMTU"] = 65535
if(staticIP) {
val preferences =
PreferenceManager.getDefaultSharedPreferences(this.baseContext)
@ -182,12 +183,17 @@ class YggdrasilTunService : VpnService() {
config["PublicKey"] = publicKey
}
}
var multicastInterface = emptyMap<String, Any>().toMutableMap()
multicastInterface["Regex"] = ".*"
multicastInterface["Beacon"] = true
multicastInterface["Listen"] = true
multicastInterface["Port"] = 0
(config["MulticastInterfaces"] as MutableList<Any>)[0] = multicastInterface
//(config["SessionFirewall"] as MutableMap<Any, Any>)["AllowFromDirect"] = true
//(config["SessionFirewall"] as MutableMap<Any, Any>)["AllowFromRemote"] = true
//(config["SessionFirewall"] as MutableMap<Any, Any>)["AlwaysAllowOutbound"] = true
//(config["SessionFirewall"] as MutableMap<Any, Any>)["WhitelistEncryptionPublicKeys"] = whiteList
//(config["SessionFirewall"] as MutableMap<Any, Any>)["BlacklistEncryptionPublicKeys"] = blackList
//(config["SwitchOptions"] as MutableMap<Any, Any>)["MaxTotalQueueSize"] = 4194304
if (config["AutoStart"] == null) {
val tmpMap = emptyMap<String, Boolean>().toMutableMap()

View File

@ -1,12 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.10"
ext.kotlin_version = "1.5.31"
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.0.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong