From ab50e998cb8ae245fb8ff40edc9d17879addc795 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 13 Dec 2024 13:46:12 +0100 Subject: Docs: Pre-build mermaid files without plugin --- docs/md/building-client.md | 77 ++-------------------------------------------- 1 file changed, 2 insertions(+), 75 deletions(-) (limited to 'docs/md/building-client.md') diff --git a/docs/md/building-client.md b/docs/md/building-client.md index 5c01872..77c4eaf 100644 --- a/docs/md/building-client.md +++ b/docs/md/building-client.md @@ -20,12 +20,7 @@ And finally the most important goal: ## Architecture In the previous section, we have already hinted a bit on the exact architecture. This section will expand upon it by giving a figure of the basic structure -```mermaid -graph TD; -A[Go]-- Compiles to -->B[C shared library .so/.dll]; -C[Language wrapper]-- Loads -->B -Client -- Uses --> C; -``` +![overview of shared library structure](./overview.mmd.svg) As can be seen by this architecture, there is an intermediate layer between the client and the *shared* library. This wrapper eases the way of loading this library and then defining a more language specific API for it. In the eduvpn-common repo, we currently only support a Python wrapper. Clients themselves can define their own wrapper @@ -55,75 +50,7 @@ The eduvpn-common library uses a finite state machine internally to keep track o ### FSM example The following is an example of the FSM when the client has obtained a Wireguard/OpenVPN configuration from an eduVPN server -```mermaid -graph TD - -style Deregistered fill:cyan -Deregistered(Deregistered) -->|Register| Main - -style Main fill:white -Main(Main) -->|Deregister| Deregistered - -style Main fill:white -Main(Main) -->|Add a server| AddingServer - -style Main fill:white -Main(Main) -->|Get a VPN config| GettingConfig - -style Main fill:white -Main(Main) -->|Already connected| Connected - -style AddingServer fill:white -AddingServer(AddingServer) -->|Authorize| OAuthStarted - -style OAuthStarted fill:white -OAuthStarted(OAuthStarted) -->|Authorized| Main - -style GettingConfig fill:white -GettingConfig(GettingConfig) -->|Invalid location| AskLocation - -style GettingConfig fill:white -GettingConfig(GettingConfig) -->|Invalid or no profile| AskProfile - -style GettingConfig fill:white -GettingConfig(GettingConfig) -->|Successfully got a configuration| GotConfig - -style GettingConfig fill:white -GettingConfig(GettingConfig) -->|Authorize| OAuthStarted - -style AskLocation fill:white -AskLocation(AskLocation) -->|Location chosen| GettingConfig - -style AskProfile fill:white -AskProfile(AskProfile) -->|Profile chosen| GettingConfig - -style GotConfig fill:white -GotConfig(GotConfig) -->|Get a VPN config again| GettingConfig - -style GotConfig fill:white -GotConfig(GotConfig) -->|VPN is connecting| Connecting - -style Connecting fill:white -Connecting(Connecting) -->|VPN is connected| Connected - -style Connecting fill:white -Connecting(Connecting) -->|Cancel connecting| Disconnecting - -style Connected fill:white -Connected(Connected) -->|VPN is disconnecting| Disconnecting - -style Disconnecting fill:white -Disconnecting(Disconnecting) -->|VPN is disconnected| Disconnected - -style Disconnecting fill:white -Disconnecting(Disconnecting) -->|Cancel disconnecting| Connected - -style Disconnected fill:white -Disconnected(Disconnected) -->|Connect again| GettingConfig - -style Disconnected fill:white -Disconnected(Disconnected) -->|Renew| OAuthStarted -``` +![finite state machine (FSM) of eduvpn-common](./fsm.mmd.svg) The current state is highlighted in the cyan color. -- cgit v1.2.3