📝 working on draft readme
parent
1abf1d194c
commit
9e8e44eae0
|
@ -2,35 +2,43 @@
|
||||||
|
|
||||||
# PTTH
|
# PTTH
|
||||||
|
|
||||||
PTTH lets you run file servers from behind NAT / firewalls.
|
PTTH is a web server.
|
||||||
|
|
||||||
|
A web server has:
|
||||||
|
|
||||||
|
1. A public host
|
||||||
|
2. Files to serve
|
||||||
|
|
||||||
|
**With PTTH, the files can live outside of the public host.**
|
||||||
|
|
||||||
|
If you want to host 1 TB of files, normally you'd put them on the
|
||||||
|
cloud server:
|
||||||
|
|
||||||
```
|
```
|
||||||
HTTP clients ptth_server instances
|
Cloud
|
||||||
|
HTTP server ----> 1 TB of files
|
||||||
Firefox ---> | | <--- Server 1
|
^
|
||||||
Chromium --> | | <--- Server 2
|
Not cloud |
|
||||||
Wget ------> | ptth_relay | <--- Server 3
|
HTTP client
|
||||||
Curl ------> | | <--- Server 4
|
|
||||||
Reqwest ---> | | <--- Server 5
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Setup
|
But uploading 1 TB to the cloud is expensive and slow, even if
|
||||||
|
you're sending it to S3-like blob storage.
|
||||||
|
|
||||||
Pick a relay computer and a server computer.
|
With PTTH, the files can live outside of the cloud:
|
||||||
|
|
||||||
The relay must be able to accept incoming HTTP connections. If the relay
|
```
|
||||||
will be exposed to the Internet, you should use Nginx, Caddy, or Apache as a
|
Cloud
|
||||||
reverse proxy to terminate TLS in front of ptth_relay. Relays on the Internet
|
+-----> ptth_relay <------+
|
||||||
will typically have a domain name so that clients and servers can find them.
|
| |
|
||||||
|
Not cloud | |
|
||||||
|
HTTP client ptth_server
|
||||||
|
1 TB of files
|
||||||
|
```
|
||||||
|
|
||||||
The server must have read access to the files you want to serve, and it must
|
The PTTH server lives where the files live.
|
||||||
be able to make outgoing HTTP(S) connections to the relay. The server
|
The cloud host runs a relay which streams files from the end
|
||||||
does not need a static IP, since it won't accept any incoming HTTP connections.
|
server as the client demands.
|
||||||
|
|
||||||
Begin installing PTTH. Run `cargo install ptth_relay` on the relay and
|
For home users, this can save you money - The relay server
|
||||||
`cargo install ptth_server` on the server. ptth_server is manually tested on
|
doesn't need to store any of your files.
|
||||||
Windows and Linux. ptth_relay is manually tested on Linux only.
|
|
||||||
|
|
||||||
- Run ptth_relay on cloud host
|
|
||||||
- Configure ptth_server for relay, with auto keygen
|
|
||||||
- Add tripcode to relay config
|
|
||||||
|
|
Loading…
Reference in New Issue