added documentation describing the process of importing a server config
- added documentation describing the processing of the server config when trying to open a VPN connection - added documentation describing config for wireguard
This commit is contained in:
parent
ee609f3e8f
commit
ebd287d4b8
7 changed files with 111 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -127,3 +127,6 @@ captures/
|
|||
# Android Profiling
|
||||
*.hprof
|
||||
client/3rd/ShadowSocks/ss_ios.xcconfig
|
||||
|
||||
# UML generated pics
|
||||
out/
|
||||
3
docs/README.md
Normal file
3
docs/README.md
Normal file
|
|
@ -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
|
||||
23
docs/configs/serverConfigImportProcess.plantuml
Normal file
23
docs/configs/serverConfigImportProcess.plantuml
Normal file
|
|
@ -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
|
||||
20
docs/configs/serverConfigProcessingOnConnection.plantuml
Normal file
20
docs/configs/serverConfigProcessingOnConnection.plantuml
Normal file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue