Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

15.0.0: Rewrite in Nuxt and Typescript, Move to UI #1333

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft

Conversation

kaaax0815
Copy link
Member

@kaaax0815 kaaax0815 commented Aug 30, 2024

Description

This rewrites the UI and Server in Nuxt and Typescript
This moves env variables to be configurable in the ui

Motivation and Context

Many features requested here #1179 and in other places require better management of Database and UI.
The Database should support Atomic Writes and be typesafe.
The UI should be composed of components for reusability and easy maintenance.
The Users should be able to configure more stuff through the UI more easily.

If a stage is reached where a working baseline is reached without any regressions this will be merged. Further features will be added at a later stage.
This pr is very large (couldn't be avoided) even though this doesn't really add any features for the end-user aside from the onboarding. But new and important features will come Soon™

How has this been tested?

TODO

Screenshots (if appropriate):

TODO

Tracker

  • Database
  • Move Env Vars to Database
  • Cidr Support
  • IPv6 Support
  • Semver Support
  • Docs Support (GH Actions)
  • Deprecate Dockerless
  • UI (Feat: UI, General Improvements #1397)
  • Security Review
  • Regression Review (prometheus)
  • Testing Phase

@kaaax0815 kaaax0815 added priority: high type: epic A theme of work that contain sub-tasks labels Aug 30, 2024
@kaaax0815 kaaax0815 added this to the v15 milestone Aug 30, 2024
@kaaax0815 kaaax0815 self-assigned this Aug 30, 2024
@kaaax0815 kaaax0815 changed the title Rewrite in Nuxt and Typescript Rewrite in Nuxt and Typescript, Move to UI Aug 30, 2024
@kaaax0815 kaaax0815 mentioned this pull request Aug 30, 2024
4 tasks
@tetuaoro
Copy link
Contributor

type: epic 🤣

@kaaax0815
Copy link
Member Author

kaaax0815 commented Aug 30, 2024

type: epic 🤣

Not the adjective but the noun is meant here1 🤣

Footnotes

  1. https://en.wikipedia.org/wiki/User_story#Epic

@kaaax0815
Copy link
Member Author

kaaax0815 commented Sep 3, 2024

Insane Progress 🎉

Database is completely usable
Cidr Support implemented
All Env Vars are now configurable through the Database
Many Features (like Allowed IPs or Persistent Keepalive) already supported through the database

Anybody who wants to try the new features already and give feedback can use the development tag

@tetuaoro
Copy link
Contributor

tetuaoro commented Sep 3, 2024

What about WG_PATH and PORT envs ? Because some users (like me xD) need to configure them at startup.

@kaaax0815
Copy link
Member Author

kaaax0815 commented Sep 3, 2024

What about WG_PATH and PORT envs ? Because some users (like me xD) need to configure them at startup.

Port still works.
I'll add WG_PATH back in

We should add an Advanced Section for Variables like these as they require manual config to the run command or docker compose file. Or it has to stay a env var as this only makes sense before the database is created

@kaaax0815
Copy link
Member Author

Port still works. I'll add WG_PATH back in

Updated the Documentation in feat-ui, WG_PATH remains a Env Var

@kaaax0815
Copy link
Member Author

Noticed @tailwindcss/forms is installed but not activated inside the tailwind.config.ts 🤔

@kaaax0815
Copy link
Member Author

Good Progress yet again.
IPv6 Supported fully
Even more configurable through the database

Waiting now on @tetuaoro to update the ui.
Waiting on feedback on #1353 to implement permission system.

Backend (other than routes) is mostly done

@kaaax0815
Copy link
Member Author

@tetuaoro any update?

@pheiduck
Copy link
Contributor

pheiduck commented Sep 12, 2024

A Dynamic Copyright year would be nice, so when it's 2025
2021-2024 become 2021-2025 automated.
I know how to do this on Astro.

Something like:?

const year = new Date().getFullYear()
2021 - {year}

This will be the right one: https://stackoverflow.com/questions/57191154/how-to-show-current-year-in-vue-project

@kaaax0815
Copy link
Member Author

A Dynamic Copyright year would be nice, so when it's 2025
2021-2024 become 2021-2025 automated.

Yes can do that. But doesn't make much sense imo. The software as it was released than only has copyright upto then + it conveys the users that the software is more recent than It actually is

@kaaax0815
Copy link
Member Author

kaaax0815 commented Oct 7, 2024

IPv6 (Dual Stack) is now more or less forced.
If Client only supports IPv4/IPv6 there is no problem as you can simply use IPv4/IPv6 Address for the Endpoint (or use a Domain with A and AAAA record)
If Server doesn't support IPv4/IPv6 there could be problems with DNS

That Peers have IPv6 Addresses shouldn't be a problem as these are only local (should be supported everywhere?)
If problems arise on IPv4/IPv6-only servers there should be the option to disable IPv6 (maybe mutually exclusive IPv4)

@kaaax0815
Copy link
Member Author

Maybe we should replace crc32 with https://www.npmjs.com/package/js-xxhash
or just check if the one-time-code is already used.
mainly for users with large number of peers

@rah-emil
Copy link

Omg, long pull request so)
Maybe, you can to add API? I just need control clients with Ansible, and I don't have time for this feature

@kaaax0815
Copy link
Member Author

Omg, long pull request so)

?

Maybe, you can to add API?

?

I just need control clients with Ansible, and I don't have time for this feature

You can control clients with the API already. You would have to reverse engineer it tho as there is no documentation. This just adds a lot of features and rewrites the whole UI as stated in the description

@rah-emil
Copy link

You can control clients with the API already. You would have to reverse engineer it tho as there is no documentation. This just adds a lot of features and rewrites the whole UI as stated in the description

I need something like this (inside docker): docker compose exec wg-easy wg client create clientname # get ip, keys, docker compose exec wg-easy wg client delete clientname. You have it?

@kaaax0815
Copy link
Member Author

I need something like this (inside docker): docker compose exec wg-easy wg client create clientname # get ip, keys, docker compose exec wg-easy wg client delete clientname. You have it?

Unfortunately, this feature is not currently supported and there are no plans to implement it in the future. The primary purpose of wg-easy is its user interface. If you require terminal-based functionality, this project might not be the best fit for your needs.

@rah-emil
Copy link

rah-emil commented Oct 11, 2024

I need something like this (inside docker): docker compose exec wg-easy wg client create clientname # get ip, keys, docker compose exec wg-easy wg client delete clientname. You have it?

I see this: https://github.com/wg-easy/wg-easy/blob/master/src/lib/WireGuard.js
If you want, I can add CLI for current version

@kaaax0815
Copy link
Member Author

kaaax0815 commented Oct 11, 2024

I see this: https://github.com/wg-easy/wg-easy/blob/master/src/lib/WireGuard.js If you want, I can add CLI for current version

I appreciate your suggestion and the effort you’re willing to put in. However, I believe it’s best to wait for the current pull request to be completed, even though it might take some time.

While your help is highly valued, I don’t think adding a CLI fits the goals of this project at the moment. It could introduce additional maintenance burdens that we’re not prepared to handle right now.

(Would also be fundamentally incompatible with Nuxtnuxt/nuxt#29386; you could maybe write a shell Wrapper for the API?)

@pheiduck What are your opinions?

@rah-emil
Copy link

rah-emil commented Oct 13, 2024

you could maybe write a shell Wrapper for the API?)

Sorry, I just need cli now)

@JoyZzzzz
Copy link

With the expected IPv6 support, is it possible to enable and disable IPv6 on a per-user basis?

@kaaax0815
Copy link
Member Author

With the expected IPv6 support, is it possible to enable and disable IPv6 on a per-user basis?

Not as of now. Could be added if demand is high. I don't see a valid reason for it tho

@qvipin
Copy link

qvipin commented Nov 17, 2024

when might this be completed, and is this semi-stable to use?

@kaaax0815
Copy link
Member Author

@qvipin I hope by the end of the year. No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority: high type: epic A theme of work that contain sub-tasks
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

9 participants