diff --git a/CHANGELOG.md b/CHANGELOG.md index f908f871..a39520a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ As the whole setup has changed, we recommend to start from scratch. And import y - SQLite Database - Deprecated Dockerless Installations - Added Docker Volume Mount (`/lib/modules`) -- Removed ARMv6 and ARMv7 support +- Removed ARMv6 support - Connections over HTTP require setting the `INSECURE` env var - Changed license from CC BY-NC-SA 4.0 to AGPL-3.0-only - Added 2FA using TOTP diff --git a/docs/content/advanced/migrate/from-14-to-15.md b/docs/content/advanced/migrate/from-14-to-15.md index da9a0481..6dd069a6 100644 --- a/docs/content/advanced/migrate/from-14-to-15.md +++ b/docs/content/advanced/migrate/from-14-to-15.md @@ -7,7 +7,7 @@ This guide will help you migrate from `v14` to version `v15` of `wg-easy`. ## Changes - This is a complete rewrite of the `wg-easy` project. Therefore the configuration files and the way you interact with the project have changed. -- If you use armv6 or armv7, you can't migrate to `v15` yet. We are working on it. +- If you use armv6, you unfortunately won't be able to migrate to `v15`. - If you are connecting to the web ui via HTTP, you need to set the `INSECURE` environment variable to `true` in the new container. ## Migration @@ -42,7 +42,7 @@ docker-compose down Follow the instructions in the [Getting Started][docs-getting-started] or [Basic Installation][docs-examples] guide to start the new container. -In the setup wizard, select that you already already have a configuration file and upload the `wg0.json` file you downloaded in the backup step. +In the setup wizard, select that you already have a configuration file and upload the `wg0.json` file you downloaded in the backup step. [docs-getting-started]: ../../getting-started.md [docs-examples]: ../../examples/tutorials/basic-installation.md diff --git a/docs/content/examples/tutorials/basic-installation.md b/docs/content/examples/tutorials/basic-installation.md index 838cc6ea..80d03d0b 100644 --- a/docs/content/examples/tutorials/basic-installation.md +++ b/docs/content/examples/tutorials/basic-installation.md @@ -8,7 +8,7 @@ title: Basic Installation 1. You need to have a host that you can manage 2. You need to have a domain name or a public IP address -3. You need a supported architecture (x86_64, arm64) +3. You need a supported architecture (x86_64, arm64, armv7) 4. You need curl installed on your host ## Install Docker diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index 515a9272..a797291b 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -12,7 +12,7 @@ Before you can get started with deploying your own VPN, there are some requireme 1. You need to have a host that you can manage 2. You need to have a domain name or a public IP address -3. You need a supported architecture (x86_64, arm64) +3. You need a supported architecture (x86_64, arm64, armv7) ### Host Setup diff --git a/src/server/database/repositories/client/schema.ts b/src/server/database/repositories/client/schema.ts index 97c8e8a9..d6135be0 100644 --- a/src/server/database/repositories/client/schema.ts +++ b/src/server/database/repositories/client/schema.ts @@ -1,7 +1,7 @@ import { sql, relations } from 'drizzle-orm'; import { int, sqliteTable, text } from 'drizzle-orm/sqlite-core'; -import { oneTimeLink, user } from '../../schema'; +import { oneTimeLink, user, wgInterface } from '../../schema'; /** null means use value from userConfig */ @@ -13,6 +13,12 @@ export const client = sqliteTable('clients_table', { onDelete: 'restrict', onUpdate: 'cascade', }), + interfaceId: text('interface_id') + .notNull() + .references(() => wgInterface.name, { + onDelete: 'cascade', + onUpdate: 'cascade', + }), name: text().notNull(), ipv4Address: text('ipv4_address').notNull().unique(), ipv6Address: text('ipv6_address').notNull().unique(), @@ -51,4 +57,8 @@ export const clientsRelations = relations(client, ({ one }) => ({ fields: [client.userId], references: [user.id], }), + interface: one(wgInterface, { + fields: [client.interfaceId], + references: [wgInterface.name], + }), })); diff --git a/src/server/database/repositories/client/service.ts b/src/server/database/repositories/client/service.ts index 17e183ba..3e41869a 100644 --- a/src/server/database/repositories/client/service.ts +++ b/src/server/database/repositories/client/service.ts @@ -108,6 +108,7 @@ export class ClientService { name, // TODO: properly assign user id userId: 1, + interfaceId: 'wg0', expiresAt, privateKey, publicKey, @@ -171,6 +172,7 @@ export class ClientService { .values({ name, userId: 1, + interfaceId: 'wg0', privateKey, publicKey, preSharedKey, diff --git a/src/server/database/repositories/client/types.ts b/src/server/database/repositories/client/types.ts index 6b56abc2..0fcb5c7e 100644 --- a/src/server/database/repositories/client/types.ts +++ b/src/server/database/repositories/client/types.ts @@ -14,7 +14,7 @@ export type CreateClientType = Omit< export type UpdateClientType = Omit< CreateClientType, - 'privateKey' | 'publicKey' | 'preSharedKey' | 'userId' + 'privateKey' | 'publicKey' | 'preSharedKey' | 'userId' | 'interfaceId' >; const name = z