diff --git a/.gitignore b/.gitignore index 20624e5b..562b2ee7 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,6 @@ captures/ # Android Profiling *.hprof client/3rd/ShadowSocks/ss_ios.xcconfig + +# UML generated pics +out/ \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..70328bbf --- /dev/null +++ b/docs/README.md @@ -0,0 +1,3 @@ +To convert the text description of the chart into an image, you can use: +* Any online service, just google plantuml online +* Install plugin for vscode - PlantUML \ No newline at end of file diff --git a/docs/configs/serverConfigImportProcess.plantuml b/docs/configs/serverConfigImportProcess.plantuml new file mode 100644 index 00000000..c9acfc86 --- /dev/null +++ b/docs/configs/serverConfigImportProcess.plantuml @@ -0,0 +1,23 @@ +@startuml serverConfigImportProcess +start + +:import server config in any format; +:decode server config into json; + +if (server config contains valid server credentials || containers) then (yes) + :show json server config to user; + if (user clicked continue import) then (yes) + :append server config to app internal settings; + else (no) + :do nothing; + endif +else (no) + :show error; + note right + now only output to the log + end note + stop +endif + +stop +@enduml \ No newline at end of file diff --git a/docs/configs/serverConfigProcessingOnConnection.plantuml b/docs/configs/serverConfigProcessingOnConnection.plantuml new file mode 100644 index 00000000..30c3188d --- /dev/null +++ b/docs/configs/serverConfigProcessingOnConnection.plantuml @@ -0,0 +1,20 @@ +@startuml configProcessingOnConnection +start + +:connect button clicked; +:createVpnConfiguration(); +:createVpnConfigurationForProto(); + +if (serverConfig.contains(lastConfigStorage)) then (yes) + :download native config from lastConfigStorage; +else if (serverConfig.contains(last_config)) then (yes) + :do nothing special; +else if (serverConfig.contains(admin credentials)) then (yes) + :generate new native config; +else + :return empty config and error; + stop +endif +:continue connect process; +stop +@enduml \ No newline at end of file diff --git a/docs/configs/wireguard/amneziaWireGuardAdminConfigV1.plantuml b/docs/configs/wireguard/amneziaWireGuardAdminConfigV1.plantuml new file mode 100644 index 00000000..192c7998 --- /dev/null +++ b/docs/configs/wireguard/amneziaWireGuardAdminConfigV1.plantuml @@ -0,0 +1,20 @@ +@startjson +{ + "containers : array": + { + "container : string": "amnezia-wireguard", + "wireguard : array": + { + "last_config : string": "native wireguard config", + "port : string": "port number", + "transport_proto : string": "udp" + } + }, + "defaultContainer : string": "amnezia-wireguard", + "description : string": "server name alias", + "hostName : string": "server address", + "password : string": "password for user", + "port : string": "port number", + "userName : string": "user for ssh connection" +} +@endjson \ No newline at end of file diff --git a/docs/configs/wireguard/amneziaWireGuardClientConfigV1.plantuml b/docs/configs/wireguard/amneziaWireGuardClientConfigV1.plantuml new file mode 100644 index 00000000..e35fedd7 --- /dev/null +++ b/docs/configs/wireguard/amneziaWireGuardClientConfigV1.plantuml @@ -0,0 +1,20 @@ +@startjson +{ + "containers : array": + { + "container : string": "amnezia-wireguard", + "wireguard : array": + { + "isThirdPartyConfig : bool": "depends on import source", + "last_config : string": "native wireguard config", + "port : string": "port number", + "transport_proto : string": "udp" + } + }, + "defaultContainer : string": "amnezia-wireguard", + "description : string": "server name alias", + "dns1 : string": "dns address", + "dns2 : string": "dns address", + "hostName : string": "server address" +} +@endjson \ No newline at end of file diff --git a/docs/configs/wireguard/amneziaWireGuardClientConfigV2.plantuml b/docs/configs/wireguard/amneziaWireGuardClientConfigV2.plantuml new file mode 100644 index 00000000..e7ed24a2 --- /dev/null +++ b/docs/configs/wireguard/amneziaWireGuardClientConfigV2.plantuml @@ -0,0 +1,22 @@ +@startjson +{ + "containers : array": + { + "container : string": "amnezia-wireguard", + "wireguard : array": + { + "isThirdPartyConfig : bool": "depends on import source", + "last_config : string": "native wireguard config", + "port : string": "port number", + "transport_proto : string": "udp" + } + }, + "defaultContainer : string": "amnezia-wireguard", + "description : string": "server name alias", + "dns1 : string": "dns address", + "dns2 : string": "dns address", + "hostName : string": "server address", + "version : number": "2", + "lastConfigStorage : string": "storage address" +} +@endjson \ No newline at end of file