Private GIT

Skip to content
Snippets Groups Projects
Commit 26dec5ce authored by vx3r's avatar vx3r
Browse files

PreUp, PostUp, PreDown, PostDown added

parent 727b5c40
Branches
Tags
No related merge requests found
...@@ -35,6 +35,10 @@ func ReadServer() (*model.Server, error) { ...@@ -35,6 +35,10 @@ func ReadServer() (*model.Server, error) {
server.Address = "fd9f:6666::10:6:6:1/112, 10.6.6.1/24" server.Address = "fd9f:6666::10:6:6:1/112, 10.6.6.1/24"
server.Dns = "fd9f::10:0:0:2, 10.0.0.2" server.Dns = "fd9f::10:0:0:2, 10.0.0.2"
server.PersistentKeepalive = 16 server.PersistentKeepalive = 16
server.PreUp = "echo WireGuard PreUp"
server.PostUp = "echo WireGuard PostUp"
server.PreDown = "echo WireGuard PreDown"
server.PostDown = "echo WireGuard PostDown"
server.Created = time.Now().UTC() server.Created = time.Now().UTC()
server.Updated = server.Created server.Updated = server.Created
......
...@@ -15,4 +15,8 @@ type Server struct { ...@@ -15,4 +15,8 @@ type Server struct {
Endpoint string `json:"endpoint"` Endpoint string `json:"endpoint"`
PersistentKeepalive int `json:"persistentKeepalive"` PersistentKeepalive int `json:"persistentKeepalive"`
Dns string `json:"dns"` Dns string `json:"dns"`
PreUp string `json:"preUp"`
PostUp string `json:"postUp"`
PreDown string `json:"preDown"`
PostDown string `json:"postDown"`
} }
...@@ -217,6 +217,10 @@ Address = {{.}} ...@@ -217,6 +217,10 @@ Address = {{.}}
{{end}} {{end}}
ListenPort = {{.Server.ListenPort}} ListenPort = {{.Server.ListenPort}}
PrivateKey = {{.Server.PrivateKey}} PrivateKey = {{.Server.PrivateKey}}
PreUp = {{.Server.PreUp}}
PostUp = {{.Server.PostUp}}
PreDown = {{.Server.PreDown}}
PostDown = {{.Server.PostDown}}
{{$server := .Server}} {{$server := .Server}}
{{range .Clients}} {{range .Clients}}
{{if .Enable}} {{if .Enable}}
......
...@@ -55,6 +55,14 @@ ...@@ -55,6 +55,14 @@
</v-chip> </v-chip>
</template> </template>
</v-combobox> </v-combobox>
<v-text-field
v-model="server.preUp"
label="PreUp: script snippets which will be executed by bash before setting up the interface"
/>
<v-text-field
v-model="server.postUp"
label="PostUp: script snippets which will be executed by bash after setting up the interface"
/>
</v-col> </v-col>
<v-col cols="6"> <v-col cols="6">
<v-text-field <v-text-field
...@@ -96,6 +104,14 @@ ...@@ -96,6 +104,14 @@
</v-chip> </v-chip>
</template> </template>
</v-combobox> </v-combobox>
<v-text-field
v-model="server.preDown"
label="PreDown: script snippets which will be executed by bash before setting down the interface"
/>
<v-text-field
v-model="server.postDown "
label="PostDown : script snippets which will be executed by bash after setting down the interface"
/>
</v-col> </v-col>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment