Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https interface for user management #648

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
forgotten files added
  • Loading branch information
nanda committed Mar 27, 2021
commit 4bc499daa650f7e6b2ab6c3c863641a61d596747
11 changes: 11 additions & 0 deletions lighttpd/htdocs/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
table, th, td {
padding: 5px;
}

th {
border: 1px solid black;
}

tr {
height: 12px;
}
18 changes: 18 additions & 0 deletions lighttpd/htdocs/user_config.cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

MY_PATH=$(readlink -f "$BASH_SOURCE")
MYDIR=$(dirname "$MY_PATH")
. "$MYDIR/defs"


username=$(parse_arg username)
[ "$?" != 0 -o -z "$username" ] && echo -e "$HEAD\n no valid user supplied!\n$END" && exit 1

CONFIG=$(ovpn_getclient "$username")
[ -z "$CONFIG" -o $? != 0 ] && echo -e "$HEAD error generating config for user $username\n$END" && exit 1

echo "Content-type: application/x-openvpn-profile"
echo "Content-Disposition:attachment; filename=$username.ovpn"
echo ""
echo "$CONFIG"