Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nathanwoodburn/hns-server
Collection of scripts to make setting up stuff related to Handshake easier
https://github.com/nathanwoodburn/hns-server
handshake handshake-protocol hns nginx proxy
Last synced: about 1 month ago
JSON representation
Collection of scripts to make setting up stuff related to Handshake easier
- Host: GitHub
- URL: https://github.com/nathanwoodburn/hns-server
- Owner: Nathanwoodburn
- License: agpl-3.0
- Created: 2023-01-17T00:46:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-01T14:49:17.000Z (11 months ago)
- Last Synced: 2024-02-01T16:28:00.176Z (11 months ago)
- Topics: handshake, handshake-protocol, hns, nginx, proxy
- Language: Shell
- Homepage:
- Size: 265 KB
- Stars: 20
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# HNS-server
+ [NGINX HNS](#nginx-hns)
+ [NGINX ICANN](#nginx-icann)
+ [Redirect/Mirror Automation](#automation)
+ [Varo Clone](varo)
+ [MariaDB Replication (after Varo cloning)](sql)
+ [Email Server](email)
+ [DoH Server](doh.md)
+ [HSD Scripts](hsd)
+ [Varo Auth](varo-auth)# NGINX-HNS
Run Installation scripts as below.
Then add A record to point to your server and add the TLSA generated by the script to your DNS.
Running these scripts without arguments will start the interactive mode which will ask you for each variable.
Variables should be in this format (changing as needed)
Domain: `woodburn` or for slds `nathan.woodburn`
Location: `/var/www/woodburn`
URL: `https://nathan.woodburn.au` or `https://nathan.woodburn.au/about`## Standard HNS domain with HTML content (TLD and Wildcard SLD)
This creates a website with TLD and SLD pointing to one directory.
This installs nginx as well as setup HNS domains.
Change directory into the directory containing your website files.
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/new`
`sudo chmod +x new`
`sudo ./new `## Standard HNS domain with HTML content (SLD only)
Same as above without wildcard.
This uses the prexisting SSL Cert.
So add the same TLSA DNS record as the previously generated one.
Change directory into the directory containing your website files.
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/addsld`
`sudo chmod +x addsld`
`sudo ./addsld ` #For example nathan.woodburn would be `sudo ./addsld woodburn nathan`## Proxy HNS domain to ICANN site (TLD and Wildcard SLD)
This will create a mirror of the ICANN site showing the Handshake domain in the url bar.`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/proxy`
`sudo chmod +x proxy`
`sudo ./proxy `Example proxy *.3dprintingservice -> nathan3dprinting.au
`sudo ./proxy 3dprintingservice https://nathan3dprinting.au`## Proxy HNS domain to ICANN site (SLD or TLD only)
This will create a mirror of the ICANN site showing the Handshake domain in the url bar.
This will only proxy the provided SLD or TLD.
Eg only proxy nathan.3dprintingservice
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/proxy-sld`
`sudo chmod +x proxy-sld`
`sudo ./proxy-sld nathan.3dprintingservice https://nathan3dprinting.au`## Redirect HNS domain to ICANN site (TLD and Wildcard SLD)
Replace proxy with redirect to do a redirect instead of a mirror (proxy).
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/redirect`
`sudo chmod +x redirect`
`sudo ./redirect `## Redirect HNS domain to ICANN site (SLD or TLD only)
Replace proxy with redirect to do a redirect instead of a mirror (proxy).
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/redirect-sld`
`sudo chmod +x redirect-sld`
`sudo ./redirect-sld nathan.3dprintingservice https://nathan3dprinting.au`## Forgot your TLSA record?
This script will find the TLSA record for you.
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/tlsa`
`sudo chmod +x tlsa`
`./tlsa `# NGINX-ICANN
## Standard ICANN domain with HTML content
First add A record to point to your server so Letsencrypt can generate you SSL cert.
Then run this script
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/newicann`
`sudo chmod +x newicann`
`sudo ./newicann `## Proxy ICANN domain to another ICANN site
Eg proxy 3dprinting.woodburn.au -> nathan3dprinting.au
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/proxyicann`
`sudo chmod +x proxyicann`
`sudo ./proxyicann 3dprinting.woodburn.au https://nathan3dprinting.au`## Redirect ICANN domain to another ICANN site
Eg redirect 3dprinting.woodburn.au -> nathan3dprinting.au
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/redirecticann`
`sudo chmod +x redirecticann`
`sudo ./redirecticann 3dprinting.woodburn.au https://nathan3dprinting.au`# Wordpress
## Wordpress with HNS domain
```sh
wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/wp.sh
sudo chmod +x wp.sh
sudo ./wp.sh
```If you want to have multiple wordpress sites on the same server you can use the following command to create a new wordpress site. The port offset only affects the port used for the wordpress site. The port used for the HNS domain will always be 80 & 443.
```sh
sudo ./wp.sh
```# Static html site from Git repo
```sh
wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/git.sh
sudo chmod +x git.sh
sudo ./git.sh
```# Automation
## csv File Format
The csv file should be format
`,`
Eg
`3dprintingservice,https://nathan3dprinting.au`
Please note you need a header row as this script will not use the first row of the csv file.## Proxy HNS domain to ICANN site
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/proxy-csv.sh`
`sudo chmod +x proxy-csv.sh`
`sudo ./proxy-csv.sh `## Redirect HNS domain to ICANN site
`wget https://raw.githubusercontent.com/Nathanwoodburn/HNS-server/main/redirect-csv.sh`
`sudo chmod +x redirect-csv.sh`
`sudo ./redirect-csv.sh `