update usage

This commit is contained in:
idk
2018-09-12 23:58:25 -04:00
parent 4b88902fb1
commit 4ba85e54c1
4 changed files with 178 additions and 136 deletions

221
USAGE.md
View File

@@ -78,99 +78,154 @@ Usage of ./bin/ephsite:
Allow zero-hop, non-anonymous tunnels out(true or false)
```
eephttpd - Static file server automatically forwarded to i2p
============================================================
samcatd - Router-independent tunnel management for i2p
=========================================================
samcatd is a daemon which runs a group of forwarding proxies to
provide services over i2p independent of the router. It also serves
as a generalized i2p networking utility for power-users.
usage:
------
eephttpd is a static http server which automatically runs on i2p with
the help of the SAM bridge. By default it will only be available from
the localhost and it's i2p tunnel. It can be masked from the localhost
using a container.
```
Usage of ./bin/eephttpd:
-a string
hostname to serve on (default "127.0.0.1")
-c Use an encrypted leaseset(true or false)
-d string
the directory of static files to host(default ./www) (default "./www")
-f string
Use an ini file for configuration (default "none")
-g Uze gzip(true or false) (default true)
-i save i2p keys(and thus destinations) across reboots (default true)
-ib int
Set inbound tunnel backup quantity(0 to 5) (default 4)
-il int
Set inbound tunnel length(0 to 7) (default 3)
-iq int
Set inbound tunnel quantity(0 to 15) (default 8)
-iv int
Set inbound tunnel length variance(-7 to 7)
-l string
Usage of ./bin/samcatd:
-access string
Type of access list to use, can be "whitelist" "blacklist" or "none". (default "none")
-m string
Certificate name to use (default "cert")
-n string
name to give the tunnel(default static-eepSite) (default "static-eepSite")
-ob int
Set outbound tunnel backup quantity(0 to 5) (default 4)
-ol int
Set outbound tunnel length(0 to 7) (default 3)
-oq int
Set outbound tunnel quantity(0 to 15) (default 8)
-ov int
Set outbound tunnel length variance(-7 to 7)
-p string
port to serve locally on (default "7880")
-r Reduce tunnel quantity when idle(true or false)
-rc int
Reduce idle tunnel quantity to X (0 to 5) (default 3)
-rt int
-accesslist value
Specify an access list member(can be used multiple times)
-client
Client proxy mode(true or false)
-close
Close tunnel idle(true or false)
-closetime int
Reduce tunnel quantity after X (milliseconds) (default 600000)
-s string
the directory to save the keys in(default ./) (default ".")
-sh string
sam host to connect to (default "127.0.0.1")
-sp string
sam port to connect to (default "7656")
-t Generate or use an existing TLS certificate
-x Inject X-I2P-DEST headers (default true)
-z Allow zero-hop, non-anonymous tunnels(true or false)
-dest string
Destination for client tunnels. Ignored for service tunnels. (default "none")
-dir string
Directory to save tunnel configuration file in.
-encryptlease
Use an encrypted leaseset(true or false) (default true)
-gzip
Uze gzip(true or false)
-headers
Inject X-I2P-DEST headers
-host string
Target host(Host of service to forward to i2p) (default "127.0.0.1")
-inback int
Set inbound tunnel backup quantity(0 to 5) (default 4)
-incount int
Set inbound tunnel quantity(0 to 15) (default 6)
-ini string
Use an ini file for configuration(config file options override passed arguments for now.) (default "none")
-inlen int
Set inbound tunnel length(0 to 7) (default 3)
-invar int
Set inbound tunnel length variance(-7 to 7)
-lsk string
path to saved encrypted leaseset keys (default "none")
-name string
Tunnel name, this must be unique but can be anything. (default "forwarder")
-outback int
Set outbound tunnel backup quantity(0 to 5) (default 4)
-outcount int
Set outbound tunnel quantity(0 to 15) (default 6)
-outlen int
Set outbound tunnel length(0 to 7) (default 3)
-outvar int
Set outbound tunnel length variance(-7 to 7)
-port string
Target port(Port of service to forward to i2p) (default "8081")
-reduce
Reduce tunnel quantity when idle(true or false)
-reducecount int
Reduce idle tunnel quantity to X (0 to 5) (default 3)
-reducetime int
Reduce tunnel quantity after X (milliseconds) (default 600000)
-samhost string
SAM host (default "127.0.0.1")
-samport string
SAM port (default "7656")
-save
Use saved file and persist tunnel(If false, tunnel will not persist after program is stopped.
-start
Start a tunnel with the passed parameters(Otherwise, they will be treated as default values.)
-tlsport string
(Currently inoperative. Target TLS port(HTTPS Port of service to forward to i2p)
-udp
UDP mode(true or false)
-zeroin
Allow zero-hop, non-anonymous tunnels in(true or false)
-zeroout
Allow zero-hop, non-anonymous tunnels out(true or false)
```
### build in docker
example config - valid for both ephsite and samcat
==================================================
(ephsite will only use top-level options)
```
docker build --build-arg user=eephttpd --build-arg path=example/www -f Dockerfile -t eyedeekay/eephttpd .
## Defaults, these are only invoked with the -start option or if labeled tunnels
## are not present(samcatd instructions)
inbound.length = 3
outbound.length = 6
inbound.lengthVariance = 0
outbound.lengthVariance = 0
inbound.backupQuantity = 3
outbound.backupQuantity = 3
inbound.quantity = 5
outbound.quantity = 5
inbound.allowZeroHop = false
outbound.allowZeroHop = false
i2cp.encryptLeaseSet = false
gzip = true
i2cp.reduceOnIdle = true
i2cp.reduceIdleTime = 3000000
i2cp.reduceQuantity = 2
i2cp.enableWhiteList = false
i2cp.enableBlackList = false
[sam-forwarder]
type = server
host = 127.0.0.1
port = 8081
inbound.length = 3
outbound.length = 6
keys = forwarder
[sam-forwarder-two]
type = client
host = 127.0.0.1
port = 8082
inbound.length = 6
outbound.length = 3
keys = forwarder-two
[sam-forwarder-three]
type = udpclient
host = 127.0.0.1
port = 8083
inbound.length = 3
outbound.length = 6
keys = forwarder-three
[sam-forwarder-four]
type = udpserver
host = 127.0.0.1
port = 8084
inbound.length = 6
outbound.length = 3
keys = forwarder-four
[sam-forwarder-five]
type = http
host = 127.0.0.1
port = 8085
inbound.length = 3
outbound.length = 6
keys = forwarder-five
```
### Run in docker
```
docker run -i -t -d \
--name eephttpd-volume \
--volume eephttpd:/home/eephttpd/ \
eyedeekay/eephttpd
```
```
docker run -i -t -d \
--network si \
--env samhost=sam-host \
--env samport=7656 \
--env args=-r # Additional arguments to pass to eephttpd\
--network-alias eephttpd \
--hostname eephttpd \
--name eephttpd \
--restart always \
--volumes-from eephttpd-volume \
eyedeekay/eephttpd
```
instance
--------
a running instance of eephttpd with the example index file is availble on