Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wg-gen-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
wg-gen-web
Commits
26dec5ce
Commit
26dec5ce
authored
Feb 5, 2020
by
vx3r
Browse files
Options
Downloads
Patches
Plain Diff
PreUp, PostUp, PreDown, PostDown added
parent
727b5c40
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
core/server.go
+4
-0
4 additions, 0 deletions
core/server.go
model/server.go
+4
-0
4 additions, 0 deletions
model/server.go
template/template.go
+4
-0
4 additions, 0 deletions
template/template.go
ui/src/views/Home.vue
+16
-0
16 additions, 0 deletions
ui/src/views/Home.vue
with
28 additions
and
0 deletions
core/server.go
+
4
−
0
View file @
26dec5ce
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
model/server.go
+
4
−
0
View file @
26dec5ce
...
@@ -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"`
}
}
This diff is collapsed.
Click to expand it.
template/template.go
+
4
−
0
View file @
26dec5ce
...
@@ -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}}
...
...
This diff is collapsed.
Click to expand it.
ui/src/views/Home.vue
+
16
−
0
View file @
26dec5ce
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment