diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6121b789..2813c925 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,10 @@ on: tags: - "v*.*.*" +# Maintainers may opt the official APK into EasyTier without changing normal builds. +env: + ORG_GRADLE_PROJECT_easyTier: ${{ vars.CODEG_EASYTIER == 'true' && 'true' || 'false' }} + permissions: contents: write @@ -15,7 +19,7 @@ concurrency: jobs: android: runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: ${{ vars.CODEG_EASYTIER == 'true' && 120 || 30 }} steps: - name: Check out source uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 @@ -34,6 +38,19 @@ jobs: - name: Set up Gradle uses: gradle/actions/setup-gradle@0b6dd653ba04f4f93bf581ec31e66cbd7dcb644d # v4 + - name: Build optional EasyTier transport and notices + if: vars.CODEG_EASYTIER == 'true' + shell: bash + run: | + rustup toolchain install 1.95.0 --profile minimal + rustup default 1.95.0 + rustup target add aarch64-linux-android x86_64-linux-android armv7-linux-androideabi i686-linux-android + sudo apt-get update + sudo apt-get install -y protobuf-compiler + sdkmanager "ndk;27.2.12479018" + export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/27.2.12479018" + python3 scripts/build-easytier.py --abi arm64-v8a --abi x86_64 --abi armeabi-v7a --abi x86 + - name: Validate release tag shell: bash run: | @@ -114,6 +131,13 @@ jobs: sha256sum "$(basename "$release_apk")" > "$(basename "$checksum")" ) printf 'apk=%s\nchecksum=%s\n' "$release_apk" "$checksum" >> "$GITHUB_OUTPUT" + if [[ "$ORG_GRADLE_PROJECT_easyTier" == true ]]; then + native_source="$release_dir/easytier-corresponding-source.tar.gz" + native_notices="$release_dir/easytier-dependency-notices.tar.gz" + tar --exclude=.git -czf "$native_source" -C build/easytier/source . + tar -czf "$native_notices" -C build/easytier licenses build-info.json + printf 'native_source=%s\nnative_notices=%s\n' "$native_source" "$native_notices" >> "$GITHUB_OUTPUT" + fi - name: Remove signing material if: always() @@ -126,6 +150,8 @@ jobs: path: | ${{ steps.package.outputs.apk }} ${{ steps.package.outputs.checksum }} + ${{ steps.package.outputs.native_source }} + ${{ steps.package.outputs.native_notices }} if-no-files-found: error retention-days: 30 @@ -153,8 +179,15 @@ jobs: GH_TOKEN: ${{ github.token }} APK_PATH: ${{ steps.package.outputs.apk }} CHECKSUM_PATH: ${{ steps.package.outputs.checksum }} + NATIVE_SOURCE: ${{ steps.package.outputs.native_source }} + NATIVE_NOTICES: ${{ steps.package.outputs.native_notices }} run: | + native_assets=() + if [[ -n "$NATIVE_SOURCE" ]]; then + native_assets+=("$NATIVE_SOURCE#EasyTier corresponding source" "$NATIVE_NOTICES#EasyTier dependency notices") + fi gh release upload "$GITHUB_REF_NAME" \ + "${native_assets[@]}" \ "$APK_PATH#Android APK" \ "$CHECKSUM_PATH#SHA-256 checksum" \ --repo "$GITHUB_REPOSITORY" \ diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 2cfadfa0..c43eda59 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -25,5 +25,8 @@ jobs: - name: Set up Gradle uses: gradle/actions/setup-gradle@0b6dd653ba04f4f93bf581ec31e66cbd7dcb644d # v4 + - name: Verify pinned native license sources + run: python3 -m unittest discover -s scripts -p 'test_*.py' + - name: Check, test, and assemble the app run: ./gradlew :app:check :app:assembleDebug :app:assembleRelease --no-daemon diff --git a/.gitignore b/.gitignore index fb99b3d4..dba1fd7f 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,7 @@ service-account*.json # Release signing — local only, never commit /codeg-release.jks /keystore.properties + +# Local Python verification helpers +__pycache__/ +*.pyc diff --git a/README.md b/README.md index 14157278..3bc8441c 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,16 @@ release APK. 2. Open the Android app and add a server profile. 3. Enter the server URL and token, test the connection, and save the profile. +The selected server is restored automatically the next time the app starts. +An optional EasyTier-enabled build also supports a userspace mesh connection per +profile: enter your network name, password, peer URLs, and the Codeg server's mesh +HTTP address. The password is encrypted separately from the profile. A connection +screen offers retry and server selection if the mesh cannot reach Codeg. + +The standard build stays a direct client; it does not display an unavailable mesh +option. See [the optional native build instructions](docs/easytier-native-build.md) +for `-PeasyTier=true`, supported ABIs, source pinning, and dependency notices. + For a server on the same local network, a URL might look like `http://192.168.1.10:3080`. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 63d72ff6..5f547fb2 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -2,6 +2,8 @@ import com.github.jk1.license.render.InventoryMarkdownReportRenderer import com.github.jk1.license.render.JsonReportRenderer import com.github.jk1.license.render.ReportRenderer import java.util.Properties +import java.security.MessageDigest +import groovy.json.JsonSlurper import org.gradle.api.tasks.Delete import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.Sync @@ -28,6 +30,8 @@ val checkedInThirdPartyLicensesDir = rootProject.layout.projectDirectory.dir("th val generatedThirdPartyLicensesDir = layout.buildDirectory.dir("reports/dependency-license") val supplementalLicensesDir = rootProject.layout.projectDirectory.dir("config/licenses") +val easyTierEnabled = providers.gradleProperty("easyTier").map(String::toBoolean).getOrElse(false) + android { namespace = "app.codeg.android" compileSdk = 36 @@ -38,6 +42,13 @@ android { targetSdk = 36 versionCode = 2 versionName = "1.0.1" + buildConfigField("boolean", "EASYTIER_ENABLED", easyTierEnabled.toString()) + if (easyTierEnabled) { + // Other AndroidX dependencies ship native libraries too. Restrict the whole APK + // to the ABIs that also have EasyTier, so Android cannot select a partial ABI. + ndk.abiFilters += rootProject.file("build/easytier/jniLibs") + .listFiles().orEmpty().filter(File::isDirectory).map(File::getName) + } testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -92,6 +103,11 @@ android { sourceSets { getByName("main").assets.srcDir(checkedInThirdPartyLicensesDir) + if (easyTierEnabled) { + getByName("main").jniLibs.srcDir(rootProject.file("build/easytier/jniLibs")) + getByName("main").assets.srcDir(rootProject.file("config/easytier")) + getByName("main").assets.srcDir(rootProject.file("build/easytier/licenses")) + } } packaging { @@ -288,3 +304,42 @@ dependencies { androidTestImplementation(libs.androidx.test.ext.junit) androidTestImplementation(libs.androidx.espresso.core) } + +// Native artifacts are built from the pinned public source by the explicit script. +// Never silently ship an enabled picker without its transport implementation. +if (easyTierEnabled) { + tasks.named("preBuild") { + doFirst { + val libraries = rootProject.file("build/easytier/jniLibs") + .walkTopDown().filter { it.name == "libeasytier_android_jni.so" }.toList() + check(libraries.isNotEmpty()) { + "EasyTier is enabled but its JNI library is missing. Run scripts/build-easytier.py first." + } + val metadata = JsonSlurper().parse(rootProject.file("build/easytier/build-info.json")) as Map<*, *> + val records = metadata["libraries"] as List<*> + val hashes = records.associate { item -> + val record = item as Map<*, *> + record["abi"] as String to record["sha256"] as String + } + check(libraries.map { it.parentFile.name }.toSet() == hashes.keys) { + "EasyTier ABI outputs do not match this build's manifest. Rebuild the complete requested ABI set." + } + libraries.forEach { library -> + val digest = MessageDigest.getInstance("SHA-256").digest(library.readBytes()) + .joinToString("") { "%02x".format(it) } + check(digest == hashes[library.parentFile.name]) { "EasyTier library differs from its build manifest." } + } + val notices = JsonSlurper().parse(rootProject.file("build/easytier/licenses/EASYTIER_DEPENDENCIES.json")) as Map<*, *> + val targets = mapOf("arm64-v8a" to "aarch64-linux-android", "x86_64" to "x86_64-linux-android", + "armeabi-v7a" to "armv7-linux-androideabi", "x86" to "i686-linux-android") + check((notices["targets"] as List<*>).toSet() == hashes.keys.map { targets.getValue(it) }.toSet() && + (notices["packages"] as List<*>).isNotEmpty() && (notices["missing_notice_packages"] as List<*>).isEmpty() && + (notices["pointer_notice_files"] as List<*>).isEmpty()) { + "EasyTier dependency notices are incomplete or belong to another ABI set." + } + check(rootProject.file("build/easytier/licenses/THIRD_PARTY_NOTICES.txt").isFile) { + "EasyTier dependency notices are missing. Run scripts/easytier-license-report.py first." + } + } + } +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 5d901da5..2fe02b0c 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,3 +18,6 @@ -dontwarn org.slf4j.** -dontwarn io.ktor.** -keep class io.ktor.** { *; } + +# EasyTier exports JNI symbols using this exact class and native method names. +-keep class com.easytier.jni.EasyTierJNI { native ; } diff --git a/app/src/androidTest/java/app/codeg/android/mesh/MeshAppIntegrationTest.kt b/app/src/androidTest/java/app/codeg/android/mesh/MeshAppIntegrationTest.kt new file mode 100644 index 00000000..70e4c0aa --- /dev/null +++ b/app/src/androidTest/java/app/codeg/android/mesh/MeshAppIntegrationTest.kt @@ -0,0 +1,74 @@ +package app.codeg.android.mesh + +import android.content.Intent +import android.os.Bundle +import android.view.accessibility.AccessibilityNodeInfo +import androidx.lifecycle.ViewModelProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import app.codeg.android.BuildConfig +import app.codeg.android.MainActivity +import app.codeg.android.app.AppViewModel +import app.codeg.android.app.ConnectionState +import app.codeg.android.core.datastore.MeshSettings +import app.codeg.android.core.datastore.ServerProfile +import app.codeg.android.core.network.StreamFrame +import dagger.hilt.android.EntryPointAccessors +import kotlinx.coroutines.flow.filterIsInstance +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.withTimeout +import org.junit.Assert.* +import org.junit.Assume.assumeTrue +import org.junit.Test +import org.junit.runner.RunWith + +/** Opt-in test against a synthetic peer; never run against a user's live server. */ +@RunWith(AndroidJUnit4::class) +class MeshAppIntegrationTest { + @Test fun selectedMeshReachesTheMainShellAndProductionHttpAndWebSocketClients() = runBlocking { + val arguments = InstrumentationRegistry.getArguments() + assumeTrue(BuildConfig.EASYTIER_ENABLED && arguments.containsKey("meshPeer")) + val instrumentation = InstrumentationRegistry.getInstrumentation() + val context = instrumentation.targetContext + val repository = EntryPointAccessors.fromApplication(context, MeshTestServices::class.java).serverRepository() + val profile = ServerProfile("instrumented-mesh", "Instrumented mesh", arguments.getString("meshServer")!!, + MeshSettings(arguments.getString("meshNetwork")!!, listOf(arguments.getString("meshPeer")!!))) + repository.save(profile, "codeg-fixture-token", "codeg-fixture-network-password") + repository.select(profile.id) + val activity = instrumentation.startActivitySync(Intent(context, MainActivity::class.java) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)) as MainActivity + lateinit var model: AppViewModel + instrumentation.runOnMainSync { model = ViewModelProvider(activity)[AppViewModel::class.java] } + val ready = withTimeout(60_000) { + model.connection.filterIsInstance().first { it.profile?.id == profile.id } + } + val selected = requireNotNull(ready.profile) + assertEquals("Instrumented mesh", selected.name) + val client = requireNotNull(repository.client(selected)) + assertTrue(client.baseUrl.startsWith("http://127.0.0.1:")) + assertEquals("codeg-mesh-fixture", client.health().version) + assertEquals("fixture-project", client.listFolders().single().name) + instrumentation.sendStatus(0, Bundle().apply { putString("stream", "mesh HTTP and profile restoration passed\n") }) + val stream = requireNotNull(repository.eventStream(selected)) + stream.ping() + assertEquals(StreamFrame.Pong, withTimeout(10_000) { stream.frames().first { it == StreamFrame.Pong } }) + instrumentation.sendStatus(0, Bundle().apply { putString("stream", "mesh WebSocket pong passed\n") }) + // The real root gate has transitioned to MainShell; check a rendered tab via accessibility. + withTimeout(10_000) { + while (true) { + val root = instrumentation.uiAutomation.rootInActiveWindow + if (root != null && hasChatsTab(root)) break + kotlinx.coroutines.delay(100) + } + } + // Leave only this synthetic profile for a separate force-stop/cold-start acceptance check. + } + + private fun hasChatsTab(node: AccessibilityNodeInfo): Boolean { + // Compose exposes virtual children, but its provider need not implement + // findAccessibilityNodeInfosByText. Walk the same tree UIAutomator reads. + if (node.text?.toString() in setOf("Chats", "会话")) return true + return (0 until node.childCount).any { index -> node.getChild(index)?.let(::hasChatsTab) == true } + } +} diff --git a/app/src/debug/java/app/codeg/android/mesh/MeshTestServices.kt b/app/src/debug/java/app/codeg/android/mesh/MeshTestServices.kt new file mode 100644 index 00000000..b34f8067 --- /dev/null +++ b/app/src/debug/java/app/codeg/android/mesh/MeshTestServices.kt @@ -0,0 +1,13 @@ +package app.codeg.android.mesh + +import app.codeg.android.core.data.ServerRepository +import dagger.hilt.EntryPoint +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent + +/** Debug-only access to the production graph for the opt-in local mesh fixture test. */ +@EntryPoint +@InstallIn(SingletonComponent::class) +interface MeshTestServices { + fun serverRepository(): ServerRepository +} diff --git a/app/src/main/java/app/codeg/android/app/AppViewModel.kt b/app/src/main/java/app/codeg/android/app/AppViewModel.kt index 0219c418..b5cc2e6b 100644 --- a/app/src/main/java/app/codeg/android/app/AppViewModel.kt +++ b/app/src/main/java/app/codeg/android/app/AppViewModel.kt @@ -8,6 +8,12 @@ import app.codeg.android.core.datastore.AppSettingsStore import app.codeg.android.core.datastore.ServerProfile import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.collectLatest +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.CancellationException +import kotlinx.coroutines.TimeoutCancellationException import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch @@ -33,11 +39,51 @@ class AppViewModel @Inject constructor( val selectedProfile: StateFlow = serverRepository.selectedProfile .stateIn(viewModelScope, SharingStarted.Eagerly, null) + val connection = MutableStateFlow(ConnectionState.Loading) + private val retry = MutableStateFlow(0) + val managingServers = MutableStateFlow(false) + + init { + viewModelScope.launch { + combine(serverRepository.selectedProfile, retry, managingServers) { profile, _, managing -> profile to managing } + .collectLatest { (profile, managing) -> + if (managing) { + runCatching { serverRepository.disconnect() } + connection.value = ConnectionState.Loading + return@collectLatest + } + connection.value = ConnectionState.Connecting(profile) + try { + serverRepository.prepare(profile) + connection.value = ConnectionState.Ready(profile) + } catch (error: TimeoutCancellationException) { + runCatching { serverRepository.disconnect() } + connection.value = ConnectionState.Failed(profile) + } catch (error: CancellationException) { + runCatching { serverRepository.disconnect() } + throw error + } catch (_: Exception) { + runCatching { serverRepository.disconnect() } + connection.value = ConnectionState.Failed(profile) + } + } + } + } + + fun retryConnection() { retry.update { it + 1 } } + fun selectServer(id: String) { - viewModelScope.launch { serverRepository.select(id) } + viewModelScope.launch { serverRepository.select(id); managingServers.value = false } } fun deleteServer(id: String) { viewModelScope.launch { serverRepository.delete(id) } } } + +sealed interface ConnectionState { + data object Loading : ConnectionState + data class Connecting(val profile: ServerProfile?) : ConnectionState + data class Ready(val profile: ServerProfile?) : ConnectionState + data class Failed(val profile: ServerProfile?) : ConnectionState +} diff --git a/app/src/main/java/app/codeg/android/app/CodegApp.kt b/app/src/main/java/app/codeg/android/app/CodegApp.kt index ee88eb61..1b4b4b18 100644 --- a/app/src/main/java/app/codeg/android/app/CodegApp.kt +++ b/app/src/main/java/app/codeg/android/app/CodegApp.kt @@ -1,6 +1,19 @@ package app.codeg.android.app import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.key +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import androidx.navigation.NavType +import androidx.navigation.navArgument +import app.codeg.android.R +import app.codeg.android.core.datastore.ServerProfile +import app.codeg.android.feature.server.ServerListScreen import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.CircularProgressIndicator import androidx.compose.runtime.Composable @@ -33,9 +46,16 @@ fun CodegApp(appViewModel: AppViewModel = hiltViewModel()) { CodegTheme(themeMode = settings.themeMode, accentId = settings.accentId) { CodegBackground { val servers by appViewModel.servers.collectAsStateWithLifecycle() - when (val list = servers) { - null -> Splash() - else -> if (list.isEmpty()) OnboardingRoot() else MainShell(appViewModel, list) + val connection by appViewModel.connection.collectAsStateWithLifecycle() + val managing by appViewModel.managingServers.collectAsStateWithLifecycle() + when { + servers == null -> Splash() + servers!!.isEmpty() -> OnboardingRoot() + managing -> ServerManagement(appViewModel, servers!!) + connection is ConnectionState.Ready -> key((connection as ConnectionState.Ready).profile) { + MainShell(appViewModel, servers!!) + } + else -> ConnectionGate(connection, appViewModel) } } } @@ -61,3 +81,42 @@ private fun Splash() { CircularProgressIndicator(color = CodegTheme.colors.accent) } } + +/** A failed or slow mesh connection never traps the user away from server management. */ +@Composable +private fun ConnectionGate(state: ConnectionState, model: AppViewModel) { + val failed = state is ConnectionState.Failed + val profile = when (state) { + is ConnectionState.Connecting -> state.profile + is ConnectionState.Failed -> state.profile + else -> null + } + Box(Modifier.fillMaxSize().padding(24.dp), contentAlignment = Alignment.Center) { + Column(horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(16.dp)) { + if (!failed) CircularProgressIndicator() + Text(stringResource(if (failed) R.string.mesh_connect_failed else R.string.mesh_connecting, profile?.name.orEmpty())) + if (failed) TextButton(onClick = model::retryConnection) { Text(stringResource(R.string.mesh_retry)) } + TextButton(onClick = { model.managingServers.value = true }) { Text(stringResource(R.string.mesh_choose_server)) } + } + } +} + +@Composable +private fun ServerManagement(model: AppViewModel, servers: List) { + val nav = rememberNavController() + val selected by model.selectedProfile.collectAsStateWithLifecycle() + NavHost(navController = nav, startDestination = "servers") { + composable("servers") { + ServerListScreen( + servers = servers, selectedId = selected?.id, + onSelect = model::selectServer, onDelete = model::deleteServer, + onAdd = { nav.navigate("editor") }, + onEdit = { nav.navigate("editor?serverId=$it") }, + onBack = { model.managingServers.value = false }, + ) + } + composable("editor?serverId={serverId}", arguments = listOf(navArgument("serverId") { + type = NavType.StringType; nullable = true; defaultValue = null + })) { ServerEditorScreen(onDone = { nav.popBackStack() }) } + } +} diff --git a/app/src/main/java/app/codeg/android/core/data/ServerRepository.kt b/app/src/main/java/app/codeg/android/core/data/ServerRepository.kt index d6140663..d8b51161 100644 --- a/app/src/main/java/app/codeg/android/core/data/ServerRepository.kt +++ b/app/src/main/java/app/codeg/android/core/data/ServerRepository.kt @@ -4,6 +4,13 @@ import app.codeg.android.core.common.DispatcherProvider import app.codeg.android.core.datastore.ServerProfile import app.codeg.android.core.datastore.ServerStore import app.codeg.android.core.network.CodegClient +import app.codeg.android.core.mesh.MeshTransport +import app.codeg.android.core.mesh.MeshConfig +import app.codeg.android.core.model.HealthResponse +import app.codeg.android.core.network.ApiError +import kotlinx.coroutines.CancellationException +import kotlinx.coroutines.delay +import kotlinx.coroutines.withTimeout import app.codeg.android.core.network.CodegClientFactory import app.codeg.android.core.network.EventStream import app.codeg.android.core.security.SecretStore @@ -12,7 +19,9 @@ import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.asSharedFlow import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.withContext +import java.util.UUID import javax.inject.Inject import javax.inject.Singleton @@ -28,6 +37,7 @@ class ServerRepository @Inject constructor( private val secretStore: SecretStore, private val factory: CodegClientFactory, private val dispatchers: DispatcherProvider, + private val meshTransport: MeshTransport = MeshTransport(), ) { val profiles: Flow> = serverStore.profiles val selectedId: Flow = serverStore.selectedId @@ -48,21 +58,27 @@ class ServerRepository @Inject constructor( fun notifyFoldersChanged() { _foldersChanged.tryEmit(Unit) } val selectedProfile: Flow = - combine(profiles, selectedId) { list, id -> list.firstOrNull { it.id == id } } + combine(profiles, selectedId) { list, id -> list.firstOrNull { it.id == id } }.distinctUntilChanged() /** The token for a profile, read off the IO dispatcher (Keystore decrypt). */ suspend fun token(id: String): String? = withContext(dispatchers.io) { secretStore.get(id) } /** Save (insert/replace) a profile and its token. */ - suspend fun save(profile: ServerProfile, token: String) { - withContext(dispatchers.io) { secretStore.put(profile.id, token) } - serverStore.upsert(profile) + suspend fun save(profile: ServerProfile, token: String, meshPassword: String = "") { + if (profile.mesh != null) MeshConfig.validate(profile, meshPassword) + withContext(dispatchers.io) { + secretStore.put(profile.id, token) + if (profile.mesh == null) secretStore.remove(meshSecretKey(profile.id)) + else secretStore.put(meshSecretKey(profile.id), meshPassword) + } + // Token/password-only edits must invalidate cached clients and restart the selected transport. + serverStore.upsert(profile.copy(connectionRevision = UUID.randomUUID().toString())) } suspend fun delete(id: String) { serverStore.delete(id) - withContext(dispatchers.io) { secretStore.remove(id) } + withContext(dispatchers.io) { secretStore.remove(id); secretStore.remove(meshSecretKey(id)) } } suspend fun select(id: String?) = serverStore.select(id) @@ -70,16 +86,60 @@ class ServerRepository @Inject constructor( /** An API client for a saved profile, or null if its token is missing. */ suspend fun client(profile: ServerProfile): CodegClient? { val token = token(profile.id) ?: return null - return factory.client(profile.baseUrl, token) + return meshTransport.address(profile)?.let { factory.client(it, token) } } /** An event stream for a saved profile, or null if its token is missing. */ suspend fun eventStream(profile: ServerProfile): EventStream? { val token = token(profile.id) ?: return null - return factory.eventStream(profile.baseUrl, token) + return meshTransport.address(profile)?.let { factory.eventStream(it, token) } } + suspend fun meshPassword(id: String): String = + withContext(dispatchers.io) { secretStore.get(meshSecretKey(id)).orEmpty() } + + suspend fun prepare(profile: ServerProfile?) { + if (profile == null) { meshTransport.disconnect(); return } + val address = meshTransport.prepare(profile, if (profile.mesh != null) meshPassword(profile.id) else "") + if (profile.mesh != null) { + val savedToken = token(profile.id) ?: error("The saved server token is missing. Edit this server to sign in again.") + awaitHealth(factory.client(address, savedToken)) + } + } + + suspend fun disconnect() = meshTransport.disconnect() + + suspend fun testConnection(profile: ServerProfile, token: String, meshPassword: String): HealthResponse = + meshTransport.test(profile, meshPassword) { address -> + val client = factory.client(address, token) + if (profile.mesh == null) client.health() else awaitHealth(client) + } + + private suspend fun awaitHealth(client: CodegClient): HealthResponse = withTimeout(45_000) { + while (true) { + try { + val health = client.health() + requireHealthy(health) + return@withTimeout health + } + catch (error: CancellationException) { throw error } + catch (error: ApiError) { + // Authentication/protocol errors are final; only network establishment retries. + if (error !is ApiError.Transport) throw error + } + delay(500) + } + @Suppress("UNREACHABLE_CODE") + error("unreachable") + } + + private fun meshSecretKey(id: String) = "mesh-password:$id" + /** A transient client for an unsaved server (e.g. "Test Connection"). */ fun transientClient(baseUrl: String, token: String): CodegClient = factory.client(baseUrl, token) } + +internal fun requireHealthy(health: HealthResponse) { + check(health.status == "ok" && health.version.isNotBlank()) { "The server did not return a healthy Codeg response." } +} diff --git a/app/src/main/java/app/codeg/android/core/datastore/ServerProfile.kt b/app/src/main/java/app/codeg/android/core/datastore/ServerProfile.kt index e7302734..73b618b5 100644 --- a/app/src/main/java/app/codeg/android/core/datastore/ServerProfile.kt +++ b/app/src/main/java/app/codeg/android/core/datastore/ServerProfile.kt @@ -12,4 +12,14 @@ data class ServerProfile( val id: String, val name: String, val baseUrl: String, + val mesh: MeshSettings? = null, + val connectionRevision: String = "", +) + +/** Public connection settings only; the mesh password lives in SecretStore. */ +@Serializable +data class MeshSettings( + val networkName: String, + val peers: List, + val ipv4: String = "", ) diff --git a/app/src/main/java/app/codeg/android/core/mesh/MeshConfig.kt b/app/src/main/java/app/codeg/android/core/mesh/MeshConfig.kt new file mode 100644 index 00000000..4937faf9 --- /dev/null +++ b/app/src/main/java/app/codeg/android/core/mesh/MeshConfig.kt @@ -0,0 +1,71 @@ +package app.codeg.android.core.mesh + +import app.codeg.android.core.datastore.ServerProfile +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json +import java.net.URI + +/** Restricted input -> TOML. Never log this output: it contains a network password. */ +object MeshConfig { + fun validate(profile: ServerProfile, password: String) { + val settings = requireNotNull(profile.mesh) + require(settings.networkName.isNotBlank() && settings.networkName.length <= 256) { + "Enter an EasyTier network name." + } + require(password.isNotBlank() && password.length <= 4096) { "Enter the EasyTier network password." } + val destination = URI(profile.baseUrl) + require(destination.scheme == "http" && ipv4(destination.host.orEmpty()) && + destination.userInfo == null && destination.query == null && destination.fragment == null && + destination.path.orEmpty() in setOf("", "/") && destination.port in 1..65535) { + "EasyTier needs an HTTP server URL with a mesh IPv4 address and port." + } + require(settings.ipv4.isEmpty() || ipv4(settings.ipv4)) { "Enter a valid virtual IPv4 address, or leave it empty for DHCP." } + require(settings.peers.size in 1..32) { "Enter between 1 and 32 EasyTier peers." } + settings.peers.forEach { peer -> + val uri = runCatching { URI(peer) }.getOrNull() + require(uri != null && uri.scheme in setOf("tcp", "udp") && !uri.host.isNullOrEmpty() && + uri.port in 1..65535 && uri.userInfo == null && uri.query == null && uri.fragment == null && + uri.path.orEmpty() in setOf("", "/") && peer.none(Char::isWhitespace)) { + "Peers must be tcp://host:port or udp://host:port, one per line." + } + } + } + + fun render(profile: ServerProfile, password: String, instance: String, port: Int): String { + validate(profile, password) + require(port in 1..65535) + val settings = requireNotNull(profile.mesh) + val destination = URI(profile.baseUrl) + fun quote(value: String) = Json.encodeToString(value) + return buildString { + appendLine("instance_name = ${quote(instance)}") + appendLine("hostname = \"codeg-android\"") + appendLine("dhcp = ${settings.ipv4.isEmpty()}") + if (settings.ipv4.isNotEmpty()) appendLine("ipv4 = ${quote(settings.ipv4)}") + appendLine("listeners = []") + appendLine("[network_identity]") + appendLine("network_name = ${quote(settings.networkName)}") + appendLine("network_secret = ${quote(password)}") + for (peer in settings.peers) { + appendLine("[[peer]]") + appendLine("uri = ${quote(peer)}") + } + appendLine("[flags]") + appendLine("no_tun = true") + appendLine("use_smoltcp = true") + appendLine("bind_device = false") + appendLine("private_mode = true") + appendLine("latency_first = true") + appendLine("[[port_forward]]") + appendLine("bind_addr = \"127.0.0.1:$port\"") + appendLine("dst_addr = \"${destination.host}:${destination.port}\"") + appendLine("proto = \"tcp\"") + } + } + + private fun ipv4(value: String): Boolean { + val parts = value.split('.') + if (parts.size != 4 || parts.any { it.isEmpty() || it.length > 3 || !it.all(Char::isDigit) || it.toInt() !in 0..255 }) return false + return parts.first().toInt() !in setOf(0, 127) && parts.first().toInt() < 224 + } +} diff --git a/app/src/main/java/app/codeg/android/core/mesh/MeshTransport.kt b/app/src/main/java/app/codeg/android/core/mesh/MeshTransport.kt new file mode 100644 index 00000000..6c993667 --- /dev/null +++ b/app/src/main/java/app/codeg/android/core/mesh/MeshTransport.kt @@ -0,0 +1,137 @@ +package app.codeg.android.core.mesh + +import app.codeg.android.BuildConfig +import app.codeg.android.core.datastore.ServerProfile +import com.easytier.jni.EasyTierJNI +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.NonCancellable +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import kotlinx.coroutines.withContext +import java.net.InetAddress +import java.net.ServerSocket +import java.util.UUID +import java.util.concurrent.ConcurrentHashMap +import javax.inject.Inject +import javax.inject.Singleton + +internal interface MeshEngine { + fun start(config: String) + fun stop(instance: String) +} + +private class JniMeshEngine : MeshEngine { + override fun start(config: String) { + check(BuildConfig.EASYTIER_ENABLED) { "This build does not include EasyTier." } + // Native diagnostics can contain config values. Never expose the exception text. + try { check(EasyTierJNI.runNetworkInstance(config) == 0) } + catch (_: LinkageError) { error("EasyTier is unavailable on this device.") } + catch (_: Exception) { error("EasyTier could not start. Check the connection settings.") } + } + override fun stop(instance: String) { + try { check(EasyTierJNI.deleteNetworkInstance(instance) == 0) } + catch (_: Exception) { error("EasyTier could not stop the previous connection. Retry or restart the app.") } + } +} + +/** One selected-server instance; test connections have an independent short-lived instance. + * No TUN or device-wide route is installed: only Codeg's localhost TCP forward is exposed. + */ +@Singleton +class MeshTransport internal constructor(private val engine: MeshEngine) { + @Inject constructor() : this(JniMeshEngine()) + + private val mutex = Mutex() + private var selected: Lease? = null + private val temporary = mutableListOf() + private val usedPorts = ConcurrentHashMap.newKeySet() + private class Lease(val profile: ServerProfile, val password: String, val name: String, val url: String) + + suspend fun prepare(profile: ServerProfile, password: String): String = withContext(Dispatchers.IO) { + mutex.withLock { + selected?.takeIf { it.profile == profile && it.password == password }?.let { return@withLock it.url } + check(temporary.none { conflicts(profile, password, it) }) { "Finish the connection test before switching this mesh profile." } + stopSelected() + if (profile.mesh == null) return@withLock profile.baseUrl + val lease = start(profile, password) + selected = lease + lease.url + } + } + + suspend fun address(profile: ServerProfile): String? = mutex.withLock { + if (profile.mesh == null) profile.baseUrl else selected?.takeIf { it.profile == profile }?.url + } + + suspend fun disconnect() = withContext(NonCancellable + Dispatchers.IO) { + mutex.withLock { stopSelected() } + } + + suspend fun test(profile: ServerProfile, password: String, block: suspend (String) -> T): T { + if (profile.mesh == null) return block(profile.baseUrl) + var lease: Lease? = null + var owned = false + try { + // Capture before the dispatcher hop resumes, so cancellation cannot leak a native instance. + withContext(Dispatchers.IO) { + mutex.withLock { + val current = selected + if (current != null && current.profile.mesh == profile.mesh && + current.profile.baseUrl == profile.baseUrl && current.password == password) { + lease = current + } else { + if ((selected?.let { conflicts(profile, password, it) } == true) || + temporary.any { conflicts(profile, password, it) }) throw MeshTestConflict() + lease = start(profile, password) + owned = true + temporary += requireNotNull(lease) + } + } + } + return block(requireNotNull(lease).url) + } finally { + if (owned) lease?.let { active -> + withContext(NonCancellable + Dispatchers.IO) { + mutex.withLock { engine.stop(active.name); temporary.remove(active) } + } + } + } + } + + private fun conflicts(profile: ServerProfile, password: String, active: Lease): Boolean { + val mesh = profile.mesh ?: return false + return mesh.ipv4.isNotEmpty() && mesh.ipv4 == active.profile.mesh?.ipv4 && + mesh.networkName == active.profile.mesh?.networkName && password == active.password + } + + private fun start(profile: ServerProfile, password: String): Lease { + val port = unusedPort() + val name = "codeg-${UUID.randomUUID()}" + val config = MeshConfig.render(profile, password, name, port) + try { engine.start(config) } + catch (error: Throwable) { + runCatching { engine.stop(name) } + throw error + } + return Lease(profile, password, name, "http://127.0.0.1:$port") + } + + private fun unusedPort(): Int { + // A stale client from a previous connection must never reach a different profile. + repeat(64) { + val port = ServerSocket(0, 0, InetAddress.getByName("127.0.0.1")).use { it.localPort } + if (usedPorts.add(port)) return port + } + error("Could not allocate a new local connection port.") + } + + private fun stopSelected() { + val previous = selected ?: return + engine.stop(previous.name) + selected = null + } +} + +internal class MeshTestConflict : IllegalStateException( + "The selected connection is already using this virtual IP. Save and select the edited server to test it safely." +) diff --git a/app/src/main/java/app/codeg/android/feature/server/ServerEditorScreen.kt b/app/src/main/java/app/codeg/android/feature/server/ServerEditorScreen.kt index 2d7eb16c..907ec4d5 100644 --- a/app/src/main/java/app/codeg/android/feature/server/ServerEditorScreen.kt +++ b/app/src/main/java/app/codeg/android/feature/server/ServerEditorScreen.kt @@ -2,6 +2,11 @@ package app.codeg.android.feature.server import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.material3.Switch +import androidx.compose.ui.Alignment +import app.codeg.android.BuildConfig import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState @@ -79,6 +84,22 @@ fun ServerEditorScreen( mono = true, ) + if (BuildConfig.EASYTIER_ENABLED || viewModel.useMesh) { + Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { + Text(stringResource(R.string.mesh_use), Modifier.weight(1f)) + Switch(checked = viewModel.useMesh, onCheckedChange = viewModel::onUseMeshChange, + enabled = BuildConfig.EASYTIER_ENABLED || viewModel.useMesh) + } + if (viewModel.useMesh) { + Text(stringResource(if (BuildConfig.EASYTIER_ENABLED) R.string.mesh_description else R.string.mesh_unavailable), + style = MaterialTheme.typography.bodySmall, color = colors.textSecondary) + CodegTextField(value = viewModel.networkName, onValueChange = viewModel::onNetworkNameChange, label = stringResource(R.string.mesh_network)) + SecretField(value = viewModel.networkPassword, onValueChange = viewModel::onNetworkPasswordChange, label = stringResource(R.string.mesh_password)) + CodegTextField(value = viewModel.peers, onValueChange = viewModel::onPeersChange, label = stringResource(R.string.mesh_peers), mono = true, singleLine = false) + CodegTextField(value = viewModel.ipv4, onValueChange = viewModel::onIpv4Change, label = stringResource(R.string.mesh_ipv4), mono = true) + } + } + SectionHeader(stringResource(R.string.server_section_auth)) SecretField( value = viewModel.token, @@ -90,7 +111,7 @@ fun ServerEditorScreen( text = stringResource(R.string.server_test_connection), onClick = viewModel::testConnection, loading = viewModel.test is TestState.Testing, - enabled = viewModel.url.isNotBlank() && viewModel.token.isNotBlank(), + enabled = viewModel.canTest, ) when (val test = viewModel.test) { is TestState.Success -> Text( diff --git a/app/src/main/java/app/codeg/android/feature/server/ServerEditorViewModel.kt b/app/src/main/java/app/codeg/android/feature/server/ServerEditorViewModel.kt index 8d148323..01c47a5d 100644 --- a/app/src/main/java/app/codeg/android/feature/server/ServerEditorViewModel.kt +++ b/app/src/main/java/app/codeg/android/feature/server/ServerEditorViewModel.kt @@ -8,6 +8,13 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import app.codeg.android.core.data.ServerRepository import app.codeg.android.core.datastore.ServerProfile +import app.codeg.android.core.datastore.MeshSettings +import app.codeg.android.core.mesh.MeshConfig +import app.codeg.android.core.mesh.MeshTestConflict +import app.codeg.android.BuildConfig +import kotlinx.coroutines.CancellationException +import kotlinx.coroutines.TimeoutCancellationException +import kotlinx.coroutines.Job import app.codeg.android.core.network.CodegClient import app.codeg.android.core.network.displayMessage import dagger.hilt.android.lifecycle.HiltViewModel @@ -32,6 +39,17 @@ class ServerEditorViewModel @Inject constructor( private set var token by mutableStateOf("") private set + var useMesh by mutableStateOf(false) + private set + var networkName by mutableStateOf("") + private set + var networkPassword by mutableStateOf("") + private set + var peers by mutableStateOf("") + private set + var ipv4 by mutableStateOf("") + private set + private var testJob: Job? = null var test by mutableStateOf(TestState.Idle) private set @@ -40,11 +58,27 @@ class ServerEditorViewModel @Inject constructor( } fun onNameChange(value: String) { name = value } - fun onUrlChange(value: String) { url = value } - fun onTokenChange(value: String) { token = value } + fun onUrlChange(value: String) { url = value; resetTest() } + fun onTokenChange(value: String) { token = value; resetTest() } + + fun onUseMeshChange(value: Boolean) { useMesh = value; resetTest() } + fun onNetworkNameChange(value: String) { networkName = value; resetTest() } + fun onNetworkPasswordChange(value: String) { networkPassword = value; resetTest() } + fun onPeersChange(value: String) { peers = value; resetTest() } + fun onIpv4Change(value: String) { ipv4 = value; resetTest() } + private fun resetTest() { testJob?.cancel(); test = TestState.Idle } + + private fun profile(id: String) = ServerProfile( + id = id, name = name.trim(), baseUrl = CodegClient.normalizeBaseUrl(url), + mesh = if (useMesh) MeshSettings(networkName.trim(), peers.split(',', '\n', '\r').map(String::trim).filter(String::isNotEmpty), ipv4.trim()) else null, + ) val canSave: Boolean - get() = name.isNotBlank() && url.isNotBlank() && token.isNotBlank() + get() = name.isNotBlank() && canTest + + val canTest: Boolean + get() = url.isNotBlank() && token.isNotBlank() && + (!useMesh || (BuildConfig.EASYTIER_ENABLED && runCatching { MeshConfig.validate(profile(editingId ?: "test"), networkPassword) }.isSuccess)) private fun loadExisting(id: String) { viewModelScope.launch { @@ -52,17 +86,32 @@ class ServerEditorViewModel @Inject constructor( name = profile.name url = profile.baseUrl token = repository.token(id).orEmpty() + useMesh = profile.mesh != null + networkName = profile.mesh?.networkName.orEmpty() + peers = profile.mesh?.peers?.joinToString("\n").orEmpty() + ipv4 = profile.mesh?.ipv4.orEmpty() + networkPassword = repository.meshPassword(id) } } fun testConnection() { - viewModelScope.launch { + testJob?.cancel() + val candidate = profile(UUID.randomUUID().toString()) + val savedToken = token.trim() + val password = networkPassword + testJob = viewModelScope.launch { test = TestState.Testing test = try { - val health = repository.transientClient(url.trim(), token.trim()).health() + val health = repository.testConnection(candidate, savedToken, password) TestState.Success(health.version) - } catch (e: Exception) { - TestState.Failure(e.displayMessage()) + } catch (error: MeshTestConflict) { + TestState.Failure(requireNotNull(error.message)) + } catch (_: TimeoutCancellationException) { + TestState.Failure("Connection timed out. Check the mesh settings and try again.") + } catch (error: CancellationException) { throw error } + catch (error: Exception) { + // Do not reflect native config or credential-bearing exception messages. + TestState.Failure(if (candidate.mesh != null) "Check the mesh settings, peer reachability, and server token." else error.displayMessage()) } } } @@ -70,12 +119,8 @@ class ServerEditorViewModel @Inject constructor( fun save(onDone: () -> Unit) { viewModelScope.launch { val id = editingId ?: UUID.randomUUID().toString() - val profile = ServerProfile( - id = id, - name = name.trim(), - baseUrl = CodegClient.normalizeBaseUrl(url), - ) - repository.save(profile, token.trim()) + val profile = profile(id) + repository.save(profile, token.trim(), networkPassword) if (editingId == null) repository.select(id) onDone() } diff --git a/app/src/main/java/app/codeg/android/feature/settings/OpenSourceLicensesScreen.kt b/app/src/main/java/app/codeg/android/feature/settings/OpenSourceLicensesScreen.kt index 0b19a76a..b6b868a0 100644 --- a/app/src/main/java/app/codeg/android/feature/settings/OpenSourceLicensesScreen.kt +++ b/app/src/main/java/app/codeg/android/feature/settings/OpenSourceLicensesScreen.kt @@ -21,6 +21,7 @@ import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import app.codeg.android.R +import app.codeg.android.BuildConfig import app.codeg.android.core.designsystem.theme.CodegTheme private const val NoticeAsset = "NOTICE_BUNDLE.txt" @@ -33,7 +34,15 @@ fun OpenSourceLicensesScreen() { val colors = CodegTheme.colors val chunks = remember(context) { runCatching { - context.assets.open(NoticeAsset).bufferedReader().use { it.readText() } + buildString { + append(context.assets.open(NoticeAsset).bufferedReader().use { it.readText() }) + if (BuildConfig.EASYTIER_ENABLED) { + for (asset in listOf("EASYTIER_NOTICE.txt", "EasyTier-LGPL-3.0.txt", "GPL-3.0.txt", "THIRD_PARTY_NOTICES.txt")) { + appendLine(); appendLine(asset) + append(context.assets.open(asset).bufferedReader().use { it.readText() }) + } + } + } }.getOrNull()?.lineSequence()?.chunked(LinesPerChunk)?.map { lines -> lines.joinToString("\n") }?.toList().orEmpty() diff --git a/app/src/main/java/com/easytier/jni/EasyTierJNI.kt b/app/src/main/java/com/easytier/jni/EasyTierJNI.kt new file mode 100644 index 00000000..2156c55f --- /dev/null +++ b/app/src/main/java/com/easytier/jni/EasyTierJNI.kt @@ -0,0 +1,8 @@ +package com.easytier.jni + +/** Minimal declarations for the public EasyTier JNI ABI; loading is lazy. */ +internal object EasyTierJNI { + init { System.loadLibrary("easytier_android_jni") } + @JvmStatic external fun runNetworkInstance(config: String): Int + @JvmStatic external fun deleteNetworkInstance(instanceName: String): Int +} diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 941e222e..ac5f7f1a 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -836,4 +836,17 @@ 测试消息已发送。 令牌已移除。 规格不是有效的 JSON + + + 通过 EasyTier 连接 + 填写自己的组网配置。仅转发 Codeg 流量,不创建全局 VPN。服务器地址请填写包含组网 IPv4 和端口的 HTTP 地址。 + 此构建未包含 EasyTier。请安装支持 EasyTier 的构建,或关闭此选项并使用可以直接访问的服务器地址。 + 网络名称 + 网络密码 + 节点(tcp://主机:端口 或 udp://主机:端口,每行一个) + 虚拟 IPv4(可选,留空使用 DHCP) + 正在连接 %1$s… + 无法连接 %1$s。请检查组网配置、节点连通性和服务器令牌。 + 重试 + 选择服务器 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7bccd998..192d317b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -849,4 +849,17 @@ Test message sent. Token removed. Spec is not valid JSON + + + Connect through EasyTier + Enter your own mesh settings. Only Codeg traffic is forwarded; no device-wide VPN is created. Use an HTTP URL with the server’s mesh IPv4 address and port. + This build does not include EasyTier. Install an EasyTier-enabled build, or turn this option off to use a directly reachable URL. + Network name + Network password + Peers (tcp://host:port or udp://host:port, one per line) + Virtual IPv4 (optional; empty uses DHCP) + Connecting to %1$s… + Could not connect to %1$s. Check the mesh settings, peer reachability, and server token. + Retry + Choose server diff --git a/app/src/test/java/app/codeg/android/core/data/MeshHealthTest.kt b/app/src/test/java/app/codeg/android/core/data/MeshHealthTest.kt new file mode 100644 index 00000000..26c51f6d --- /dev/null +++ b/app/src/test/java/app/codeg/android/core/data/MeshHealthTest.kt @@ -0,0 +1,14 @@ +package app.codeg.android.core.data + +import app.codeg.android.core.model.HealthResponse +import org.junit.Assert.assertTrue +import org.junit.Test + +class MeshHealthTest { + @Test fun `only an explicit healthy nonempty payload passes the startup gate`() { + requireHealthy(HealthResponse("ok", "1.0.0")) + listOf(HealthResponse("error", "1.0.0"), HealthResponse("", "1.0.0"), HealthResponse("ok", " ")).forEach { + assertTrue(runCatching { requireHealthy(it) }.isFailure) + } + } +} diff --git a/app/src/test/java/app/codeg/android/core/data/ServerConnectionRevisionTest.kt b/app/src/test/java/app/codeg/android/core/data/ServerConnectionRevisionTest.kt new file mode 100644 index 00000000..9ea7cd85 --- /dev/null +++ b/app/src/test/java/app/codeg/android/core/data/ServerConnectionRevisionTest.kt @@ -0,0 +1,90 @@ +package app.codeg.android.core.data + +import androidx.datastore.core.DataStore +import androidx.datastore.preferences.core.Preferences +import androidx.datastore.preferences.core.emptyPreferences +import app.codeg.android.core.common.DispatcherProvider +import app.codeg.android.core.datastore.MeshSettings +import app.codeg.android.core.datastore.ServerProfile +import app.codeg.android.core.datastore.ServerStore +import app.codeg.android.core.network.CodegClientFactory +import app.codeg.android.core.security.SecretStore +import app.codeg.android.core.common.DefaultDispatcherProvider +import app.codeg.android.feature.server.ServerEditorViewModel +import androidx.lifecycle.SavedStateHandle +import dagger.Lazy +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.launch +import kotlinx.coroutines.test.UnconfinedTestDispatcher +import kotlinx.coroutines.test.runTest +import org.junit.Assert.* +import org.junit.Test + +@OptIn(ExperimentalCoroutinesApi::class) +class ServerConnectionRevisionTest { + private class Store : DataStore { + override val data = MutableStateFlow(emptyPreferences()) + override suspend fun updateData(transform: suspend (Preferences) -> Preferences): Preferences = + transform(data.value).also { data.value = it } + } + private class Secrets : SecretStore { + val values = mutableMapOf() + override fun put(key: String, value: String) { values[key] = value } + override fun get(key: String) = values[key] + override fun remove(key: String) { values.remove(key) } + } + + @Test fun `a direct connection can still be tested before it has a display name`() { + val repository = ServerRepository(ServerStore(Store()), Secrets(), + CodegClientFactory(Lazy { error("No request is made while editing") }), DefaultDispatcherProvider) + val editor = ServerEditorViewModel(repository, SavedStateHandle()) + editor.onUrlChange("https://example.test") + editor.onTokenChange("fixture-token") + assertTrue(editor.canTest) + assertFalse(editor.canSave) + editor.onNameChange("Test server") + assertTrue(editor.canSave) + editor.onUseMeshChange(true) + assertFalse("An incomplete mesh profile must not be testable", editor.canTest) + } + + @Test fun `unrelated edits preserve selection while token and password edits invalidate it`() = runTest { + val dispatcher = UnconfinedTestDispatcher(testScheduler) + val dispatchers = object : DispatcherProvider { + override val io = dispatcher + override val default = dispatcher + override val main = dispatcher + } + val store = Store() + val secrets = Secrets() + val factory = CodegClientFactory(Lazy { error("A storage edit must not connect to a server") }) + val repository = ServerRepository(ServerStore(store), secrets, factory, dispatchers) + val selected = ServerProfile("selected", "Selected", "http://10.44.0.2:3080", + MeshSettings("test-network", listOf("tcp://peer.example.test:11010"))) + repository.save(selected, "fixture-token", "fixture-password") + val observed = mutableListOf() + backgroundScope.launch(dispatcher) { repository.selectedProfile.collect { observed += it } } + val firstRevision = observed.single()!!.connectionRevision + assertTrue(firstRevision.isNotBlank()) + + repository.save(ServerProfile("other", "Other", "https://other.example.test"), "other-fixture-token") + assertEquals("Editing another server must not tear down the selected mesh", 1, observed.size) + + repository.save(selected, "updated-fixture-token", "fixture-password") + assertEquals(2, observed.size) + assertNotEquals(firstRevision, observed.last()!!.connectionRevision) + assertEquals("updated-fixture-token", repository.token(selected.id)) + repository.save(selected, "updated-fixture-token", "updated-fixture-password") + assertEquals(3, observed.size) + assertEquals("updated-fixture-password", repository.meshPassword(selected.id)) + + val restored = ServerRepository(ServerStore(store), secrets, factory, dispatchers) + assertEquals(observed.last(), restored.selectedProfile.first()) + assertFalse(store.data.value.asMap().values.any { it.toString().contains("fixture-password") }) + repository.delete(selected.id) + assertEquals("other", repository.selectedProfile.first()?.id) + assertNull(secrets.values["mesh-password:selected"]) + } +} diff --git a/app/src/test/java/app/codeg/android/core/mesh/MeshTransportTest.kt b/app/src/test/java/app/codeg/android/core/mesh/MeshTransportTest.kt new file mode 100644 index 00000000..2ff8753c --- /dev/null +++ b/app/src/test/java/app/codeg/android/core/mesh/MeshTransportTest.kt @@ -0,0 +1,161 @@ +package app.codeg.android.core.mesh + +import app.codeg.android.core.datastore.MeshSettings +import app.codeg.android.core.datastore.ServerProfile +import kotlinx.coroutines.async +import kotlinx.coroutines.awaitCancellation +import kotlinx.coroutines.cancelAndJoin +import kotlinx.coroutines.launch +import kotlinx.coroutines.test.runTest +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.CoroutineStart +import kotlinx.coroutines.Job +import kotlinx.serialization.json.Json +import kotlinx.serialization.decodeFromString +import org.junit.Assert.* +import org.junit.Test + +class MeshTransportTest { + private val profile = ServerProfile("test-server", "Test", "http://10.44.0.2:3080", + MeshSettings("test-network", listOf("tcp://peer.example.test:11010"))) + + private class Engine : MeshEngine { + val started = mutableListOf() + val stopped = mutableListOf() + override fun start(config: String) { started += config } + override fun stop(instance: String) { stopped += instance } + } + + @Test fun `legacy JSON remains a direct connection`() { + val old = Json.decodeFromString("""{"id":"a","name":"A","baseUrl":"https://example.test"}""") + assertNull(old.mesh) + } + + @Test fun `direct mode does not load or start native code`() = runTest { + val engine = Engine() + val transport = MeshTransport(engine) + val direct = profile.copy(mesh = null) + assertEquals(direct.baseUrl, transport.prepare(direct, "")) + assertEquals(direct.baseUrl, transport.address(direct)) + assertTrue(engine.started.isEmpty()) + } + + @Test fun `concurrent clients reuse the selected native instance`() = runTest { + val engine = Engine() + val transport = MeshTransport(engine) + val requests = List(6) { async { transport.prepare(profile, "fixture-password") } } + val addresses = requests.map { it.await() }.toSet() + assertEquals(1, addresses.size) + assertTrue(addresses.single().startsWith("http://127.0.0.1:")) + assertEquals(1, engine.started.size) + assertEquals(addresses.single(), transport.address(profile)) + } + + @Test fun `switching to direct stops the mesh and invalidates its address`() = runTest { + val engine = Engine() + val transport = MeshTransport(engine) + transport.prepare(profile, "fixture-password") + transport.prepare(profile.copy(id = "direct", mesh = null), "") + assertEquals(1, engine.stopped.size) + assertNull(transport.address(profile)) + } + + @Test fun `editing a mesh profile restarts the instance`() = runTest { + val engine = Engine() + val transport = MeshTransport(engine) + transport.prepare(profile, "fixture-password") + val edited = profile.copy(baseUrl = "http://10.44.0.3:3080") + transport.prepare(edited, "new-fixture-password") + assertEquals(2, engine.started.size) + assertEquals(1, engine.stopped.size) + assertNull(transport.address(profile)) + assertNotNull(transport.address(edited)) + } + + @Test fun `cancelled connection test closes only its own instance`() = runTest { + val engine = Engine() + val transport = MeshTransport(engine) + val selectedUrl = transport.prepare(profile, "fixture-password") + val entered = CompletableDeferred() + val job = launch { + transport.test(profile.copy(mesh = profile.mesh!!.copy(networkName = "other-fixture-network")), "fixture-password") { + entered.complete(Unit) + awaitCancellation() + } + } + entered.await() + job.cancelAndJoin() + assertEquals(2, engine.started.size) + assertEquals(1, engine.stopped.size) + assertEquals(selectedUrl, transport.address(profile)) + transport.disconnect() + assertEquals(2, engine.stopped.size) + } + + @Test fun `cancellation while native start returns still releases the instance`() = runTest { + var stopped = 0 + lateinit var job: Job + val engine = object : MeshEngine { + override fun start(config: String) { job.cancel() } + override fun stop(instance: String) { stopped++ } + } + val transport = MeshTransport(engine) + job = launch(start = CoroutineStart.LAZY) { + transport.test(profile, "fixture-password") { fail("Cancelled test must not send a request") } + } + job.start() + job.join() + assertEquals(1, stopped) + } + + @Test fun `password-only changes cannot keep using the old native instance`() = runTest { + val engine = Engine() + val transport = MeshTransport(engine) + val old = transport.prepare(profile, "fixture-password") + val fresh = transport.prepare(profile, "updated-fixture-password") + assertNotEquals(old, fresh) + assertEquals(2, engine.started.size) + assertEquals(1, engine.stopped.size) + } + + @Test fun `testing the selected static address reuses it and changed settings cannot duplicate it`() = runTest { + val engine = Engine() + val transport = MeshTransport(engine) + val fixed = profile.copy(mesh = profile.mesh!!.copy(ipv4 = "10.44.0.8")) + val selected = transport.prepare(fixed, "fixture-password") + transport.test(fixed, "fixture-password") { assertEquals(selected, it) } + assertEquals(1, engine.started.size) + assertTrue(engine.stopped.isEmpty()) + val failure = runCatching { + transport.test(fixed.copy(baseUrl = "http://10.44.0.3:3080"), "fixture-password") { fail("Must not duplicate a static address") } + }.exceptionOrNull() + assertTrue(failure is MeshTestConflict) + assertEquals(selected, transport.address(fixed)) + } + + @Test fun `configuration is userspace private and binds loopback only`() { + val config = MeshConfig.render(profile, "fixture-password", "fixture-instance", 12345) + assertTrue(config.contains("no_tun = true")) + assertTrue(config.contains("use_smoltcp = true")) + assertTrue(config.contains("private_mode = true")) + assertTrue(config.contains("bind_addr = \"127.0.0.1:12345\"")) + assertTrue(config.contains("dst_addr = \"10.44.0.2:3080\"")) + assertFalse(config.contains("0.0.0.0")) + } + + @Test fun `credential characters cannot inject TOML sections`() { + val config = MeshConfig.render(profile, "fixture\"\n[flags]\nno_tun = false", "fixture-instance", 12345) + assertEquals(1, config.lineSequence().count { it == "[flags]" }) + assertTrue(config.contains("network_secret = \"fixture\\\"\\n[flags]\\nno_tun = false\"")) + } + + @Test fun `invalid or credential-bearing destinations and peers are rejected`() { + listOf("https://10.44.0.2:3080", "http://localhost:3080", "http://127.0.0.1:3080", + "http://user:password@10.44.0.2:3080", "http://10.44.0.2:0", "http://10.44.0.2:3080/path").forEach { + assertTrue(it, runCatching { MeshConfig.validate(profile.copy(baseUrl = it), "fixture-password") }.isFailure) + } + listOf("tcp://user:password@peer.example.test:11010", "tcp://peer.example.test", "tcp://peer.example.test:11010?q=x", "tcp://peer.example.test:11010\n[flags]").forEach { + assertTrue(it, runCatching { MeshConfig.validate(profile.copy(mesh = profile.mesh!!.copy(peers = listOf(it))), "fixture-password") }.isFailure) + } + } +} diff --git a/config/easytier/EASYTIER_NOTICE.txt b/config/easytier/EASYTIER_NOTICE.txt new file mode 100644 index 00000000..39c37d29 --- /dev/null +++ b/config/easytier/EASYTIER_NOTICE.txt @@ -0,0 +1,14 @@ +Optional EasyTier native transport + +This optional build uses EasyTier, Copyright the EasyTier contributors, +licensed under the GNU Lesser General Public License version 3 (LGPL-3.0). +The LGPL incorporates terms of the GNU General Public License version 3; +both license texts accompany this notice. + +Source: https://github.com/EasyTier/EasyTier +Revision: 4a10d1c2b93beae60ff0d6d3329463c1ad6928b2 +Local change: disable the Android JNI logger (LevelFilter::Debug -> Off). +Build/replacement instructions: docs/easytier-native-build.md + +EasyTier's Rust dependencies retain their respective upstream licenses and +copyright notices; see the pinned source and Cargo.lock for the exact graph. diff --git a/config/easytier/EasyTier-LGPL-3.0.txt b/config/easytier/EasyTier-LGPL-3.0.txt new file mode 100644 index 00000000..0a041280 --- /dev/null +++ b/config/easytier/EasyTier-LGPL-3.0.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/config/easytier/GPL-3.0.txt b/config/easytier/GPL-3.0.txt new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/config/easytier/GPL-3.0.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/config/easytier/supplemental-sources.json b/config/easytier/supplemental-sources.json new file mode 100644 index 00000000..a275d190 --- /dev/null +++ b/config/easytier/supplemental-sources.json @@ -0,0 +1,131 @@ +[ + { + "path": "boringtun-easytier-0.6.1/LICENSE.md", + "source": "https://raw.githubusercontent.com/EasyTier/boringtun/431e8c49567c7c870e96d2d07770cff078e010cb/LICENSE.md", + "sha256": "6dbef24708bad8c727bd80cca58ba8aa1637cdcb2cc6e9a31ea49235717e9391" + }, + { + "path": "crc-catalog-2.4.0/LICENSE-APACHE", + "source": "https://raw.githubusercontent.com/akhilles/crc-catalog/b500ea693c552f8d946e290722a7b3ee8b9a7ee2/LICENSES/Apache-2.0.txt", + "sha256": "d3cdb764b98283ee7c3a3cea8d374e2a2957322374378d1f3263f4d512741fc3" + }, + { + "path": "crc-catalog-2.4.0/LICENSE-MIT", + "source": "https://raw.githubusercontent.com/akhilles/crc-catalog/b500ea693c552f8d946e290722a7b3ee8b9a7ee2/LICENSES/MIT.txt", + "sha256": "5ef8fcfb6cccec8fcae043c834099a60c8b7406408db576e026d2b7e67dc5cf5" + }, + { + "path": "defmt-0.3.8/LICENSE-APACHE", + "source": "https://raw.githubusercontent.com/knurling-rs/defmt/3d9da813629bda34cf02429c1f0e4471f2196c23/LICENSE-APACHE", + "sha256": "8173d5c29b4f956d532781d2b86e4e30f83e6b7878dce18c919451d6ba707c90" + }, + { + "path": "defmt-0.3.8/LICENSE-MIT", + "source": "https://raw.githubusercontent.com/knurling-rs/defmt/3d9da813629bda34cf02429c1f0e4471f2196c23/LICENSE-MIT", + "sha256": "30fefc3a7d6a0041541858293bcbea2dde4caa4c0a5802f996a7f7e8c0085652" + }, + { + "path": "defmt-macros-0.3.9/LICENSE-APACHE", + "source": "https://raw.githubusercontent.com/knurling-rs/defmt/7265708107da961a3a976b6fd6b8af7f12c5d512/LICENSE-APACHE", + "sha256": "8173d5c29b4f956d532781d2b86e4e30f83e6b7878dce18c919451d6ba707c90" + }, + { + "path": "defmt-macros-0.3.9/LICENSE-MIT", + "source": "https://raw.githubusercontent.com/knurling-rs/defmt/7265708107da961a3a976b6fd6b8af7f12c5d512/LICENSE-MIT", + "sha256": "30fefc3a7d6a0041541858293bcbea2dde4caa4c0a5802f996a7f7e8c0085652" + }, + { + "path": "defmt-parser-0.3.4/LICENSE-APACHE", + "source": "https://raw.githubusercontent.com/knurling-rs/defmt/f149fa8f77c454b31a3529c65224ecea7f818921/LICENSE-APACHE", + "sha256": "8173d5c29b4f956d532781d2b86e4e30f83e6b7878dce18c919451d6ba707c90" + }, + { + "path": "defmt-parser-0.3.4/LICENSE-MIT", + "source": "https://raw.githubusercontent.com/knurling-rs/defmt/f149fa8f77c454b31a3529c65224ecea7f818921/LICENSE-MIT", + "sha256": "30fefc3a7d6a0041541858293bcbea2dde4caa4c0a5802f996a7f7e8c0085652" + }, + { + "path": "encoding-utils-0.1.0/NOTICE-MIT.txt", + "source": "Published crate Cargo.toml + standard MIT permission terms; see notice for provenance", + "sha256": "4b6b918a52b17adf57f5eefbeeba4e136c51b8965d03d7eb42f79581b5cb022c" + }, + { + "path": "guarden-0.2.0/LICENSE", + "source": "https://raw.githubusercontent.com/ZnqbuZ/guarden/7d8ff644b4e276c6a4c725b90a6ba3649338db53/LICENSE", + "sha256": "f6dede52f74e360219bc8e7ba1155dbcf4f34a9c1b77612aa9bc41d1a3a04fad", + "resolved_from": "guarden/LICENSE -> ../LICENSE; revision from published .cargo_vcs_info.json" + }, + { + "path": "guarden-macros-0.2.0/LICENSE", + "source": "https://raw.githubusercontent.com/ZnqbuZ/guarden/7d8ff644b4e276c6a4c725b90a6ba3649338db53/LICENSE", + "sha256": "f6dede52f74e360219bc8e7ba1155dbcf4f34a9c1b77612aa9bc41d1a3a04fad", + "resolved_from": "guarden-macros/LICENSE -> ../LICENSE; revision from published .cargo_vcs_info.json" + }, + { + "path": "pbjson-0.9.0/LICENSE", + "source": "https://raw.githubusercontent.com/influxdata/pbjson/48ee5989564e0ace82ad71b87736d3d1b2e0e1cd/LICENSE", + "sha256": "791a00933f2ea7e512856361e026998362241c3918d7be948c24d29441033b55" + }, + { + "path": "pbjson-build-0.9.0/LICENSE", + "source": "https://raw.githubusercontent.com/influxdata/pbjson/48ee5989564e0ace82ad71b87736d3d1b2e0e1cd/LICENSE", + "sha256": "791a00933f2ea7e512856361e026998362241c3918d7be948c24d29441033b55" + }, + { + "path": "prost-wkt-0.7.1/LICENSE", + "source": "https://raw.githubusercontent.com/fdeantoni/prost-wkt/781786cf8efff7fb30a31cf102985db2e56f6806/LICENSE", + "sha256": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2" + }, + { + "path": "prost-wkt-build-0.7.1/LICENSE", + "source": "https://raw.githubusercontent.com/fdeantoni/prost-wkt/781786cf8efff7fb30a31cf102985db2e56f6806/LICENSE", + "sha256": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2" + }, + { + "path": "prost-wkt-types-0.7.1/LICENSE", + "source": "https://raw.githubusercontent.com/fdeantoni/prost-wkt/781786cf8efff7fb30a31cf102985db2e56f6806/LICENSE", + "sha256": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2" + }, + { + "path": "rust-i18n-macro-3.1.2/LICENSE", + "source": "https://raw.githubusercontent.com/longbridgeapp/rust-i18n/84ac7dbb598f39901cd5fbc511664ae3cc36b4c1/LICENSE", + "sha256": "d6fde6c28ecbccfc7f6d97c0badbb14bbea2cc8f5e81a8c1537204bdfed9a6d5" + }, + { + "path": "rust-i18n-support-3.1.2/LICENSE", + "source": "https://raw.githubusercontent.com/longbridgeapp/rust-i18n/84ac7dbb598f39901cd5fbc511664ae3cc36b4c1/LICENSE", + "sha256": "d6fde6c28ecbccfc7f6d97c0badbb14bbea2cc8f5e81a8c1537204bdfed9a6d5" + }, + { + "path": "rustls-platform-verifier-android-0.1.1/LICENSE-APACHE", + "source": "https://raw.githubusercontent.com/rustls/rustls-platform-verifier/670de1a872b68c2a0a31a6c491e04bc95d5de5e8/LICENSE-APACHE", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "resolved_from": "android-release-support/LICENSE-APACHE -> ../LICENSE-APACHE" + }, + { + "path": "rustls-platform-verifier-android-0.1.1/LICENSE-MIT", + "source": "https://raw.githubusercontent.com/rustls/rustls-platform-verifier/670de1a872b68c2a0a31a6c491e04bc95d5de5e8/LICENSE-MIT", + "sha256": "1c7cf76689c837a68ed8d704994e52a0f2940c087958f860d17f3186afbdcc0c", + "resolved_from": "android-release-support/LICENSE-MIT -> ../LICENSE-MIT" + }, + { + "path": "seahash-4.1.0/NOTICE-MIT.txt", + "source": "Published crate Cargo.toml + standard MIT permission terms; see notice for provenance", + "sha256": "fdd8bd91fae494d314ca8538f2897e7c5e03cfd7473c05d0286ab14fa2802364" + }, + { + "path": "tun-easytier-1.1.1/LICENSE-WTFPL", + "source": "https://github.com/EasyTier/rust-tun/blob/12378839e7985283df0e4fb536b7137230356db5/src/lib.rs#L1-L13", + "sha256": "6d54c2b49221654a95efb0a3a3521f0e8dca2575e8123ce20e1a1f32e72afd33" + }, + { + "path": "yasna-0.5.2/LICENSE-APACHE", + "source": "https://raw.githubusercontent.com/qnighy/yasna.rs/b7e65f9a4c317494cce2d18ea02b3d6eaaea7985/LICENSE-APACHE", + "sha256": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2" + }, + { + "path": "yasna-0.5.2/LICENSE-MIT", + "source": "https://raw.githubusercontent.com/qnighy/yasna.rs/b7e65f9a4c317494cce2d18ea02b3d6eaaea7985/LICENSE-MIT", + "sha256": "2a7df90e60fd5512b8bca35d3ce90e068f21c52d962855053fd1d9e2e7ca0f16" + } +] diff --git a/config/easytier/supplemental/boringtun-easytier-0.6.1/LICENSE.md b/config/easytier/supplemental/boringtun-easytier-0.6.1/LICENSE.md new file mode 100644 index 00000000..dfd871a4 --- /dev/null +++ b/config/easytier/supplemental/boringtun-easytier-0.6.1/LICENSE.md @@ -0,0 +1,9 @@ +Copyright (c) 2019 Cloudflare, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/config/easytier/supplemental/crc-catalog-2.4.0/LICENSE-APACHE b/config/easytier/supplemental/crc-catalog-2.4.0/LICENSE-APACHE new file mode 100644 index 00000000..545ca53e --- /dev/null +++ b/config/easytier/supplemental/crc-catalog-2.4.0/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Akhil Velagapudi + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/config/easytier/supplemental/crc-catalog-2.4.0/LICENSE-MIT b/config/easytier/supplemental/crc-catalog-2.4.0/LICENSE-MIT new file mode 100644 index 00000000..92cbf789 --- /dev/null +++ b/config/easytier/supplemental/crc-catalog-2.4.0/LICENSE-MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Akhil Velagapudi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/config/easytier/supplemental/defmt-0.3.8/LICENSE-APACHE b/config/easytier/supplemental/defmt-0.3.8/LICENSE-APACHE new file mode 100644 index 00000000..11069edd --- /dev/null +++ b/config/easytier/supplemental/defmt-0.3.8/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/config/easytier/supplemental/defmt-0.3.8/LICENSE-MIT b/config/easytier/supplemental/defmt-0.3.8/LICENSE-MIT new file mode 100644 index 00000000..468cd79a --- /dev/null +++ b/config/easytier/supplemental/defmt-0.3.8/LICENSE-MIT @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/config/easytier/supplemental/defmt-macros-0.3.9/LICENSE-APACHE b/config/easytier/supplemental/defmt-macros-0.3.9/LICENSE-APACHE new file mode 100644 index 00000000..11069edd --- /dev/null +++ b/config/easytier/supplemental/defmt-macros-0.3.9/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/config/easytier/supplemental/defmt-macros-0.3.9/LICENSE-MIT b/config/easytier/supplemental/defmt-macros-0.3.9/LICENSE-MIT new file mode 100644 index 00000000..468cd79a --- /dev/null +++ b/config/easytier/supplemental/defmt-macros-0.3.9/LICENSE-MIT @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/config/easytier/supplemental/defmt-parser-0.3.4/LICENSE-APACHE b/config/easytier/supplemental/defmt-parser-0.3.4/LICENSE-APACHE new file mode 100644 index 00000000..11069edd --- /dev/null +++ b/config/easytier/supplemental/defmt-parser-0.3.4/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/config/easytier/supplemental/defmt-parser-0.3.4/LICENSE-MIT b/config/easytier/supplemental/defmt-parser-0.3.4/LICENSE-MIT new file mode 100644 index 00000000..468cd79a --- /dev/null +++ b/config/easytier/supplemental/defmt-parser-0.3.4/LICENSE-MIT @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/config/easytier/supplemental/encoding-utils-0.1.0/NOTICE-MIT.txt b/config/easytier/supplemental/encoding-utils-0.1.0/NOTICE-MIT.txt new file mode 100644 index 00000000..499c54e7 --- /dev/null +++ b/config/easytier/supplemental/encoding-utils-0.1.0/NOTICE-MIT.txt @@ -0,0 +1,32 @@ +encoding-utils 0.1.0 — MIT license declaration and standard terms + +The published crate declares license = "MIT" in Cargo.toml. It does not ship +an independent license file or copyright notice. This supplemental notice +reproduces the standard MIT permission and warranty terms; it does not claim +to be an upstream-authored license file or infer a copyright holder/year. +Retain any notices supplied by upstream in subsequent releases. + +Package repository: https://github.com/greenhat616/encoding-utils +Published crate source revision: f029c6e1eec8153c4d06e872b3ca9a88d90db174 +Package manifest authors (not a claim of copyright ownership): +- a632079 + +Standard MIT terms (https://spdx.org/licenses/MIT.html): + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/config/easytier/supplemental/guarden-0.2.0/LICENSE b/config/easytier/supplemental/guarden-0.2.0/LICENSE new file mode 100644 index 00000000..6821a193 --- /dev/null +++ b/config/easytier/supplemental/guarden-0.2.0/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 guarden contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/config/easytier/supplemental/guarden-macros-0.2.0/LICENSE b/config/easytier/supplemental/guarden-macros-0.2.0/LICENSE new file mode 100644 index 00000000..6821a193 --- /dev/null +++ b/config/easytier/supplemental/guarden-macros-0.2.0/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 guarden contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/config/easytier/supplemental/pbjson-0.9.0/LICENSE b/config/easytier/supplemental/pbjson-0.9.0/LICENSE new file mode 100644 index 00000000..42d41dfd --- /dev/null +++ b/config/easytier/supplemental/pbjson-0.9.0/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2020 InfluxData + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/config/easytier/supplemental/pbjson-build-0.9.0/LICENSE b/config/easytier/supplemental/pbjson-build-0.9.0/LICENSE new file mode 100644 index 00000000..42d41dfd --- /dev/null +++ b/config/easytier/supplemental/pbjson-build-0.9.0/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2020 InfluxData + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/config/easytier/supplemental/prost-wkt-0.7.1/LICENSE b/config/easytier/supplemental/prost-wkt-0.7.1/LICENSE new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/config/easytier/supplemental/prost-wkt-0.7.1/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/config/easytier/supplemental/prost-wkt-build-0.7.1/LICENSE b/config/easytier/supplemental/prost-wkt-build-0.7.1/LICENSE new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/config/easytier/supplemental/prost-wkt-build-0.7.1/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/config/easytier/supplemental/prost-wkt-types-0.7.1/LICENSE b/config/easytier/supplemental/prost-wkt-types-0.7.1/LICENSE new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/config/easytier/supplemental/prost-wkt-types-0.7.1/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/config/easytier/supplemental/rust-i18n-macro-3.1.2/LICENSE b/config/easytier/supplemental/rust-i18n-macro-3.1.2/LICENSE new file mode 100644 index 00000000..b276fc5a --- /dev/null +++ b/config/easytier/supplemental/rust-i18n-macro-3.1.2/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Longbridge + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/config/easytier/supplemental/rust-i18n-support-3.1.2/LICENSE b/config/easytier/supplemental/rust-i18n-support-3.1.2/LICENSE new file mode 100644 index 00000000..b276fc5a --- /dev/null +++ b/config/easytier/supplemental/rust-i18n-support-3.1.2/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Longbridge + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/config/easytier/supplemental/rustls-platform-verifier-android-0.1.1/LICENSE-APACHE b/config/easytier/supplemental/rustls-platform-verifier-android-0.1.1/LICENSE-APACHE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/config/easytier/supplemental/rustls-platform-verifier-android-0.1.1/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/config/easytier/supplemental/rustls-platform-verifier-android-0.1.1/LICENSE-MIT b/config/easytier/supplemental/rustls-platform-verifier-android-0.1.1/LICENSE-MIT new file mode 100644 index 00000000..99641226 --- /dev/null +++ b/config/easytier/supplemental/rustls-platform-verifier-android-0.1.1/LICENSE-MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 1Password + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/config/easytier/supplemental/seahash-4.1.0/NOTICE-MIT.txt b/config/easytier/supplemental/seahash-4.1.0/NOTICE-MIT.txt new file mode 100644 index 00000000..0b8f0f91 --- /dev/null +++ b/config/easytier/supplemental/seahash-4.1.0/NOTICE-MIT.txt @@ -0,0 +1,33 @@ +seahash 4.1.0 — MIT license declaration and standard terms + +The published crate declares license = "MIT" in Cargo.toml. It does not ship +an independent license file or copyright notice. This supplemental notice +reproduces the standard MIT permission and warranty terms; it does not claim +to be an upstream-authored license file or infer a copyright holder/year. +Retain any notices supplied by upstream in subsequent releases. + +Package repository: https://gitlab.redox-os.org/redox-os/seahash +Published crate source revision: 94b632aeac099031c373599313d5b5f0acbbaec0 +Package manifest authors (not a claim of copyright ownership): +- ticki +- Tom Almeida + +Standard MIT terms (https://spdx.org/licenses/MIT.html): + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/config/easytier/supplemental/tun-easytier-1.1.1/LICENSE-WTFPL b/config/easytier/supplemental/tun-easytier-1.1.1/LICENSE-WTFPL new file mode 100644 index 00000000..f3785e30 --- /dev/null +++ b/config/easytier/supplemental/tun-easytier-1.1.1/LICENSE-WTFPL @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyleft (ↄ) meh. | http://meh.schizofreni.co + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/config/easytier/supplemental/yasna-0.5.2/LICENSE-APACHE b/config/easytier/supplemental/yasna-0.5.2/LICENSE-APACHE new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/config/easytier/supplemental/yasna-0.5.2/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/config/easytier/supplemental/yasna-0.5.2/LICENSE-MIT b/config/easytier/supplemental/yasna-0.5.2/LICENSE-MIT new file mode 100644 index 00000000..eaa67b3c --- /dev/null +++ b/config/easytier/supplemental/yasna-0.5.2/LICENSE-MIT @@ -0,0 +1,7 @@ +Copyright (c) 2016 Masaki Hara + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs/easytier-native-build.md b/docs/easytier-native-build.md new file mode 100644 index 00000000..5b9d181f --- /dev/null +++ b/docs/easytier-native-build.md @@ -0,0 +1,133 @@ +# Optional EasyTier native transport + +The normal Android build remains a direct HTTP/WebSocket client. Build the +optional EasyTier variant with `-PeasyTier=true` after generating the native +libraries below. There is no bundled network identity, peer list, server URL, +auth token, or signing credential. Users configure their own server profiles. + +## Reproducible native source + +The JNI adapter and engine come from the public +[EasyTier repository](https://github.com/EasyTier/EasyTier), pinned to +`4a10d1c2b93beae60ff0d6d3329463c1ad6928b2`. Cargo uses the upstream lockfile. +The sole source patch disables the JNI Android logger (`Debug` to `Off`), so +runtime network configuration cannot leak through verbose library logging. +Native exception text can include parser inputs; application UI and telemetry +must report a generic error instead of logging the native exception or config. + +Install Rust 1.95 or later, Android NDK r26 or later, and Protocol Buffers +`protoc`. Add each requested Rust target once, then build: + +```sh +rustup target add aarch64-linux-android x86_64-linux-android +export ANDROID_NDK_HOME=/path/to/android-sdk/ndk/version +python3 scripts/build-easytier.py --abi arm64-v8a --abi x86_64 +./gradlew :app:assembleDebug -PeasyTier=true +``` + +The script also accepts `--abi armeabi-v7a` and `--abi x86`; install the +corresponding `armv7-linux-androideabi` or `i686-linux-android` target first. +No Android ABI is claimed unless its generated library is included. All +runtime native libraries must match the device ABI. + +Sources and Cargo outputs are under `build/easytier/`. Verified libraries are +written to `build/easytier/jniLibs//libeasytier_android_jni.so`, and the +source revision, patch description, and output SHA-256 values are recorded in +`build/easytier/build-info.json`. These generated files are not committed. +Run only one native build per checkout at a time. Optional +`EASYTIER_GIT_PROXY` applies to the public source checkout and Cargo Git +dependencies; `HTTPS_PROXY` configures registry downloads as usual. + +Every library is linked with a 16 KiB maximum page size and checked with NDK +`llvm-readelf`: all ELF `LOAD` segments must have at least `0x4000` alignment. +The script also rejects an unexpected dependency on a separate FFI `.so`. +Gradle checks the exact ABI set and library SHA-256 values against that manifest; +leftover libraries from a different ABI selection cause a build failure. Rebuild +all intended ABIs together, or remove only the obsolete generated ABI output. +Native dependency notices are generated from Cargo's non-dev graph (including +build tools as a conservative superset). Reviewed supplements cover packages +whose published crates omit license text. The generator checks their recorded +source hashes and refuses a report with missing notices. The selected target set +must match the native manifest before Gradle packages the optional APK. + +APK ZIP alignment and the final packaged ABI set still require normal Android +release validation. + +## Scope and lifecycle + +EasyTier runs in userspace (`no_tun = true`) and exposes a TCP forward on +loopback only. The existing Codeg HTTP client and event WebSocket use that +endpoint after an end-to-end HTTP health request succeeds. A listening local +socket is not sufficient readiness evidence. This does not create a system +VPN, replace another app's VPN, install system routes, or provide networking to +other apps. + +Network identity and peer configuration belong to a manually configured +server profile. The app restores only the selected profile at startup; it +must cancel stale connection attempts when switching, deleting, or editing +profiles. A first mesh connection may take longer while peer discovery occurs. +Readiness timeout and cancellation must leave the server picker usable. + +The selected native instance is process-scoped. Leaving the Activity does not +explicitly disconnect it; it may remain until the process exits. There is no +foreground service or guarantee of continuous background connectivity. + +## License and replacement + +EasyTier is LGPL-3.0. The optional APK must include the EasyTier attribution, +LGPL-3.0, and GPL-3.0 texts from `config/easytier/` in its open-source assets. +This is a dynamically loaded JNI shared library; the app source remains under +its existing license. Rust dependencies retain their own upstream licenses. + +For a modified library, fetch the pinned source, apply the documented logger +patch (or your own compatible changes), build the same exported JNI interface, +and replace `build/easytier/jniLibs//libeasytier_android_jni.so`. Build the +application again with `-PeasyTier=true`. A debug APK can be installed with +`adb install -r app/build/outputs/apk/debug/app-debug.apk`; use a matching +debug signing key for replacement, or uninstall a differently signed copy +first (which removes its saved data). No vendor signing key is needed to build +and install a modified application under a distinct application ID. + +The public engine revision, full app source, documented patch, lockfile, and +build instructions enable users to rebuild and recombine the application with +a modified library. Release publishers should distribute the corresponding +source and dependency notices alongside their optional binary release and +review the LGPL obligations for their distribution channel. + +## Official release opt-in + +The existing release workflow keeps direct builds by default. Maintainers can +set the repository variable `CODEG_EASYTIER=true` to build all four Android ABIs +from the pinned public source and include the transport in the official APK. +That path also uploads the modified corresponding engine source and dependency +notices beside the APK. Runtime configuration and signing credentials are never +inputs to the native engine build. Local acceptance currently covers ARM64 on +an API 34 emulator with ARM64 translation; the workflow defines builds for the +other ABIs, which have not been tested on physical devices here. + +## End-to-end local fixture + +The opt-in Android instrumentation test uses the actual app root, encrypted +profile storage, and production HTTP/WebSocket clients. Build the enabled debug +APK and test APK, then start `python3 scripts/mesh-app-fixture.py` in another +terminal. The fixture prints three synthetic connection arguments. Use those +values with: + +```sh +./gradlew :app:assembleDebug :app:assembleDebugAndroidTest -PeasyTier=true +adb install -r app/build/outputs/apk/debug/app-debug.apk +adb install -r app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +adb shell am instrument -w \ + -e class app.codeg.android.mesh.MeshAppIntegrationTest \ + -e meshPeer tcp://10.0.2.2:PEER_PORT \ + -e meshServer http://10.226.31.1:HTTP_PORT \ + -e meshNetwork codeg-app-fixture \ + app.codeg.android.debug.test/androidx.test.runner.AndroidJUnitRunner +``` + +The fixture's mapped subnet exists only through EasyTier, preventing an accidental +direct HTTP pass. It checks a nonempty project response and authenticated event +stream pong, and leaves a clearly synthetic profile for a force-stop/cold-start +check. The test skips without explicit fixture arguments. Stop the fixture with +Ctrl-C, and remove its synthetic profile from the debug app after acceptance. +No live personal server or network is required. diff --git a/scripts/build-easytier.py b/scripts/build-easytier.py new file mode 100644 index 00000000..2d3b371f --- /dev/null +++ b/scripts/build-easytier.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python3 +"""Build the optional EasyTier JNI library from an immutable public revision. + +No runtime network profile or signing credential is a build input. Requires +Rust >= 1.95, the requested Android Rust targets, NDK >= r26, and protoc. +""" + +import argparse +import hashlib +import json +import os +from pathlib import Path +import platform +import shutil +import subprocess + + +REVISION = "4a10d1c2b93beae60ff0d6d3329463c1ad6928b2" +REPOSITORY = "https://github.com/EasyTier/EasyTier.git" +TARGETS = { + "arm64-v8a": ("aarch64-linux-android", "aarch64-linux-android"), + "x86_64": ("x86_64-linux-android", "x86_64-linux-android"), + "armeabi-v7a": ("armv7-linux-androideabi", "armv7a-linux-androideabi"), + "x86": ("i686-linux-android", "i686-linux-android"), +} + + +def run(args, **kwargs): + return subprocess.run(args, check=True, **kwargs) + + +def read(args, **kwargs): + return subprocess.check_output(args, text=True, **kwargs).strip() + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--abi", choices=TARGETS, action="append") + parser.add_argument("--ndk", default=os.environ.get("ANDROID_NDK_HOME") + or os.environ.get("ANDROID_NDK_ROOT") or os.environ.get("NDK_HOME")) + parser.add_argument("--jobs", type=int, default=4) + args = parser.parse_args() + if not args.ndk: + parser.error("set ANDROID_NDK_HOME or pass --ndk") + if args.jobs < 1: + parser.error("--jobs must be positive") + root = Path(__file__).resolve().parents[1] + ndk = Path(args.ndk).expanduser().resolve() + host = {"Linux": "linux-x86_64", "Darwin": "darwin-x86_64"}.get(platform.system()) + if not host: + parser.error("this build script supports Linux and macOS") + llvm = ndk / "toolchains/llvm/prebuilt" / host + if not (llvm / "bin/llvm-readelf").is_file(): + parser.error("NDK LLVM tools not found") + if not shutil.which("protoc") and not os.environ.get("PROTOC"): + parser.error("protoc must be on PATH or configured with PROTOC") + build = root / "build/easytier" + source = build / "source" + output = build / "jniLibs" + build.mkdir(parents=True, exist_ok=True) + git = ["git"] + # Optional standard proxy supplied by the builder; no personal proxy is + # prescribed or embedded in the public build configuration. + if os.environ.get("EASYTIER_GIT_PROXY"): + git += ["-c", "http.proxy=" + os.environ["EASYTIER_GIT_PROXY"]] + if not (source / ".git").exists(): + source.mkdir(parents=True, exist_ok=True) + run(git + ["init", str(source)]) + run(git + ["-C", str(source), "remote", "add", "origin", REPOSITORY]) + if read(git + ["-C", str(source), "remote", "get-url", "origin"]) != REPOSITORY: + raise RuntimeError("refusing an unexpected EasyTier source remote") + exists = subprocess.run(git + ["-C", str(source), "cat-file", "-e", REVISION + "^{commit}"], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0 + if not exists: + run(git + ["-C", str(source), "fetch", "--depth=1", "origin", REVISION]) + logger_path = "easytier-contrib/easytier-android-jni/src/logger.rs" + pristine_logger = read(git + ["-C", str(source), "show", REVISION + ":" + logger_path]) + "\n" + if pristine_logger.count("log::LevelFilter::Debug") != 1: + raise RuntimeError("the pinned JNI logger no longer matches the reviewed patch") + quiet_logger = pristine_logger.replace("log::LevelFilter::Debug", "log::LevelFilter::Off") + # A repeat build may contain precisely our documented logging patch. Never + # reset arbitrary changes in a developer's cached source tree. + dirty = read(git + ["-C", str(source), "status", "--porcelain", "--untracked-files=no"]) + if dirty and (dirty != "M " + logger_path and dirty != " M " + logger_path): + raise RuntimeError("cached EasyTier source has unexpected modifications") + if dirty and (source / logger_path).read_text() != quiet_logger: + raise RuntimeError("cached JNI logger differs from the reviewed patch") + if not dirty: + run(git + ["-C", str(source), "checkout", "--detach", REVISION]) + if read(git + ["-C", str(source), "rev-parse", "HEAD"]) != REVISION: + raise RuntimeError("cached EasyTier revision mismatch") + if (source / logger_path).read_text() != quiet_logger: + (source / logger_path).write_text(quiet_logger) + environment = os.environ.copy() + environment.pop("KCP_SYS_EXTRA_HEADER_PATH", None) + environment["CARGO_TARGET_DIR"] = str(build / "target") + environment["CARGO_BUILD_JOBS"] = str(args.jobs) + environment["PATH"] = str(llvm / "bin") + os.pathsep + environment["PATH"] + environment["CARGO_NET_GIT_FETCH_WITH_CLI"] = "true" + if os.environ.get("EASYTIER_GIT_PROXY"): + # Cargo's git dependencies use the same explicit proxy as the checkout. + environment["GIT_CONFIG_COUNT"] = "1" + environment["GIT_CONFIG_KEY_0"] = "http.proxy" + environment["GIT_CONFIG_VALUE_0"] = os.environ["EASYTIER_GIT_PROXY"] + records = [] + for abi in dict.fromkeys(args.abi or ["arm64-v8a"]): + rust_target, clang_target = TARGETS[abi] + target_env = environment.copy() + env_suffix = rust_target.replace("-", "_") + compiler = llvm / "bin" / (clang_target + "31-clang") + target_env["CC_" + env_suffix] = str(compiler) + target_env["CXX_" + env_suffix] = str(compiler) + "++" + target_env["AR_" + env_suffix] = str(llvm / "bin/llvm-ar") + target_env["CARGO_TARGET_" + env_suffix.upper() + "_LINKER"] = str(compiler) + include_target = "arm-linux-androideabi" if abi == "armeabi-v7a" else rust_target + target_env["BINDGEN_EXTRA_CLANG_ARGS"] = ( + f"--sysroot={llvm / 'sysroot'} -I{llvm / 'sysroot/usr/include' / include_target}" + ) + run(["cargo", "rustc", "--locked", "--release", "-p", "easytier-android-jni", + "--target", rust_target, "--", "-C", "link-arg=-Wl,-z,max-page-size=16384"], + cwd=source, env=target_env) + library = build / "target" / rust_target / "release/libeasytier_android_jni.so" + headers = read([str(llvm / "bin/llvm-readelf"), "--program-headers", "--wide", str(library)]) + loads = [line.split() for line in headers.splitlines() if line.lstrip().startswith("LOAD ")] + if not loads or any(int(line[-1], 16) < 16384 for line in loads): + raise RuntimeError("native library failed the 16 KiB ELF alignment gate") + dynamic = read([str(llvm / "bin/llvm-readelf"), "--dynamic", str(library)]) + if "libeasytier_ffi.so" in dynamic: + raise RuntimeError("JNI unexpectedly depends on an unpackaged FFI shared library") + target = output / abi / library.name + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(library, target) + records.append({"abi": abi, "sha256": hashlib.sha256(target.read_bytes()).hexdigest(), + "elf_load_alignment_at_least_16k": True}) + (build / "build-info.json").write_text(json.dumps({ + "repository": REPOSITORY, "revision": REVISION, + "local_patch": "JNI logger LevelFilter::Debug -> LevelFilter::Off", + "libraries": records, + }, indent=2) + "\n") + # The optional APK must ship dependency notices as well as the JNI binary. + # Missing source notices stop the build until reviewed supplements exist. + report_args = [os.environ.get("PYTHON", "python3"), + str(root / "scripts/easytier-license-report.py")] + for record in records: + report_args += ["--target", TARGETS[record["abi"]][0]] + run(report_args, env=environment) + print("Verified EasyTier JNI libraries:", ", ".join(record["abi"] for record in records)) + + +if __name__ == "__main__": + main() diff --git a/scripts/easytier-license-report.py b/scripts/easytier-license-report.py new file mode 100644 index 00000000..ce71d074 --- /dev/null +++ b/scripts/easytier-license-report.py @@ -0,0 +1,166 @@ +#!/usr/bin/env python3 +"""Collect pinned EasyTier JNI dependency license texts for optional APKs. + +Uses Cargo's resolved target graph, conservatively including build tools. +Fails if a package has no source license/notice text; such packages require a +reviewed, checked-in supplemental notice before a binary can be released. +""" +import argparse +import hashlib +import json +import os +import re +from pathlib import Path +import subprocess + + +def license_files(base): + for directory, dirs, files in os.walk(base): + dirs[:] = sorted(d for d in dirs if d not in (".git", "target", "build", "node_modules")) + for name in sorted(files): + lower = name.lower() + if lower.startswith(("license", "licence", "copying", "copyright", "notice")): + path = Path(directory) / name + if path.is_file() and path.stat().st_size < 2_000_000: + try: + yield path, path.read_text() + except UnicodeError: + continue + + +def is_notice_pointer(text): + value = text.strip() + # Raw GitHub URLs return a symlink's target text, not the target contents. + # Such one-line paths must never count as a reproduced license grant. + if value.startswith(("../", "./", "..\\", ".\\")) and "\n" not in value and "\r" not in value: + return True + return bool(re.fullmatch( + r"(?:(?:\.\.?|[A-Za-z0-9_.-]+)/)*(?:LICENSE|LICENCE|COPYING|NOTICE|COPYRIGHT)[A-Za-z0-9_.-]*", + value, flags=re.IGNORECASE, + )) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--target", action="append") + args = parser.parse_args() + root = Path(__file__).resolve().parents[1] + source = root / "build/easytier/source" + output = root / "build/easytier/licenses" + output.mkdir(parents=True, exist_ok=True) + targets = sorted(set(args.target or ["aarch64-linux-android"])) + packages = {} + reachable = set() + for target in targets: + data = json.loads(subprocess.check_output([ + "cargo", "metadata", "--locked", "--format-version", "1", "--filter-platform", target, + ], cwd=source)) + packages.update({package["id"]: package for package in data["packages"]}) + nodes = {node["id"]: node for node in data["resolve"]["nodes"]} + pending = [package["id"] for package in data["packages"] if package["name"] == "easytier-android-jni"] + if len(pending) != 1: + raise RuntimeError("expected exactly one EasyTier JNI root") + seen = set() + while pending: + identity = pending.pop() + if identity in seen: + continue + seen.add(identity) + for dependency in nodes[identity]["deps"]: + if any(kind["kind"] != "dev" for kind in dependency["dep_kinds"]): + pending.append(dependency["pkg"]) + reachable.update(seen) + supplements = root / "config/easytier/supplemental" + provenance = json.loads((root / "config/easytier/supplemental-sources.json").read_text()) + reviewed = {entry["path"]: entry["sha256"] for entry in provenance} + for file in supplements.glob("*/*"): + if file.is_file() and hashlib.sha256(file.read_bytes()).hexdigest() != reviewed.get(file.relative_to(supplements).as_posix()): + raise RuntimeError("supplemental notice lacks a matching reviewed source hash: " + file.name) + inventory = [] + texts = {} + missing = [] + pointers = [] + resolved_pointers = [] + for identity in sorted(reachable): + package = packages[identity] + base = Path(package["manifest_path"]).parent + candidates = list(license_files(base)) + # Workspace members and Git sub-crates often share the repository's + # top-level license instead of shipping a duplicate per package. + if package.get("license_file"): + explicit = base / package["license_file"] + if explicit.is_file(): + candidates.append((explicit, explicit.read_text())) + for parent in [base, *base.parents]: + if (parent / ".git").exists(): + for entry in parent.iterdir(): + if entry.is_file() and entry.name.lower().startswith(("license", "copying", "notice")): + candidates.append((entry, entry.read_text())) + break + if parent.name == "registry" or parent == parent.parent: + break + # These supplemental files must be reviewed from the package's pinned + # source revision; the script never invents copyright or license text. + supplement = root / "config/easytier/supplemental" / (package["name"] + "-" + package["version"]) + if supplement.exists(): + candidates.extend(license_files(supplement)) + references = [] + for path, contents in candidates: + if is_notice_pointer(contents): + record = {"package": package["name"] + "-" + package["version"], "file": path.name} + replacement = supplement / path.name + # A separately reviewed, hash-checked pinned-source supplement may + # replace a broken symlink stub in a published crate. Never package the stub. + if replacement.is_file() and replacement != path and replacement.read_text().strip() and not is_notice_pointer(replacement.read_text()): + record["resolved_by"] = replacement.relative_to(supplements).as_posix() + resolved_pointers.append(record) + else: + pointers.append(record) + continue + if not contents.strip(): + continue + digest = hashlib.sha256(contents.encode()).hexdigest() + texts[digest] = contents + references.append({"name": path.name, "sha256": digest}) + references = sorted({(entry["name"], entry["sha256"]) for entry in references}) + if not references: + missing.append(package["name"] + "-" + package["version"]) + inventory.append({ + "name": package["name"], "version": package["version"], + "source": package.get("source") or "EasyTier pinned workspace", + "repository": package.get("repository"), "license": package.get("license"), + "notices": [{"name": name, "sha256": digest} for name, digest in references], + }) + inventory.sort(key=lambda package: (package["name"], package["version"])) + (output / "EASYTIER_DEPENDENCIES.json").write_text(json.dumps({ + "root": "easytier-android-jni", "targets": targets, + "scope": "resolved non-dev dependency graph, including build dependencies", + "packages": inventory, "missing_notice_packages": sorted(missing), + "pointer_notice_files": pointers, "resolved_pointer_notice_files": resolved_pointers, + "notice_text_count": len(texts), + }, indent=2) + "\n") + bundle = ["EasyTier JNI dependency notices\n", "Includes build tools as a conservative superset.\n"] + emitted = set() + for package in inventory: + bundle.append("\n" + "=" * 72 + "\n") + bundle.append(package["name"] + " " + package["version"] + "\n") + bundle.append("Declared license: " + (package["license"] or "see included source license") + "\n") + bundle.append("Source: " + (package["repository"] or package["source"]) + "\n") + for reference in package["notices"]: + digest = reference["sha256"] + bundle.append(reference["name"] + " (SHA-256 " + digest + ")\n") + if digest in emitted: + bundle.append("Identical notice reproduced earlier in this bundle.\n") + else: + bundle.append(texts[digest].rstrip() + "\n") + emitted.add(digest) + (output / "THIRD_PARTY_NOTICES.txt").write_text("".join(bundle)) + print(f"Resolved packages: {len(inventory)}; unique notice texts: {len(texts)}; missing: {len(missing)}") + if pointers: + raise SystemExit("License files contain unresolved path pointers; resolve their pinned source targets before release.") + if missing: + raise SystemExit("License review required: " + ", ".join(sorted(missing))) + + +if __name__ == "__main__": + main() diff --git a/scripts/mesh-app-fixture.py b/scripts/mesh-app-fixture.py new file mode 100644 index 00000000..55417810 --- /dev/null +++ b/scripts/mesh-app-fixture.py @@ -0,0 +1,182 @@ +#!/usr/bin/env python3 +"""Synthetic Codeg + EasyTier peer for the opt-in Android integration test. + +Requires easytier-core on PATH. No user servers, tokens, or network identities +are read. The target address exists only inside this fixture's mesh subnet map. +Keep this running while the documented instrumentation test runs; Ctrl-C stops +only the fixture's own peer and HTTP server. +""" +import argparse +import base64 +import hashlib +import http.server +import json +import os +from pathlib import Path +import shutil +import signal +import socket +import struct +import subprocess +import threading +import time + +NETWORK = "codeg-app-fixture" +PASSWORD = "codeg-fixture-network-password" +TOKEN = "codeg-fixture-token" +COUNTS = {"health": 0, "folders": 0, "conversations": 0, "websocket": 0, "pong": 0} +LOCK = threading.Lock() +OUTPUT = None + + +def count(name): + with LOCK: + COUNTS[name] += 1 + (OUTPUT / "requests.json").write_text(json.dumps(COUNTS, indent=2) + "\n") + + +class Fixture(http.server.BaseHTTPRequestHandler): + protocol_version = "HTTP/1.1" + + def log_message(self, *_): + pass + + def do_POST(self): + self.rfile.read(int(self.headers.get("Content-Length", "0"))) + if self.headers.get("Authorization") != "Bearer " + TOKEN: + self.send_error(401) + return + if self.path == "/api/health": + count("health") + result = {"status": "ok", "version": "codeg-mesh-fixture"} + elif self.path == "/api/list_all_folder_details": + count("folders") + result = [{"id": 1, "name": "fixture-project", "path": "/synthetic/fixture"}] + elif self.path == "/api/list_all_conversations": + count("conversations") + result = [] + else: + self.send_error(404) + return + body = json.dumps(result).encode() + self.send_response(200) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def do_GET(self): + expected = "codeg-token." + base64.urlsafe_b64encode(TOKEN.encode()).decode().rstrip("=") + if self.path != "/ws/events" or expected not in self.headers.get("Sec-WebSocket-Protocol", ""): + self.send_error(401) + return + accept = base64.b64encode(hashlib.sha1((self.headers["Sec-WebSocket-Key"] + + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11").encode()).digest()).decode() + self.send_response(101) + self.send_header("Upgrade", "websocket") + self.send_header("Connection", "Upgrade") + self.send_header("Sec-WebSocket-Accept", accept) + self.send_header("Sec-WebSocket-Protocol", "codeg-events") + self.end_headers() + self.close_connection = True + count("websocket") + self.frame(b'{"channel":"__ready__","payload":{}}') + try: + while True: + head = self.rfile.read(2) + if len(head) != 2: + return + length = head[1] & 127 + if length == 126: + length = struct.unpack("!H", self.rfile.read(2))[0] + elif length == 127: + length = struct.unpack("!Q", self.rfile.read(8))[0] + if length > 1024 * 1024: + return + mask = self.rfile.read(4) if head[1] & 128 else b"" + body = self.rfile.read(length) + if mask: + body = bytes(value ^ mask[index % 4] for index, value in enumerate(body)) + if head[0] & 15 == 8: + self.frame(body, 0x88) + return + if head[0] & 15 == 9: + self.frame(body, 0x8A) + elif json.loads(body).get("action") == "ping": + self.frame(b'{"type":"pong"}') + count("pong") + except (OSError, ValueError): + return + + def frame(self, body, opcode=0x81): + header = bytes([opcode, len(body)]) if len(body) < 126 else bytes([opcode, 126]) + struct.pack("!H", len(body)) + self.wfile.write(header + body) + self.wfile.flush() + + +def freeport(): + with socket.socket() as sock: + sock.bind(("127.0.0.1", 0)) + return sock.getsockname()[1] + + +def main(): + global OUTPUT + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--output", type=Path, default=Path("build/mesh-fixture")) + parser.add_argument("--easytier-core", default=shutil.which("easytier-core")) + args = parser.parse_args() + if not args.easytier_core: + parser.error("install easytier-core or pass --easytier-core") + OUTPUT = args.output.resolve() + OUTPUT.mkdir(parents=True, exist_ok=True) + peerport = freeport() + server = http.server.ThreadingHTTPServer(("127.0.0.1", 0), Fixture) + httpport = server.server_address[1] + threading.Thread(target=server.serve_forever, daemon=True).start() + config = f'''instance_name = "codeg-app-fixture-server" +ipv4 = "10.225.31.1" +dhcp = false +listeners = ["tcp://127.0.0.1:{peerport}"] +[network_identity] +network_name = "{NETWORK}" +network_secret = "{PASSWORD}" +[flags] +no_tun = true +use_smoltcp = true +private_mode = true +bind_device = false +[[proxy_network]] +cidr = "127.0.0.1/32" +mapped_cidr = "10.226.31.1/32" +''' + path = OUTPUT / "peer.toml" + path.write_text(config) + environment = {key: value for key, value in os.environ.items() if not key.startswith("ET_")} + with (OUTPUT / "peer.log").open("w") as log: + peer = subprocess.Popen([args.easytier_core, "-c", str(path), "--console-log-level", "error", "--disable-p2p", "true"], + stdout=log, stderr=log, env=environment) + info = {"meshPeer": f"tcp://10.0.2.2:{peerport}", "meshServer": f"http://10.226.31.1:{httpport}", + "meshNetwork": NETWORK, "peer_pid": peer.pid} + (OUTPUT / "connection.json").write_text(json.dumps(info, indent=2) + "\n") + print(json.dumps(info), flush=True) + stopped = threading.Event() + signal.signal(signal.SIGTERM, lambda *_: stopped.set()) + signal.signal(signal.SIGINT, lambda *_: stopped.set()) + try: + while not stopped.wait(0.5): + if peer.poll() is not None: + raise RuntimeError("Fixture peer exited before acceptance completed") + finally: + if peer.poll() is None: + peer.terminate() + try: + peer.wait(timeout=5) + except subprocess.TimeoutExpired: + peer.kill() + peer.wait() + server.shutdown() + + +if __name__ == "__main__": + main() diff --git a/scripts/test_easytier_license_report.py b/scripts/test_easytier_license_report.py new file mode 100644 index 00000000..13e4b3c6 --- /dev/null +++ b/scripts/test_easytier_license_report.py @@ -0,0 +1,39 @@ +import hashlib +import importlib.util +import json +from pathlib import Path +import unittest + +ROOT = Path(__file__).resolve().parents[1] +SPEC = importlib.util.spec_from_file_location("license_report", ROOT / "scripts/easytier-license-report.py") +REPORT = importlib.util.module_from_spec(SPEC) +SPEC.loader.exec_module(REPORT) + + +class LicenseSourceTests(unittest.TestCase): + def test_actual_raw_github_and_published_crate_symlink_stubs_are_not_notices(self): + # Exact bad inputs found in rustls-platform-verifier-android and guarden. + for text in ["../LICENSE-APACHE", "../LICENSE-MIT", "../LICENSE", "../../COPYING", r"..\LICENSE"]: + self.assertTrue(REPORT.is_notice_pointer(text), text) + self.assertFalse(REPORT.is_notice_pointer("Permission is hereby granted, free of charge, to any person obtaining a copy")) + + def test_reviewed_supplements_contain_text_and_match_their_source_hashes(self): + entries = json.loads((ROOT / "config/easytier/supplemental-sources.json").read_text()) + self.assertTrue(entries) + for entry in entries: + body = (ROOT / "config/easytier/supplemental" / entry["path"]).read_bytes() + self.assertTrue(body.strip(), entry["path"]) + self.assertFalse(REPORT.is_notice_pointer(body.decode()), entry["path"]) + self.assertEqual(entry["sha256"], hashlib.sha256(body).hexdigest(), entry["path"]) + + def test_resolved_rustls_and_guarden_grants_are_reproduced(self): + base = ROOT / "config/easytier/supplemental" + apache = (base / "rustls-platform-verifier-android-0.1.1/LICENSE-APACHE").read_text() + self.assertIn("TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION", apache) + for relative in ["rustls-platform-verifier-android-0.1.1/LICENSE-MIT", "guarden-0.2.0/LICENSE", "guarden-macros-0.2.0/LICENSE"]: + self.assertIn("Permission is hereby granted", (base / relative).read_text()) + self.assertIn("THE SOFTWARE IS PROVIDED", (base / relative).read_text()) + + +if __name__ == "__main__": + unittest.main()