You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ```
  2. _____ _ ____ _ _
  3. |_ _| | / ___| | |_ _ __(_)___
  4. | | | | \___ \ _____| __| '__| / __|
  5. | | | |___ ___) |_____| |_| | | \__ \
  6. |_| |_____|____/ \__|_| |_|___/
  7. ```
  8. crypto/tls, now with 100% more 1.3.
  9. DO NOT USE THIS FOR THE SAKE OF EVERYTHING THAT'S GOOD AND JUST.
  10. [![Build Status](https://travis-ci.org/cloudflare/tls-tris.svg?branch=master)](https://travis-ci.org/cloudflare/tls-tris)
  11. ## Usage
  12. Since `crypto/tls` is very deeply (and not that elegantly) coupled with the Go stdlib,
  13. tls-tris shouldn't be used as an external package. It is also impossible to vendor it
  14. as `crypto/tls` because stdlib packages would import the standard one and mismatch.
  15. So, to build with tls-tris, you need to use a custom GOROOT.
  16. A script is provided that will take care of it for you: `./_dev/go.sh`.
  17. Just use that instead of the `go` tool.
  18. The script also transparently fetches the custom Cloudflare Go compiler with the required backports.
  19. ```
  20. ./_dev/go.sh build ./_dev/tris-localserver
  21. TLSDEBUG=error ./tris-localserver 127.0.0.1:4443
  22. ```
  23. ## Debugging
  24. When the environment variable `TLSDEBUG` is set to `error`, Tris will print a hexdump of the Client Hello and a stack trace if an handshake error occurs.
  25. ## Building Caddy
  26. ```
  27. ./_dev/go.sh build github.com/mholt/caddy
  28. ```
  29. *Note: to get Caddy to use TLS 1.3 you'll have to apply the patch at `_dev/caddy/caddy.patch`.*
  30. ## Testing with Firefox
  31. 1. Download the latest Firefox Nightly
  32. 1. Navigate to about:config and set `security.tls.version.max` to `4`
  33. 1. Connect to https://tris.filippo.io/ or tris-localserver
  34. ## Testing with BoringSSL/BoGo/NSS/Mint
  35. ```
  36. ./_dev/tris-localserver/start.sh --rm
  37. ```
  38. ```
  39. docker build -t tls-tris:boring _dev/boring
  40. docker run -i --rm tls-tris:boring $(docker inspect -f '{{ .NetworkSettings.IPAddress }}' tris-localserver):443
  41. ```
  42. ```
  43. docker build -t tls-tris:bogo _dev/bogo
  44. docker run -i --rm tls-tris:bogo $(docker inspect -f '{{ .NetworkSettings.IPAddress }}' tris-localserver):443
  45. ```
  46. ```
  47. docker build -t tls-tris:tstclnt _dev/tstclnt
  48. docker run -i --rm tls-tris:tstclnt $(docker inspect -f '{{ .NetworkSettings.IPAddress }}' tris-localserver):443
  49. ```
  50. ```
  51. docker build -t tls-tris:mint _dev/mint
  52. docker run -i --rm tls-tris:mint $(docker inspect -f '{{ .NetworkSettings.IPAddress }}' tris-localserver):443
  53. ```
  54. To build a specific revision, use `--build-arg REVISION=abcdef1234`.