Updated tree

master
Keith Irwin 2022-08-27 14:11:09 -06:00
parent 7d8524e3ee
commit ab5b1f43b9
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
12 changed files with 61 additions and 23 deletions

View File

@ -2,3 +2,15 @@
# client
printf 'Content-Type: text/plain\n\nHello client!'
#TODO List peers
# GET /
#TODO Add peer
# POST /
#TODO Delete peer
# DELETE /mypeer
#TODO Update peer
# UPDATE /mypeer

13
cgi/fed Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# fed
printf 'Content-Type: text/plain\n\nHello fed!\n'
#TODO Add peer
# POST /
#TODO Delete peer
# DELETE /mypeer
#TODO Update peer
# UPDATE /mypeer

View File

@ -1,4 +0,0 @@
#!/bin/sh
# lib/ns_send
printf 'ns_send\n'

View File

@ -1,4 +0,0 @@
#!/bin/sh
# peer_send
printf 'peer_send\n'

View File

@ -1,3 +0,0 @@
#!/bin/sh
printf 'wg_send\n'

View File

@ -1,6 +0,0 @@
#!/bin/sh
# peer
printf 'Content-Type: text/plain\n\nHello peer!\n'
printf "$(lib/ns_send)\n"
printf "$(lib/wg_send)\n"

4
cgi/send/fed Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
# send/fed
printf 'send/fed\n'

4
cgi/send/ns Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
# send/ns
printf 'send/ns\n'

4
cgi/send/wg Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
# send/wg
printf 'send/wg\n'

9
client/index.html Normal file
View File

@ -0,0 +1,9 @@
<html>
<head>
<title>Wireguard Dashboard</title>
</head>
<body>
<script src="index.js">
</body>
</html>

0
client/index.js Normal file
View File

View File

@ -3,15 +3,24 @@ server {
listen 8080;
gzip off;
autoindex on;
location /peer {
location / {
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
include /etc/nginx/fastcgi.conf;
# fastcgi_param SCRIPT_FILENAME /home/ki9/src/wgapi/wgapi.sh;
root /home/ki9/src/wgapi/cgi;
fastcgi_index peer;
fastcgi_index client;
}
}
server {
server_name localhost;
listen 8081;
gzip off;
autoindex on;
location / {
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
include /etc/nginx/fastcgi.conf;
root /home/ki9/src/wgapi/cgi;
fastcgi_index fed;
}
}