Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
dccebfe16b | ||
|
a87e69e332 | ||
8fb910ddf9 | |||
158892f88c | |||
e462978154 | |||
3a7e4cd2ab | |||
4f16f92208 | |||
|
34dff39358 | ||
|
136431d493 | ||
|
4b9e07842d | ||
|
43105ba266 | ||
|
add6745475 | ||
|
2969eb3247 | ||
|
2c6e5cfa46 | ||
|
037c4df6e0 |
26
README.md
26
README.md
@ -23,13 +23,13 @@ Install Standalone
|
|||||||
### curl | bash
|
### curl | bash
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL https://git.daplie.com/Daplie/goldilocks.js/raw/v1.1/installer/get.sh | bash
|
curl -fsSL https://git.coolaj86.com/coolaj86/goldilocks.js/raw/v1.1/installer/get.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
### git
|
### git
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.daplie.com/Daplie/goldilocks.js
|
git clone https://git.coolaj86.com/coolaj86/goldilocks.js
|
||||||
pushd goldilocks.js
|
pushd goldilocks.js
|
||||||
git checkout v1.1
|
git checkout v1.1
|
||||||
bash installer/install.sh
|
bash installer/install.sh
|
||||||
@ -39,10 +39,10 @@ bash installer/install.sh
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# v1 in git (unauthenticated)
|
# v1 in git (unauthenticated)
|
||||||
npm install -g git+https://git@git.daplie.com:Daplie/goldilocks.js#v1
|
npm install -g git+https://git@git.coolaj86.com:coolaj86/goldilocks.js#v1
|
||||||
|
|
||||||
# v1 in git (via ssh)
|
# v1 in git (via ssh)
|
||||||
npm install -g git+ssh://git@git.daplie.com:Daplie/goldilocks.js#v1
|
npm install -g git+ssh://git@git.coolaj86.com:coolaj86/goldilocks.js#v1
|
||||||
|
|
||||||
# v1 in npm
|
# v1 in npm
|
||||||
npm install -g goldilocks@v1
|
npm install -g goldilocks@v1
|
||||||
@ -50,8 +50,16 @@ npm install -g goldilocks@v1
|
|||||||
|
|
||||||
### Uninstall
|
### Uninstall
|
||||||
|
|
||||||
|
Remove goldilocks and services:
|
||||||
|
|
||||||
```
|
```
|
||||||
rm -rf /srv/goldilocks/ /var/goldilocks/ /etc/goldilocks/ /opt/goldilocks/ /var/log/goldilocks/ /etc/tmpfiles.d/goldilocks.conf /etc/systemd/system/goldilocks.service /etc/ssl/goldilocks
|
rm -rf /opt/goldilocks/ /srv/goldilocks/ /var/goldilocks/ /var/log/goldilocks/ /etc/tmpfiles.d/goldilocks.conf /etc/systemd/system/goldilocks.service
|
||||||
|
```
|
||||||
|
|
||||||
|
Remove config as well
|
||||||
|
|
||||||
|
```
|
||||||
|
rm -rf /etc/goldilocks/ /etc/ssl/goldilocks
|
||||||
```
|
```
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
@ -73,7 +81,7 @@ We have service support for
|
|||||||
* launchd (macOS)
|
* launchd (macOS)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl https://git.daplie.com/Daplie/goldilocks.js/raw/master/install.sh | bash
|
curl https://git.coolaj86.com/coolaj86/goldilocks.js/raw/master/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
Modules & Configuration
|
Modules & Configuration
|
||||||
@ -404,7 +412,7 @@ sni = vpn.example.com
|
|||||||
connect = example.com:443
|
connect = example.com:443
|
||||||
```
|
```
|
||||||
|
|
||||||
3) [Use stunnel.js](https://git.daplie.com/Daplie/node-tunnel-client) as described in the "tunnel_server" section below.
|
3) [Use stunnel.js](https://git.coolaj86.com/coolaj86/tunnel-client.js) as described in the "tunnel_server" section below.
|
||||||
|
|
||||||
### tcp.forward
|
### tcp.forward
|
||||||
|
|
||||||
@ -608,7 +616,7 @@ mdns:
|
|||||||
You can discover goldilocks with `mdig`.
|
You can discover goldilocks with `mdig`.
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install -g git+https://git.daplie.com/Daplie/mdig.git
|
npm install -g git+https://git.coolaj86.com/coolaj86/mdig.js.git
|
||||||
|
|
||||||
mdig _cloud._tcp.local
|
mdig _cloud._tcp.local
|
||||||
```
|
```
|
||||||
@ -637,7 +645,7 @@ TODO
|
|||||||
* [ ] http - redirect based on domain name (not just path)
|
* [ ] http - redirect based on domain name (not just path)
|
||||||
* [ ] tcp - bind should be able to specify localhost, uniquelocal, private, or ip
|
* [ ] tcp - bind should be able to specify localhost, uniquelocal, private, or ip
|
||||||
* [ ] tcp - if destination host is omitted default to localhost, if dst port is missing, default to src
|
* [ ] tcp - if destination host is omitted default to localhost, if dst port is missing, default to src
|
||||||
* [ ] sys - `curl https://daplie.me/goldilocks | bash -s example.com`
|
* [ ] sys - `curl https://coolaj86.com/goldilocks | bash -s example.com`
|
||||||
* [ ] oauth3 - `example.com/.well-known/domains@oauth3.org/directives.json`
|
* [ ] oauth3 - `example.com/.well-known/domains@oauth3.org/directives.json`
|
||||||
* [ ] oauth3 - commandline questionnaire
|
* [ ] oauth3 - commandline questionnaire
|
||||||
* [x] modules - use consistent conventions (i.e. address vs host + port)
|
* [x] modules - use consistent conventions (i.e. address vs host + port)
|
||||||
|
@ -7,7 +7,7 @@ my_ver=master
|
|||||||
my_tmp=$(mktemp -d)
|
my_tmp=$(mktemp -d)
|
||||||
|
|
||||||
mkdir -p $my_tmp/opt/$my_name/lib/node_modules/$my_name
|
mkdir -p $my_tmp/opt/$my_name/lib/node_modules/$my_name
|
||||||
git clone https://git.daplie.com/Daplie/goldilocks.js.git $my_tmp/opt/$my_name/lib/node_modules/$my_name
|
git clone https://git.coolaj86.com/coolaj86/goldilocks.js.git $my_tmp/opt/$my_name/lib/node_modules/$my_name
|
||||||
|
|
||||||
echo "Installing to $my_tmp (will be moved after install)"
|
echo "Installing to $my_tmp (will be moved after install)"
|
||||||
pushd $my_tmp/opt/$my_name/lib/node_modules/$my_name
|
pushd $my_tmp/opt/$my_name/lib/node_modules/$my_name
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# #
|
# #
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
# See https://git.daplie.com/Daplie/daplie-snippets/blob/master/bash/http-get.sh
|
# See https://git.coolaj86.com/coolaj86/snippets/blob/master/bash/http-get.sh
|
||||||
|
|
||||||
_h_http_get=""
|
_h_http_get=""
|
||||||
_h_http_opts=""
|
_h_http_opts=""
|
||||||
|
@ -11,11 +11,13 @@ sed "s/MY_USER/$my_user/g" "$my_app_dist/$my_app_systemd_service" > "$my_app_dis
|
|||||||
sed "s/MY_GROUP/$my_group/g" "$my_app_dist/$my_app_systemd_service.2" > "$my_app_dist/$my_app_systemd_service"
|
sed "s/MY_GROUP/$my_group/g" "$my_app_dist/$my_app_systemd_service.2" > "$my_app_dist/$my_app_systemd_service"
|
||||||
rm "$my_app_dist/$my_app_systemd_service.2"
|
rm "$my_app_dist/$my_app_systemd_service.2"
|
||||||
safe_copy_config "$my_app_dist/$my_app_systemd_service" "$my_root/$my_app_systemd_service"
|
safe_copy_config "$my_app_dist/$my_app_systemd_service" "$my_root/$my_app_systemd_service"
|
||||||
|
$sudo_cmd chown root:root "$my_root/$my_app_systemd_service"
|
||||||
|
|
||||||
sed "s/MY_USER/$my_user/g" "$my_app_dist/$my_app_systemd_tmpfiles" > "$my_app_dist/$my_app_systemd_tmpfiles.2"
|
sed "s/MY_USER/$my_user/g" "$my_app_dist/$my_app_systemd_tmpfiles" > "$my_app_dist/$my_app_systemd_tmpfiles.2"
|
||||||
sed "s/MY_GROUP/$my_group/g" "$my_app_dist/$my_app_systemd_tmpfiles.2" > "$my_app_dist/$my_app_systemd_tmpfiles"
|
sed "s/MY_GROUP/$my_group/g" "$my_app_dist/$my_app_systemd_tmpfiles.2" > "$my_app_dist/$my_app_systemd_tmpfiles"
|
||||||
rm "$my_app_dist/$my_app_systemd_tmpfiles.2"
|
rm "$my_app_dist/$my_app_systemd_tmpfiles.2"
|
||||||
safe_copy_config "$my_app_dist/$my_app_systemd_tmpfiles" "$my_root/$my_app_systemd_tmpfiles"
|
safe_copy_config "$my_app_dist/$my_app_systemd_tmpfiles" "$my_root/$my_app_systemd_tmpfiles"
|
||||||
|
$sudo_cmd chown root:root "$my_root/$my_app_systemd_tmpfiles"
|
||||||
|
|
||||||
$sudo_cmd systemctl stop "${my_app_name}.service" >/dev/null 2>/dev/null || true
|
$sudo_cmd systemctl stop "${my_app_name}.service" >/dev/null 2>/dev/null || true
|
||||||
$sudo_cmd systemctl daemon-reload
|
$sudo_cmd systemctl daemon-reload
|
||||||
|
@ -7,10 +7,10 @@ set -u
|
|||||||
### IMPORTANT ###
|
### IMPORTANT ###
|
||||||
### VERSION ###
|
### VERSION ###
|
||||||
my_name=goldilocks
|
my_name=goldilocks
|
||||||
my_app_pkg_name=com.daplie.goldilocks.web
|
my_app_pkg_name=com.coolaj86.goldilocks.web
|
||||||
my_app_ver="v1.1"
|
my_app_ver="v1.1"
|
||||||
my_azp_oauth3_ver="v1.2"
|
my_azp_oauth3_ver="v1.2.3"
|
||||||
export NODE_VERSION="v8.9.0"
|
export NODE_VERSION="v8.9.3"
|
||||||
|
|
||||||
if [ -z "${my_tmp-}" ]; then
|
if [ -z "${my_tmp-}" ]; then
|
||||||
my_tmp="$(mktemp -d)"
|
my_tmp="$(mktemp -d)"
|
||||||
@ -29,7 +29,7 @@ my_npm="$NPM_CONFIG_PREFIX/bin/npm"
|
|||||||
|
|
||||||
|
|
||||||
my_app_dist=$my_tmp/opt/$my_name/lib/node_modules/$my_name/dist
|
my_app_dist=$my_tmp/opt/$my_name/lib/node_modules/$my_name/dist
|
||||||
installer_base="https://git.daplie.com/Daplie/goldilocks.js/raw/$my_app_ver"
|
installer_base="https://git.coolaj86.com/coolaj86/goldilocks.js/raw/$my_app_ver"
|
||||||
|
|
||||||
# Backwards compat
|
# Backwards compat
|
||||||
# some scripts still use the old names
|
# some scripts still use the old names
|
||||||
@ -71,13 +71,13 @@ pushd $my_tmp/opt/$my_name/lib/node_modules/$my_name
|
|||||||
$my_npm install
|
$my_npm install
|
||||||
popd
|
popd
|
||||||
pushd $my_tmp/opt/$my_name/lib/node_modules/$my_name/packages/assets
|
pushd $my_tmp/opt/$my_name/lib/node_modules/$my_name/packages/assets
|
||||||
OAUTH3_GIT_URL="https://git.daplie.com/Oauth3/oauth3.js.git"
|
OAUTH3_GIT_URL="https://git.oauth3.org/OAuth3/oauth3.js.git"
|
||||||
git clone ${OAUTH3_GIT_URL} oauth3.org || true
|
git clone ${OAUTH3_GIT_URL} oauth3.org || true
|
||||||
ln -s oauth3.org org.oauth3
|
ln -s oauth3.org org.oauth3
|
||||||
pushd oauth3.org
|
pushd oauth3.org
|
||||||
git remote set-url origin ${OAUTH3_GIT_URL}
|
git remote set-url origin ${OAUTH3_GIT_URL}
|
||||||
git checkout $my_azp_oauth3_ver
|
git checkout $my_azp_oauth3_ver
|
||||||
git pull
|
#git pull
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir -p jquery.com
|
mkdir -p jquery.com
|
||||||
@ -119,6 +119,8 @@ set -e
|
|||||||
source ./installer/my-user-my-group.sh
|
source ./installer/my-user-my-group.sh
|
||||||
echo "User $my_user Group $my_group"
|
echo "User $my_user Group $my_group"
|
||||||
|
|
||||||
|
source ./installer/install-system-service.sh
|
||||||
|
|
||||||
$sudo_cmd chown -R $my_user:$my_group $my_tmp/*
|
$sudo_cmd chown -R $my_user:$my_group $my_tmp/*
|
||||||
$sudo_cmd chown root:root $my_tmp/*
|
$sudo_cmd chown root:root $my_tmp/*
|
||||||
$sudo_cmd chown root:root $my_tmp
|
$sudo_cmd chown root:root $my_tmp
|
||||||
@ -126,7 +128,6 @@ $sudo_cmd chmod 0755 $my_tmp
|
|||||||
# don't change permissions on /, /etc, etc
|
# don't change permissions on /, /etc, etc
|
||||||
$sudo_cmd rsync -a --ignore-existing $my_tmp/ $my_root/
|
$sudo_cmd rsync -a --ignore-existing $my_tmp/ $my_root/
|
||||||
$sudo_cmd rsync -a --ignore-existing $my_app_dist/etc/$my_name/$my_name.yml $my_root/etc/$my_name/$my_name.yml
|
$sudo_cmd rsync -a --ignore-existing $my_app_dist/etc/$my_name/$my_name.yml $my_root/etc/$my_name/$my_name.yml
|
||||||
source ./installer/install-system-service.sh
|
|
||||||
|
|
||||||
# Change to admin perms
|
# Change to admin perms
|
||||||
$sudo_cmd chown -R $my_user:$my_group $my_root/opt/$my_name
|
$sudo_cmd chown -R $my_user:$my_group $my_root/opt/$my_name
|
||||||
|
1779
package-lock.json
generated
1779
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
34
package.json
34
package.json
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "goldilocks",
|
"name": "goldilocks",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6",
|
||||||
"description": "The node.js webserver that's just right, Greenlock (HTTPS/TLS/SSL via ACME/Let's Encrypt) and tunneling (RVPN) included.",
|
"description": "The node.js webserver that's just right, Greenlock (HTTPS/TLS/SSL via ACME/Let's Encrypt) and tunneling (RVPN) included.",
|
||||||
"main": "bin/goldilocks.js",
|
"main": "bin/goldilocks.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@git.daplie.com:Daplie/goldilocks.js.git"
|
"url": "git.coolaj86.com:coolaj86/goldilocks.js.git"
|
||||||
},
|
},
|
||||||
"author": "AJ ONeal <aj@daplie.com> (https://daplie.com/)",
|
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
|
||||||
"license": "(MIT OR Apache-2.0)",
|
"license": "(MIT OR Apache-2.0)",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node bin/goldilocks.js -p 8443 -d /tmp/"
|
"test": "node bin/goldilocks.js -p 8443 -d /tmp/"
|
||||||
@ -34,41 +34,41 @@
|
|||||||
"server"
|
"server"
|
||||||
],
|
],
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://git.daplie.com/Daplie/server-https/issues"
|
"url": "https://git.coolaj86.com/coolaj86/goldilocks.js/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://git.daplie.com/Daplie/goldilocks.js",
|
"homepage": "https://git.coolaj86.com/coolaj86/goldilocks.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bluebird": "^3.4.6",
|
"bluebird": "^3.4.6",
|
||||||
"body-parser": "git+https://github.com/expressjs/body-parser.git#1.16.1",
|
"body-parser": "1",
|
||||||
"commander": "^2.9.0",
|
"commander": "^2.9.0",
|
||||||
"deep-equal": "^1.0.1",
|
"deep-equal": "^1.0.1",
|
||||||
"dns-suite": "git+https://git@git.daplie.com/Daplie/dns-suite#v1",
|
"dns-suite": "1",
|
||||||
"express": "git+https://github.com/expressjs/express.git#4.x",
|
"express": "4",
|
||||||
"finalhandler": "^0.4.0",
|
"finalhandler": "^0.4.0",
|
||||||
"greenlock": "git+https://git.daplie.com/Daplie/node-greenlock.git#master",
|
"greenlock": "2.1",
|
||||||
"http-proxy": "^1.16.2",
|
"http-proxy": "^1.16.2",
|
||||||
"human-readable-ids": "git+https://git.daplie.com/Daplie/human-readable-ids-js#master",
|
"human-readable-ids": "1",
|
||||||
"ipaddr.js": "git+https://github.com/whitequark/ipaddr.js.git#v1.3.0",
|
"ipaddr.js": "v1.3",
|
||||||
"js-yaml": "^3.8.3",
|
"js-yaml": "^3.8.3",
|
||||||
"jsonschema": "^1.2.0",
|
"jsonschema": "^1.2.0",
|
||||||
"jsonwebtoken": "^7.4.0",
|
"jsonwebtoken": "^7.4.0",
|
||||||
"le-challenge-fs": "git+https://git.daplie.com/Daplie/le-challenge-webroot.git#master",
|
"le-challenge-fs": "2",
|
||||||
"le-challenge-sni": "^2.0.1",
|
"le-challenge-sni": "^2.0.1",
|
||||||
"le-store-certbot": "git+https://git.daplie.com/Daplie/le-store-certbot.git#master",
|
"le-store-certbot": "2",
|
||||||
"localhost.daplie.me-certificates": "^1.3.5",
|
"localhost.daplie.me-certificates": "^1.3.5",
|
||||||
"network": "^0.4.0",
|
"network": "^0.4.0",
|
||||||
"recase": "git+https://git.daplie.com/coolaj86/recase-js.git#v1.0.4",
|
"recase": "v1.0.4",
|
||||||
"redirect-https": "^1.1.0",
|
"redirect-https": "^1.1.0",
|
||||||
"request": "^2.81.0",
|
"request": "^2.81.0",
|
||||||
"scmp": "git+https://github.com/freewil/scmp.git#1.x",
|
"scmp": "1",
|
||||||
"serve-index": "^1.7.0",
|
"serve-index": "^1.7.0",
|
||||||
"serve-static": "^1.10.0",
|
"serve-static": "^1.10.0",
|
||||||
"server-destroy": "^1.0.1",
|
"server-destroy": "^1.0.1",
|
||||||
"sni": "^1.0.0",
|
"sni": "^1.0.0",
|
||||||
"socket-pair": "^1.0.3",
|
"socket-pair": "^1.0.3",
|
||||||
"socksv5": "0.0.6",
|
"socksv5": "0.0.6",
|
||||||
"stunnel": "git+https://git.daplie.com/Daplie/node-tunnel-client.git#v1",
|
"stunnel": "1.0",
|
||||||
"stunneld": "git+https://git.daplie.com/Daplie/node-tunnel-server.git#v1",
|
"stunneld": "0.9",
|
||||||
"tunnel-packer": "^1.3.0",
|
"tunnel-packer": "^1.3.0",
|
||||||
"ws": "^2.3.1"
|
"ws": "^2.3.1"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user