Skip to content

Commit e3d9c9a

Browse files
authored
Merge pull request #53 from Start9Labs/proxies
Gateways, DNS, Private Domains, Public Domains, etc
2 parents 3a2ee09 + 45bdd20 commit e3d9c9a

File tree

33 files changed

+385
-273
lines changed

33 files changed

+385
-273
lines changed

src/README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ Here you will find everything you need to set up and use your Start9 server. For
1010
- [Trusting Your Root CA](user-manual/trust-ca.md)
1111
- [Connecting Locally](user-manual/connecting-locally.md)
1212
- [Connecting Remotely](user-manual/connecting-remotely/)
13-
- [Router VPN](user-manual/connecting-remotely/router-vpn.md)
14-
<!-- - [Cloud VPN](user-manual/connecting-remotely/cloud-vpn.md) -->
13+
- [VPN](user-manual/connecting-remotely/vpn.md)
1514
- [Clearnet](user-manual/connecting-remotely/clearnet.md)
1615
- [Tor](user-manual/connecting-remotely/tor.md)
1716
- [Installing Services](user-manual/installing-services.md)
17+
- [Gateways](user-manual/gateways.md)
18+
- [DNS](user-manual/dns.md)
19+
- [Certificate Authorities](user-manual/authorities.md)
20+
- [Private Domains](user-manual/private-domains.md)
1821
- [Creating Backups](user-manual/backup-create.md)
1922
- [Restoring Backups](user-manual/backup-restore.md)
2023
- [Updating StartOS](user-manual/updating-startos.md)
21-
- [Sending emails](user-manual/smtp.md)
22-
- [Using SSH](user-manual/ssh.md)
24+
- [Sending Emails](user-manual/smtp.md)
25+
- [SSH](user-manual/ssh.md)
2326

2427
### [💾 Flashing Guides](flashing-guides/)
2528

@@ -99,14 +102,16 @@ Here you will find everything you need to set up and use your Start9 server. For
99102

100103
---
101104

102-
- [Firefox Guides](misc-guides/firefox-guides/)
103-
- [Trusting Your Root CA](misc-guides/firefox-guides/ca.md)
104-
- [Enabling Tor](misc-guides/firefox-guides/tor.md)
105-
- [Thunderbird Guides](misc-guides/thunderbird-guides.md)
105+
- [Setting up Dynamic DNS](misc-guides/dynamic-dns.md)
106+
- [Installing StartTunnel on a VPS](misc-guides/start-tunnel.md)
106107
- [Getting SMTP Credentials](misc-guides/smtp-credentials.md)
107108
- [Resetting Your Password](misc-guides/reset-password.md)
108109
- [Upgrading from a Raspberry Pi](misc-guides/upgrade-pi.md)
109110
- [Migrating LND to StartOS](misc-guides/lnd-migration.md)
111+
- [Firefox Guides](misc-guides/firefox-guides/)
112+
- [Trusting Your Root CA](misc-guides/firefox-guides/ca.md)
113+
- [Enabling Tor](misc-guides/firefox-guides/tor.md)
114+
- [Thunderbird Guides](misc-guides/thunderbird-guides.md)
110115

111116
### [📦 Packaging Guide](packaging-guide/)
112117

src/SUMMARY.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@
1010
- [Trusting Your Root CA](user-manual/trust-ca.md)
1111
- [Connecting Locally](user-manual/connecting-locally.md)
1212
- [Connecting Remotely](user-manual/connecting-remotely/README.md)
13-
- [Router VPN](user-manual/connecting-remotely/router-vpn.md)
14-
<!-- - [Cloud VPN](user-manual/connecting-remotely/cloud-vpn.md) -->
13+
- [VPN](user-manual/connecting-remotely/vpn.md)
1514
- [Clearnet](user-manual/connecting-remotely/clearnet.md)
1615
- [Tor](user-manual/connecting-remotely/tor.md)
1716
- [Installing Services](user-manual/installing-services.md)
17+
- [Gateways](user-manual/gateways.md)
18+
- [DNS](user-manual/dns.md)
19+
- [Certificate Authorities](user-manual/authorities.md)
20+
- [Private Domains](user-manual/private-domains.md)
1821
- [Creating Backups](user-manual/backup-create.md)
1922
- [Restoring Backups](user-manual/backup-restore.md)
2023
- [Updating StartOS](user-manual/updating-startos.md)
21-
- [Sending emails](user-manual/smtp.md)
22-
- [Using SSH](user-manual/ssh.md)
24+
- [Sending Emails](user-manual/smtp.md)
25+
- [SSH](user-manual/ssh.md)
2326

2427
- [💾 Flashing Guides](flashing-guides/README.md)
2528

@@ -132,14 +135,16 @@
132135

133136
- [📚 Misc Guides](misc-guides/README.md)
134137

135-
- [Firefox Guides](misc-guides/firefox-guides/README.md)
136-
- [Trusting Your Root CA](misc-guides/firefox-guides/ca.md)
137-
- [Enabling Tor](misc-guides/firefox-guides/tor.md)
138-
- [Thunderbird Guides](misc-guides/thunderbird-guides.md)
138+
- [Setting up Dynamic DNS](misc-guides/dynamic-dns.md)
139+
- [Installing StartTunnel on a VPS](misc-guides/start-tunnel.md)
139140
- [Getting SMTP Credentials](misc-guides/smtp-credentials.md)
140141
- [Resetting Your Password](misc-guides/reset-password.md)
141142
- [Upgrading from a Raspberry Pi](misc-guides/upgrade-pi.md)
142143
- [Migrating LND to StartOS](misc-guides/lnd-migration.md)
144+
- [Firefox Guides](misc-guides/firefox-guides/README.md)
145+
- [Trusting Your Root CA](misc-guides/firefox-guides/ca.md)
146+
- [Enabling Tor](misc-guides/firefox-guides/tor.md)
147+
- [Thunderbird Guides](misc-guides/thunderbird-guides.md)
143148

144149
- [📦 Packaging Guide](packaging-guide/README.md)
145150

src/device-guides/android/vpn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Follow this guide to connect your Android/Graphene device to your Router VPN in
44

55
#### Prerequisites
66

7-
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/router-vpn.md)
7+
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/vpn.md)
88

99
#### Contents
1010

src/device-guides/ios/vpn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Follow this guide to connect your iOS device to your Router VPN in order to acce
44

55
#### Prerequisites
66

7-
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/router-vpn.md)
7+
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/vpn.md)
88

99
#### Contents
1010

src/device-guides/linux/vpn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Follow this guide to connect your Linux device to your Router VPN in order to ac
44

55
#### Prerequisites
66

7-
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/router-vpn.md)
7+
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/vpn.md)
88

99
#### Contents
1010

src/device-guides/mac/vpn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Follow this guide to connect your Mac device to your Router VPN in order to acce
44

55
#### Prerequisites
66

7-
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/router-vpn.md)
7+
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/vpn.md)
88

99
#### Contents
1010

src/device-guides/windows/vpn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Follow this guide to connect your Windows device to your Router VPN in order to
44

55
#### Prerequisites
66

7-
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/router-vpn.md)
7+
- [Connecting Remotely - Router VPN](../../user-manual/connecting-remotely/vpn.md)
88

99
#### Contents
1010

src/misc-guides/dynamic-dns.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Setting up Dynamic DNS
2+
3+
Your ISP may unexpectedly change the IP address of your home.
4+
5+
- If you are using your router as a VPN server for private, remote access, this will cause every authorized client to be disconnected until you re-download configuration files for each client.
6+
7+
- If you are using your router as a gateway for clearnet, domains use it will be unreachable until you update their DNS settings.
8+
9+
To prevent service interruption, you can enable <a href="https://en.wikipedia.org/wiki/Dynamic_DNS" target="_blank">dynamic DNS</a>. Many routers offer this as a free or paid service. If not, there are third party services available.

src/misc-guides/start-tunnel.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Installing StartTunnel on a VPS
2+
3+
## Use Case
4+
5+
You can think of StartTunnel as a "virtual router in the cloud", resulting in a new gateway your server can use to expose service interfaces to the public Internet.
6+
7+
## Instructions
8+
9+
1. Rent a VPS from a provider of your choosing. Make sure it has at least 500MB of Memory (RAM). For transfer (bandwidth), a good rule of thumb is to match your home Internet's maximum _upload_ speed, since that will generally be the bottleneck anyway. Any amount of storage is fine. The cheapest, lowest-powered option is usually enough.
10+
11+
1. Provision the VPS with the latest version of Debian.
12+
13+
1. Access the VPS via SSH.
14+
15+
1. Install start-tunnel: `curl -fsSL https://start9.com/... | bash`.
16+
17+
1. Upon completion, your Wireguard config will display in the terminal. Copy the contents to your clipboard and follow instructions to [add your new gateway to StartOS](../user-manual/gateways.md#adding-a-gateway)

src/packaging-guide/important-info.md

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,39 @@
22

33
#### contents
44

5-
- [SDK embedded docs](#start-sdk-embedded-documentation)
6-
- [Container initialization](#container-initialization)
5+
- [start-sdk embedded docs](#start-sdk-embedded-docs)
6+
- [Container init](#container-init)
77
- [File Models](#file-models)
88

9-
## start-sdk embedded documentation
9+
## start-sdk embedded docs
1010

1111
When working with start-sdk in a package codebase, hover states reveal descriptions, type definitions, and example usages of just about everything. If you are wondering what a function does or how to use, hovering over the function name. If you are wondering what attributes can be included in an object, press `ctrl + space` inside the object.
1212

13-
## Container initialization
13+
### Container init
1414

15-
### Service containers are built/created:
15+
Service containers are initialized when:
1616

17-
- When the service is freshly installed.
18-
- When the service is updated or downgraded.
19-
- On StartOS boot.
20-
- If the user manually triggers a rebuild.
17+
- When the service is freshly installed
18+
- When the service is updated or downgraded
19+
- On StartOS boot
20+
- If the user manually triggers a rebuild
2121

22-
### Service container initialization sequence. Each of the below are functions in start-sdk:
22+
## File Models
2323

24-
This means, for example, that the results of `setupDependencies()` are not available to `setupInterfaces()` on initialization.
24+
Many services have configuration files, such as a config.toml. With start-sdk, these files can and should be represented as "File Models" in the file-models directory. Here you create a Typescript definition of the file, providing type protection throughout the codebase. File Models can also enforce types _at runtime_. For example, if a json file expects a "name" key to be a string and the user uses SSH to enter a number instead, you can coerce the value back to a string and protect the user from themselves. File Models provide automatic parsing/serialization for `.json`, `.yaml`, `.toml`, `.ini`, and `.env`. For custom file types (e.g. `.conf`) you can provide a custom parser/serializer.
2525

26-
1. `initStore()`: (runs once ever, only on fresh install)
27-
1. `setupPreInstall()` (run once ever, only on fresh install)
28-
1. `setupInterfaces()`
29-
1. `Any actions passed to Actions.of()`
30-
1. `setupExposeStore()`
31-
1. `setupDependencies()`
32-
1. `setupPostInstall()` (runs once ever, only on fresh install)
33-
1. `The [up or down] migration of the first version provided to VersionGraph.of()` (update only)
34-
1. `setupMain()`
26+
### Reading files
3527

36-
## File Models
28+
File Models have a `read()` method that take an optional mapping if you only care to read a subset of the file.
3729

38-
Many services have configuration files, such as a config.toml. With start-sdk, these files can and should be represented as a File Model in the file-models directory. Here you create a Typescript definition of the file, providing type protection throughout the codebase. File Models can also enforce types _at runtime_. For example, if a json file expects a "name" key to be a string and the user uses SSH to enter a number instead, you can coerce the value back to a string and protect the user from themselves. File Models provide automatic parsing/serialization for `.json`, `.yaml`, `.toml`, `.ini`, and `.env`. For custom file types (e.g. `.conf`) you can provide your own parser/serializer.
30+
- `FileModel.read().once()` will return the entire file
31+
- `FileModel.read(f => f.users).once()` will return only the contents of "users".
3932

40-
## Reading File Models and Store values
33+
### Options for reading
4134

4235
When you access a File Model or Store value, you must choose between:
4336

4437
- `.once()`: returns the parsed file or Store value and nothing else.
45-
- `.const()`: returns the parsed file or Store value, and registers an OS task to re-run the context function if the file or value changes. For example, a `.const()` used to get a "name" value from the Store in `setupInterfaces()` would result in `setupInterfaces()` re-running if the "name" value changes.
46-
- `.onChange()`: registers an OS tak to run a callback function that accepts the new file or value. For example, `.onChange((newFileOrValue) => { // do stuff })`
47-
- `watch()`: returns an async iterator of the new file or value. @TODO provide an example
38+
- `.const(effects)`: returns the parsed file or Store value, and registers an OS task to re-run the context function if the file or nested value of interest changes. For example, if you did `FileModel.read(f => f.name).const(effects)` in `setupInterfaces()`, then `setupInterfaces()` would re-run whenever "name" changes.
39+
- `.onChange(effects)`: registers an OS tak to run a callback function that accepts the new file or value. For example, `FileModel.read().onChange((file) => { // do stuff })`
40+
- `watch(effects)`: returns an async iterator of the new file or value.

0 commit comments

Comments
 (0)