Skip to content

Commit 2126259

Browse files
committed
v2.4.1: Revert NoizDNS Chrome changes, fix tunnel stability
NoizDNS: - Revert Chrome page-load burst cover traffic to simple 1-query-per-5-15s - Revert tunnel query EDNS0 from 1452 to 4096 and remove AD=1 flag - Remove EDNS0 query padding and stealth MTU override - Force-deadline KCP conn in Stop() for fast port release Android: - Add 5s grace period to ignore spurious network changes after connection - Remove stealth mode query size override from UI - Update Snowflake to v2.12.1 CLI: - Remove --query-padding flag Submodules: - noizdns: reverted to stable pre-Chrome state - dnstt-mobile: fast KCP shutdown - dnstt: suppress closed-conn errors during shutdown
1 parent 40c9aa1 commit 2126259

26 files changed

Lines changed: 265 additions & 274 deletions

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ plugins {
1414
}
1515

1616
val minSdkVersion = 24
17-
val appVersionName = "2.4"
18-
val appVersionCode = 47
17+
val appVersionName = "2.4.1"
18+
val appVersionCode = 50
1919
val cargoProfile = (findProperty("CARGO_PROFILE") as String?) ?: run {
2020
val isRelease = gradle.startParameter.taskNames.any { it.contains("Release", ignoreCase = true) }
2121
if (isRelease) "release" else "debug"

app/libs/dnstt.aar

121 Bytes
Binary file not shown.

app/libs/golibs-full-sources.jar

-94 Bytes
Binary file not shown.

app/libs/golibs-full.aar

922 KB
Binary file not shown.

app/libs/golibs-lite-sources.jar

-94 Bytes
Binary file not shown.

app/libs/golibs-lite.aar

-2.88 KB
Binary file not shown.

app/src/main/java/app/slipnet/data/local/database/ProfileDao.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import kotlinx.coroutines.flow.Flow
99

1010
@Dao
1111
interface ProfileDao {
12-
@Query("SELECT * FROM server_profiles ORDER BY sort_order ASC")
12+
@Query("SELECT * FROM server_profiles ORDER BY is_pinned DESC, sort_order ASC")
1313
fun getAllProfiles(): Flow<List<ProfileEntity>>
1414

1515
@Query("SELECT * FROM server_profiles WHERE is_active = 1 LIMIT 1")
@@ -50,4 +50,7 @@ interface ProfileDao {
5050

5151
@Query("UPDATE server_profiles SET sort_order = :sortOrder WHERE id = :id")
5252
suspend fun updateSortOrder(id: Long, sortOrder: Int)
53+
54+
@Query("UPDATE server_profiles SET is_pinned = NOT is_pinned WHERE id = :id")
55+
suspend fun togglePinned(id: Long)
5356
}

app/src/main/java/app/slipnet/data/local/database/ProfileEntity.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,8 @@ data class ProfileEntity(
142142
val defaultResolversJson: String = "[]",
143143

144144
@ColumnInfo(name = "socks5_server_port", defaultValue = "1080")
145-
val socks5ServerPort: Int = 1080
145+
val socks5ServerPort: Int = 1080,
146+
147+
@ColumnInfo(name = "is_pinned", defaultValue = "0")
148+
val isPinned: Boolean = false
146149
)

app/src/main/java/app/slipnet/data/local/database/SlipNetDatabase.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import androidx.sqlite.db.SupportSQLiteDatabase
77

88
@Database(
99
entities = [ProfileEntity::class, ChainEntity::class],
10-
version = 25,
10+
version = 26,
1111
exportSchema = true
1212
)
1313
abstract class SlipNetDatabase : RoomDatabase() {
@@ -329,5 +329,11 @@ abstract class SlipNetDatabase : RoomDatabase() {
329329
}
330330
}
331331

332+
val MIGRATION_25_26 = object : Migration(25, 26) {
333+
override fun migrate(db: SupportSQLiteDatabase) {
334+
db.execSQL("ALTER TABLE server_profiles ADD COLUMN is_pinned INTEGER NOT NULL DEFAULT 0")
335+
}
336+
}
337+
332338
}
333339
}

app/src/main/java/app/slipnet/data/mapper/ProfileMapper.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ class ProfileMapper @Inject constructor(
7272
dnsPayloadSize = entity.dnsPayloadSize,
7373
resolversHidden = entity.resolversHidden,
7474
defaultResolvers = defaultResolvers,
75-
socks5ServerPort = entity.socks5ServerPort
75+
socks5ServerPort = entity.socks5ServerPort,
76+
isPinned = entity.isPinned
7677
)
7778
}
7879

@@ -125,7 +126,8 @@ class ProfileMapper @Inject constructor(
125126
dnsPayloadSize = profile.dnsPayloadSize,
126127
resolversHidden = profile.resolversHidden,
127128
defaultResolversJson = defaultResolversJson,
128-
socks5ServerPort = profile.socks5ServerPort
129+
socks5ServerPort = profile.socks5ServerPort,
130+
isPinned = profile.isPinned
129131
)
130132
}
131133

0 commit comments

Comments
 (0)