summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSimeon Simeonov2023-07-07 10:04:04 +0200
committerSimeon Simeonov2023-07-07 10:04:04 +0200
commitc4cc9c90b3546e72efbaeb9cb632b9d98288bac1 (patch)
treec3ca05b349f719ecc1afd2ebb7016373f030d7c1 /README.md
parente62d7c5ea3bc014123cf6f78e5345c588cd4f068 (diff)
Add basic https support and format the code using black -S
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 16 insertions, 4 deletions
diff --git a/README.md b/README.md
index 670720a..b5409c6 100644
--- a/README.md
+++ b/README.md
@@ -31,8 +31,8 @@ To my amazement I wasn't able to find any free software matching that criteria.
31The main purpose of *ngus* is to accept file uploads as POST requests from an 31The main purpose of *ngus* is to accept file uploads as POST requests from an
32HTTP client. 32HTTP client.
33 33
34Currently *ngus* does not provide encryption (HTTPS) support. Many different 34Currently *ngus* provides only simple encryption (HTTPS) support. Many
35tools can be employed to serve as an HTTPS proxy. 35different tools can be employed to serve as an HTTPS proxy.
36 36
37See the examples bellow for more details! 37See the examples bellow for more details!
38 38
@@ -49,7 +49,9 @@ See the examples bellow for more details!
49### Gentoo 49### Gentoo
50 50
51 ```bash 51 ```bash
52 layman -a sgs 52 # add sgs' custom repository using app-eselect/eselect-repository
53 eselect repository add sgs
54
53 emerge www-servers/ngus 55 emerge www-servers/ngus
54 ``` 56 ```
55 57
@@ -107,6 +109,16 @@ The default form input field name is *ufile*. That can be changed by using the
107 curl --basic -u uname -F "uploadfile=@myfile.zip" http://158.39.125.240:8080 109 curl --basic -u uname -F "uploadfile=@myfile.zip" http://158.39.125.240:8080
108 ``` 110 ```
109 111
112Simple encryption (HTTPS) support
113
114 ```bash
115 # creating a self-signed key / certificate pair valid for 356 days
116 openssl req -sha256 -newkey rsa:4096 -nodes -x509 -extensions v3_ca -subj "/C=NO/O=MyOrg/CN=uploads.myhostname.net" -days 365 -keyout uploads.myhostname.net.key.pem -out uploads.myhostname.net.cert.pem
117 python -m ngus -H 0.0.0.0 -p 8080 -b "uname:foo" -k uploads.myhostname.net.key.pem -c uploads.myhostname.net.cert.pem -u /home/s/uploads
118 # since the certificate is self-signed, it can serve as a CA to itself in this example
119 curl --basic -u uname -F "ufile=@myfile.zip" --cacert uploads.myhostname.net.cert.pem https://uploads.myhostname.net:8080
120 ```
121
110 122
111### Using *nginx* as a proxy 123### Using *nginx* as a proxy
112 124
@@ -138,7 +150,7 @@ described in the examples above.
138 150
139 location / { 151 location / {
140 # point at the ngus instance running on a private network address 152 # point at the ngus instance running on a private network address
141 proxy_pass http://192.168.1.240:8080/; 153 proxy_pass http://158.39.125.240:8080/;
142 } 154 }
143 155
144 } 156 }