feat: support param --verify-clients and --http-port

This commit is contained in:
Fred Liang 2021-12-24 11:05:09 +00:00
parent bf61e1bb23
commit 2bb427e626
2 changed files with 13 additions and 8 deletions

View file

@ -14,7 +14,10 @@ ENV DERP_CERT_MODE letsencrypt
ENV DERP_CERT_DIR /app/certs
ENV DERP_ADDR :443
ENV DERP_STUN true
ENV DERP_HTTP_PORT 80
ENV DERP_VERIFY_CLIENTS false
COPY --from=builder /go/bin/derper .
CMD /app/derper --hostname $DERP_DOMAIN --certmode $DERP_CERT_MODE --certdir $DERP_CERT_DIR --a $DERP_ADDR --stun $DERP_STUN
CMD /app/derper --hostname $DERP_DOMAIN --certmode $DERP_CERT_MODE --certdir $DERP_CERT_DIR --a $DERP_ADDR --stun $DERP_STUN --http-port $DERP_HTTP_PORT --verify-clients $DERP_VERIFY_CLIENTS

View file

@ -11,12 +11,14 @@ docker run -e DERP_DOMAIN=derper.your-domain.com -p 80:80 -p 443:443 -p 3478:347
```
| env | required | description | default value |
| ------------- | -------- | -------------------------------------------------------------- | ----------------- |
| ------------------- | -------- | ---------------------------------------------------------------------- | ----------------- |
| DERP_DOMAIN | true | derper server hostname | your-hostname.com |
| DERP_CERT_DIR | false | directory to store LetsEncrypt certs(if addr's port is :443) | /app/certs |
| DERP_CERT_MODE | false | mode for getting a cert. possible options: manual, letsencrypt | letsencrypt |
| DERP_ADDR | false | listening server address | :443 |
| DERP_STUN | false | also run a STUN server | true |
| DERP_HTTP_PORT | false | The port on which to serve HTTP. Set to -1 to disable | 80 |
| DERP_VERIFY_CLIENTS | false | verify clients to this DERP server through a local tailscaled instance | false |
# Usage