All Projects → notisrac → Softetheradmin

notisrac / Softetheradmin

Licence: gpl-3.0
A Web UI for SoftEther VPN Server

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Softetheradmin

Coreui Angularjs
CoreUI AngularJS is free AngularJS admin template based on Bootstrap 4
Stars: ✭ 101 (+129.55%)
Mutual labels:  admin, angularjs, admin-dashboard
Root Bootstrap 4 Admin Template With Angularjs Angular 2 Support
Root is Boostrap 4 Admin Template with Angular 2 and AngularJS support
Stars: ✭ 54 (+22.73%)
Mutual labels:  admin, angularjs, admin-dashboard
Coreui Free Bootstrap Admin Template
CoreUI is free bootstrap admin template
Stars: ✭ 11,038 (+24986.36%)
Mutual labels:  admin, angularjs, admin-dashboard
Clever Bootstrap 4 Admin Template With Angularjs Angular 2 Support
Clever is Boostrap 4 Admin Template with Angular 2 and AngularJS support
Stars: ✭ 98 (+122.73%)
Mutual labels:  admin, angularjs, admin-dashboard
Blur Admin
AngularJS Bootstrap Admin Panel Framework
Stars: ✭ 11,274 (+25522.73%)
Mutual labels:  admin, angularjs, admin-dashboard
Rademade admin
Best rails admin panel!
Stars: ✭ 40 (-9.09%)
Mutual labels:  admin, admin-dashboard
Kongdash
An elegant desktop client for Kong Admin API
Stars: ✭ 449 (+920.45%)
Mutual labels:  admin, admin-dashboard
React Material Admin
☄️React Material Admin is a React template built with Material-UI
Stars: ✭ 1,005 (+2184.09%)
Mutual labels:  admin, admin-dashboard
Cleopatra
Admin Dashboard Template Built On Tailwind CSS
Stars: ✭ 521 (+1084.09%)
Mutual labels:  admin, admin-dashboard
Admin On Rest
A frontend framework for building admin SPAs on top of REST services, using React and Material Design.
Stars: ✭ 392 (+790.91%)
Mutual labels:  admin, admin-dashboard
Vuetify Admin Dashboard
A Crud Admin panel made from Vue js and Vuetify
Stars: ✭ 481 (+993.18%)
Mutual labels:  admin, admin-dashboard
Ngx Admin
Customizable admin dashboard template based on Angular 10+
Stars: ✭ 23,286 (+52822.73%)
Mutual labels:  admin, admin-dashboard
Ng Admin
Add an AngularJS admin GUI to any RESTful API
Stars: ✭ 4,006 (+9004.55%)
Mutual labels:  admin, admin-dashboard
Vue Material Dashboard
Vue Material Dashboard - Open Source Material Design Admin
Stars: ✭ 403 (+815.91%)
Mutual labels:  admin, admin-dashboard
Ant Admin
基于 antd 的后台管理平台, 在 react 中玩转 D3.js
Stars: ✭ 455 (+934.09%)
Mutual labels:  admin, admin-dashboard
King Admin
king-admin是一个超酷的前后端分离的基础权限管理后台,前端:angularJs+bootstrap+gulp,后端:spring-boot+mybatis-plus(分java版和kotlin版)
Stars: ✭ 397 (+802.27%)
Mutual labels:  admin, angularjs
Vue Quasar Admin
Vue 2.0 admin-dashboard based on Quasar-Framework
Stars: ✭ 516 (+1072.73%)
Mutual labels:  admin, admin-dashboard
Viron
☕️ Automated Design-based Management Console.
Stars: ✭ 925 (+2002.27%)
Mutual labels:  admin, admin-dashboard
Jet Bridge
Jet Bridge – Admin Panel Framework for your application
Stars: ✭ 904 (+1954.55%)
Mutual labels:  admin, admin-dashboard
Ng Gentelella
An AngularJS admin interface based on the Gentelella bootstrap template markup.
Stars: ✭ 24 (-45.45%)
Mutual labels:  angularjs, admin-dashboard

SoftEtherAdmin: A Web UI for SoftEther VPN Server

SoftEtherAdmin is a web based UI for the SoftEther VPN server. Currently it only supports read operations, and the feature set is not complete! The UI design is the Light Bootstarp Dashboard theme by the lovely folks at Creative Tim.

Install

Prerequisites

Linux

Getting the files

First, you need to clone/download the files:

# GIT clone (Note: git should be installed on your system!)
cd /srv
sudo git clone https://github.com/notisrac/SoftEtherAdmin.git

## OR ##

# Download (Note: unzip should be installed on your system!)
wget -O SoftEtherAdmin.zip https://github.com/notisrac/SoftEtherAdmin/archive/master.zip
sudo unzip SoftEtherAdmin.zip -d /srv/SoftEtherAdmin

Restore npm packages

Before running the application, you must restore the npm packages!

cd /srv/SoftEtherAdmin
sudo npm install

Configure the application

Follow the instructions in the config section to set up the application. You should have a config something like this:

{
    "serverPort": 8000,
    "softEther" : {
        "address" : "localhost",
        "port" : 5555,
        "vpncmdPath" : "/usr/local/vpnserver/vpncmd",
        "password" : "supersecretpassword1"
    }
}

Test

At this stage the application should be runnable:

node app.js

Open another shell, and:

wget http://localhost:8000/

Managing

The recommended way of managing node.js apps is to use pm2:

# first, you need to install pm2 globally
npm install pm2 -g
# enter the dir wher SoftEtherAdmin is installed
cd /srv/SoftEtherAdmin
# Register the app with pm2
pm2 start app.js --name "softetheradmin" 

More info in the pm2 section

Web server

For serving the app through a web server, all you need to do is, configure the web server as a reverse proxy pointing to the application's port. nginx example:

server {
        listen 80;
        listen [::]:80;
        server_name SoftEtherAdmin;

        location / {
                proxy_pass http://localhost:8000; # <- this is where out app is listening
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }
}

Windows

Download the file https://github.com/notisrac/SoftEtherAdmin/archive/master.zip Then extract it to a folder. We will be using:

C:\NodeApps\

Restore npm packages

cd C:\NodeApps\SoftEtherAdmin
npm install

Configure the application

Follow the instructions in the config section to set up the application. You should have a config something like this:

{
    "serverPort": 8000,
    "softEther" : {
        "address" : "localhost",
        "port" : 5555,
        "vpncmdPath" : "C:\\Program Files\\SoftEther\\vpncmd.exe",
        "password" : "supersecretpassword1"
    }
}

Test

At this stage the application should be runnable:

node app.js

Open a browser, and navigate to: http://localhost:8000/

Managing

The recommended way of managing node.js apps is to use pm2:

# first, you need to install pm2 globally
npm install pm2 -g

Before you can use pm2 on windows, there are a few things that needs to be done:

pm2 folder

  • Create a folder for pm2: C:\NodeApps\_pm2

PM2_HOME environment variable

  • Create a new system level environment variable PM2_HOME, with the value C:\NodeApps\_pm2
  • (You are better off restarting windows, for changes to take effect)
  • Ensure that the variable is set up correctly echo %PM2_HOME%

Register the app in pm2

# enter the dir wher SoftEtherAdmin is installed
cd /srv/SoftEtherAdmin
# Register the app with pm2
pm2 start app.js --name "softetheradmin" 
# If everything went fine, save the config
pm2 save

Create a service out of pm2

We will do this with the help of pm2-windows-service

## Make sure, you do this in an ADMINISTRATOR cmd ##
# install
npm install -g pm2-windows-service
# Create the service
pm2-service-install -n PM2

Answer the setup questions like this:

  • ? Perform environment setup (recommended)? Yes
  • ? Set PM2_HOME? Yes
  • ? PM2_HOME value (this path should be accessible to the service user and should not contain any "user-context" variables [e.g. %APPDATA%]): C:\NodeApps_pm2
  • ? Set PM2_SERVICE_SCRIPTS (the list of start-up scripts for pm2)? No
  • ? Set PM2_SERVICE_PM2_DIR (the location of the global pm2 to use with the service)? [recommended] Yes
  • ? Specify the directory containing the pm2 version to be used by the service C:\USERS\NOTI\APPDATA\ROAMING\NPM\node_modules\pm2\index.js press enter
  • PM2 service installed and started.

Big thanks to Walter Accantelli for the Windows instructions: https://blog.cloudboost.io/nodejs-pm2-startup-on-windows-db0906328d75

More info in the pm2 section

Config

The configuration of the app is handled by the config node module (https://www.npmjs.com/package/config). By default you need to modify the config/default.json file:

{
    "serverPort": 8000,
    "softEther" : {
        "address" : "localhost",
        "port" : 5555,
        "vpncmdPath" : "/usr/local/vpnserver/vpncmd",
        "password" : "supersecretpassword1"
    }
}

Where:

  • serverPort: The port, where the node.js server should be listening. Note: if you install multiple instances of the app, each needs a different port!
  • address: Address of the VPN server. If you want to host this app on the same server as the VPN server, use localhost
  • port: The port of the VPN server
  • vpncmdPath: Absolute path to the vpncmd application. (On Windows, use double backslashes: c:\\...\\...!)
  • password: Server admin level password

Note: if you have cloned the repo, it is advisable to have the config in a config/local.json file. This way, when pulling new versions of the repo, your config is not overwritten!

More config file related info can be found here: https://github.com/lorenwest/node-config/wiki/Configuration-Files

pm2

pm2 is a process manager for node.js. It can monitor your app, launch it on server startup, etc.

Install:

npm install pm2 -g

Register the app with pm2

pm2 start app.js --name "softetheradmin" 

Check the current status of the app

pm2 show softetheradmin

List all apps manged by pm2

pm2 list

You can also stop pm2 stop softetheradmin and restart pm2 restart softetheradmin the app.

Troubleshooting

Run the app from the console

cd /srv/softetheradmin
node app.js

This should result in a Server listening on port: <PORT> message, where <PORT> is the value of the serverPort config setting. If there were error while starting the app or running it, it will be printed out here.

How the app is accessing VPN server data

It uses the vpncmd application, that is distributed with the SoftEther VPN Server installer. Here are two examples:

This one is run on a linux box, and retrieves the list of hubs:

/usr/local/vpnserver/vpncmd <SERVER>:<PORT> /SERVER /PASSWORD:<PASSWORD> /CSV /CMD HubList

This one is run on a windows machine, and executes all the commands in the scripts/vpncmd_hubinfofull.txt file on the selected hub:

"c:\Program Files\SoftEther VPN Client Manager\vpncmd_x64.exe" <SERVER>:<PORT> /SERVER /PASSWORD:<PASSWORD> /CSV /ADMINHUB:<HUBNAME> /IN:"scripts/vpncmd_hubinfofull.txt"

pm2 monitoring

pm2 monit

TODO

  • [ ] Add logging (use winston)
  • [ ] The second (third, etc.) api calls for the same resource should wait for the first one to finish
  • [ ] Display more information about the server and the hubs (ex.: ports, openVPN status, etc.)
  • [ ] Make server logs downloadable
  • [ ] Add functionality to modify settings of the server
  • [ ] Extract the softEther.js file into a standalone module once it is done
  • [ ] Make it a bit more colorful by adding SoftEther's icons (?)
  • [ ] User management??? (not quite sure, this is needed)

How to contribute

Pull requests are always welcome! :)

Screenshots

Dashboard Server Hub list Hub details 1 Hub details 2 Config

Analytics

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].