Skip to content

Commit

Permalink
Merge pull request #49 from d3vilh/dev
Browse files Browse the repository at this point in the history
moving server.conf to new location
  • Loading branch information
d3vilh committed Feb 18, 2024
2 parents 804625a + 52c93b2 commit e2f452d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,12 @@ Check detailed subnets description on [here](https://github.com/d3vilh/openvpn-u
All the Server and Client configuration located in Docker volume and can be easely tuned. Here are tree of volume content:

```shell
|-- server.conf //OpenVPN server configuration file
|-- clients
| |-- your_client1.ovpn
|-- config
| |-- client.conf
| |-- easy-rsa.vars //EasyRSA vars draft, see below real vars file.
| |-- server.conf
|-- db
| |-- data.db //OpenVPN UI DB
|-- log
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

FROM DEFINE-YOUR-ARCH
LABEL maintainer="Mr.Philipp <[email protected]>"
LABEL version="0.9.4.1"
LABEL version="0.9.5.1"
WORKDIR /opt
EXPOSE 8080/tcp

Expand Down
2 changes: 1 addition & 1 deletion conf/easyrsa-vars.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ set_var EASYRSA_CA_EXPIRE {{ .EasyRSACaExpire }}
set_var EASYRSA_CERT_EXPIRE {{ .EasyRSACertExpire }}
set_var EASYRSA_CERT_RENEW {{ .EasyRSACertRenew }}
set_var EASYRSA_CRL_DAYS {{ .EasyRSACrlDays }}
# Auto generated by OpenVPN-UI v.0.9.4.1
# Auto generated by OpenVPN-UI v.0.9.5.1
2 changes: 1 addition & 1 deletion conf/openvpn-client-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ verb {{ .Verbose }}
<tls-crypt>
{{ .Ta }}
</tls-crypt>
# Auto generated by OpenVPN-UI v.0.9.4.1
# Auto generated by OpenVPN-UI v.0.9.5.1
2 changes: 1 addition & 1 deletion conf/openvpn-server-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ status-version {{ .OVConfigStatusLogVersion }}
{{ .CustomOptTwo }}
{{ .CustomOptThree }}

# Auto generated by OpenVPN-UI v.0.9.4.1
# Auto generated by OpenVPN-UI v.0.9.5.1
6 changes: 3 additions & 3 deletions controllers/ovconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (c *OVConfigController) Get() {
_ = besettings.Read("Profile")
c.Data["BeeSettings"] = &besettings

destPath := filepath.Join(state.GlobalCfg.OVConfigPath, "config/server.conf")
destPath := filepath.Join(state.GlobalCfg.OVConfigPath, "server.conf")
serverConf, err := os.ReadFile(destPath)
if err != nil {
logs.Error(err)
Expand Down Expand Up @@ -76,7 +76,7 @@ func (c *OVConfigController) Post() {
c.Data["Settings"] = &cfg
logs.Info("Settings data: %v", c.Data["Settings"])

destPath := filepath.Join(state.GlobalCfg.OVConfigPath, "config/server.conf")
destPath := filepath.Join(state.GlobalCfg.OVConfigPath, "server.conf")
logs.Info("Post: Saving configuration to file according to template")
err := config.SaveToFile(filepath.Join(c.ConfigDir, "openvpn-server-config.tpl"), cfg.Config, destPath)
if err != nil {
Expand Down Expand Up @@ -130,7 +130,7 @@ func (c *OVConfigController) Edit() {
c.Data["Settings"] = &cfg

//logs.Info("Starting Edit method in OVConfigController")
destPath := filepath.Join(state.GlobalCfg.OVConfigPath, "config/server.conf")
destPath := filepath.Join(state.GlobalCfg.OVConfigPath, "server.conf")

err := lib.ConfSaveToFile(destPath, c.GetString("ServerConfig"))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func CreateDefaultOVConfig(configDir string, ovConfigPath string, address string
} else {
logs.Debug(c)
}
serverConfig := filepath.Join(ovConfigPath, "config/server.conf")
serverConfig := filepath.Join(ovConfigPath, "server.conf")
if _, err = os.Stat(serverConfig); os.IsNotExist(err) {
if err = config.SaveToFile(filepath.Join(configDir, "openvpn-server-config.tpl"), c.Config, serverConfig); err != nil {
logs.Error(err)
Expand Down
2 changes: 1 addition & 1 deletion views/common/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<script src="/static/js/custom.js"></script>
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> 0.9.4.1
<b>Version</b> 0.9.5.1
</div>
<strong><a href="https://github.com/d3vilh/openvpn-ui" target="_blank"><i class="fa fa-fw fa-github" style="font-size: 17px;"></i>OpenVPN UI</a></strong>. Under the MIT <a href="https://github.com/d3vilh/openvpn-ui/blob/main/LICENSE" target="_blank">License</a>.
</footer>
Expand Down
2 changes: 1 addition & 1 deletion views/ovconfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ <h3 class="card-title">Configuration Template
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ .BeeSettings.OVConfigPath }}/config/server.conf</h4>
<h4 class="modal-title">{{ .BeeSettings.OVConfigPath }}/server.conf</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
</div>
Expand Down

0 comments on commit e2f452d

Please sign in to comment.